#include <iostream>
#include <vector>
//#include <string>
//#include <algorithm>
//#include <math.h>
//#include <queue>
//#include <stack>
//#include <iomanip>

// sometimes used
//#include <set>
//#include <map>
//#include <numeric>
//#include <list>
//#include <deque>
//#include <unordered_map>

typedef long long LL;
//typedef long double LD;
//typedef pair<LL, LL> P;
using namespace std;
//using Graph = vector<vector<LL>>;
 
//const LL MOD=1000000007;
//const LL MOD=998244353;
//const LL MAX=100100;
//const LL NIL=-1;
//const LL INF=2000000000000000000;
//const LL SEG_VAL = 1 << 19;

int main(){
    cin.tie(0);
    ios::sync_with_stdio(0);

    LL a;
    LL b;
    cin >> a >> b;
    LL sum=0;
    LL cur;
    vector<LL> anum(a);
    vector<LL> bnum(b);
    if(a>=b){
        for(LL i=0; i<a; i++){
            anum[i]=i+1;
            sum+=anum[i];
        }
        cur=-1;
        for(LL i=0; i<b; i++){
            if(i==0){
                sum+=cur;
                bnum[i]=cur;
            }else{
                if(bnum[i-1]==cur){
                    cur--;
                }
                if(sum+cur<0){
                    anum[a-1]-=(sum+cur);
                    bnum[i]=cur;
                    sum=0;
                    cur--;
                }else{
                    bnum[i]=cur;
                    sum+=cur;
                    cur--;
                }
            }
            if(i==b-1){
                if(sum>0){
                    bnum[i]-=sum;
                }
            }
        }
    }else{
        for(LL i=0; i<b; i++){
            bnum[i]=-i-1;
            sum+=bnum[i];
        }
        cur=1;
        for(LL i=0; i<a; i++){
            if(i==0){
                sum+=cur;
                anum[i]=cur;
            }else{
                if(anum[i-1]==cur){
                    cur++;
                }
                if(sum+cur>0){
                    bnum[a-1]-=(sum+cur);
                    anum[i]=cur;
                    sum=0;
                    cur++;
                }else{
                    anum[i]=cur;
                    sum+=cur;
                    cur++;
                }
            }
            if(i==a-1){
                if(sum<0){
                    anum[i]-=sum;
                }
            }
        }
    }

    for(LL i=0; i<a; i++){
        cout << anum[i] << " ";
    }
    for(LL i=0; i<b; i++){
        cout << bnum[i] << " ";
    }
    cout << endl;

    return 0;
}

#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define irep(n) for (int i=0; i < (n); ++i)
#define irepf1(n) for (int i=1; i <= (n); ++i)
#define jrep(n) for (int j=0; j < (n); ++j)
#define jrepf1(n) for (int j=1; j <= (n); ++j)
#define krep(n) for (int k=0; k < (n); ++k)
#define krepf1(n) for (int k=1; k <= (n); ++k)
#define REP(i,s,e) for (int (i)=(s); (i)<(e);(i)++)
#define PI 3.14159265358979323846264338327950288
#define mod 1000000007
#define eps 0.00000001
#define Find(V,X) find(V.begin(),V.end(),X)
#define Sort(V) sort((V).begin(),(V).end())
#define Reverse(V) sort((V).begin(),(V).end()),reverse((V).begin(),(V).end())
#define Greater(V) sort((V).begin(),(V).end(),greater<int>())
//fixed << setprecision(10) <<

int main() {
  int A,B;
  cin >>A >>B;
  vector<int> V(A+B);
    ll sum=0;
  int Max=max(A,B);
  int Min=A+B-Max;
    irepf1 (Max) {
      V[i-1]=i;
      sum+=i;
    }
    //cout<<sum<<endl;
    V[A+B-1]=-1*sum;
    irepf1(Min-1) {
      V[i+Max-1]=-1*i;
      V[A+B-1]+=i;
    }
  if (A>=B) {
    irep (A+B-1) cout<<V[i]<<" ";
    cout<<V[A+B-1]<<endl;
  }
  else {
    irep (A+B-1) cout<<-1*V[i]<<" ";
    cout<<-1*V[A+B-1]<<endl;
  } 
}