  #include <bits/stdc++.h>
using namespace std;
#define int               long long
#define pb                push_back
#define ppb               pop_back
#define pf                push_front
#define ppf               pop_front
#define all(x)            (x).begin(),(x).end()
#define uniq(v)           (v).erase(unique(all(v)),(v).end())
#define sz(x)             (int)((x).size())
#define fr                first
#define sc                second
#define pii               pair<int,int>
#define vi                vector<int>
#define vii               vector<pii>
#define mi                map<int,int>
#define mii               map<pii,int>
#define rep(i,a,b)        for(int i=a;i<b;i++)
#define el                 '\n'
 
 
 
void solve()
{ 
    int a,b;
    cin>>a>>b;

    if(a>=b){
      int cnt=0;
      rep(i,1,a+1){
        cout<<i<<' ';
        cnt+=i;
      }
      rep(i,1,b){
        cout<<-1*i<<' ';
        cnt-=i;
      }
      cout<<-1*cnt<<el;
    }
    else{
         int cnt=0;
      rep(i,1,b+1){
        cout<<-1*i<<' ';
        cnt+=i;
      }
      rep(i,1,a){
        cout<<1*i<<' ';
        cnt-=i;
      }
      cout<<1*cnt<<el;
    }

}

signed main()
{     
     
   
     ios_base::sync_with_stdio(false);
     cin.tie(0); cout.tie(0);

 
  #ifndef ONLINE_JUDGE
    freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
  #endif 

   int t=1;
  // cin>>t;

   while(t--) solve();
   return 0;
}

#include <iostream>
#include<cstring>
#include<vector>
#include<algorithm>
#include<math.h>
#include<climits>
using namespace std;

int main() {
#ifndef ONLINE_JUDGE
	freopen("in.txt", "r", stdin);
	freopen("ou.txt", "w", stdout);
#endif
	int a, b; cin >> a >> b;
	vector<int> v, v1;
	if (a > b) {
		int sum = 0, sum1 = 0;
		for (int i = 1; i <= a; i++) {
			v.push_back(i);
			sum += i;
		}
		for (int i = 1; i <= b - 1; i++) {
			v1.push_back(-i);
			sum1 += i;
		}
		v1.push_back(sum1 - sum);
	}
	else if (a < b) {
		int sum = 0, sum1 = 0;;
		for (int i = 1; i <= b; i++) {
			v1.push_back(-i);
			sum += i;
		}
		for (int i = 1; i <= a - 1; i++) {
			v.push_back(i);
			sum1 += i;
		}
		v.push_back((sum - sum1));

	}
	else {
		for (int i = 1; i <= a; i++) {
			v1.push_back(-i);
			v.push_back(i);
		}
	}
	for (int i = 0; i < v.size(); i++)
		cout << v[i] << " ";
	for (int i = 0; i < v1.size(); i++)
		cout << v1[i] << " ";
}