using namespace std;
#include<bits/stdc++.h>

#define fastio ios_base::sync_with_stdio(false);cin.tie(NULL);
#define ll long long int
#define nl "\n"
#define forf(i,a,n) for(ll i=a;i<=n;i++)
#define forb(i,b,n) for(ll i=b;i>=n;i--)
#define pb push_back
#define vll vector<ll>
#define all(qw) qw.begin(),qw.end()
#define read(vec) ll qwe;cin>>qwe;vec.pb(qwe)
#define pll pair<ll,ll>
#define vpll vector<pll>
#define ff first
#define ss second
#define mp make_pair
#define sll set<ll>
#define inset(sett) ll qwer;cin>>qwer;sett.insert(qwer);

ll hcf(ll a, ll b)
{
	if (b==0)return a;
	return hcf(b, a % b);
}

ll lcm(ll a,ll b)
{
    return (a*b)/hcf(a,b);
}

bool isprime(ll n) {
	if(n==1) return false;
    for (ll i=2;i*i<=n;++i){if(n%i==0) return false;}
    return true;
}

void onlinejudge(){
	#ifndef ONLINE_JUDGE
  freopen("Input.txt", "r", stdin);
  freopen("Output.txt", "w", stdout);
  #endif // ONLINE_JUDGE
}

               //SOLVE

void solve(){
    ll n;
    cin>>n;
    ll k;
    cin>>k;
    ll a=1000000000;
    ll b=-1000000000;
    forf(i,1,n){
    	if(i==n){
    		cout<<a<<" ";
    		break;
    	}
    	cout<<i<<" ";
    	a-=i;
    }
    forf(i,1,k){
    	if(i==k){
    		cout<<b<<" ";break;
    	}
    	cout<<-i<<" ";
    	b+=i;
    }
    cout<<nl;
}

int main(){  // Change the approach
  //onlinejudge();
  //fastio
  ll ttt;ttt=1;
  //cin>>ttt;
  while(ttt--) solve();
return 0;
}

// CHECK FOR EXTREME CASES AND ZEROS;

#include<bits/stdc++.h>

using namespace std;

#define MOD 1000000007

typedef long long ll;

int main(){
	int a,b;
	cin>>a>>b;
	if(a==b){
		for(int i=1;i<=a;i++) cout<<i<<" ";
		for(int i=1;i<=a;i++) cout<<(-1)*i<<" ";
	}
	else {
		if(a>b){
			for(int i=1;i<=a;i++) cout<<i<<" ";	
			int remaining = 0;
			for(int i=1;i<=a;i++) {
				if(i>=b){
					remaining += i;	
				}
				else cout<<(-1)*i<<" ";
			}
			cout<<(-1)*remaining<<endl;
		}
		else{   
		if(a<b){
			for(int i=1;i<=b;i++) cout<<(-1)*i<<" ";	
			int remaining = 0;
			for(int i=1;i<=b;i++) {
				if(i>=a){
					remaining += i;	
				}
				else cout<<i<<" ";
			}
			cout<<remaining<<endl;
		}
		}
	}
	return 0;
}

