#include<iostream>
#include<cstdlib>
using namespace std;
int getint(int a,int b){
if(a==0)return b;
if(b==0)return a;
cout<<a<<endl;
return getint(a-1,b-1);
}
int ungetint(int a){
if(a<=0)return 0;
cout<<a<<endl;
return ungetint(a--);
}
int main(){
int a,b;
cin>>a>>b;
cout<<max(a,b)<<endl;
_sleep(10000);
cout<<ungetint(a)<<endl;
cout<<getint(a,b)<<endl;
return 0;
}