#include <iostream>
#include <fstream>
#include <sstream>
#include <iomanip>
#include <vector>
#include <string>
#include <algorithm>
#include <queue>
#include <stack>
#include <map>
#include <set>
#include <unordered_set>
#include <unordered_map>
#include <bitset>
#include <limits>
#include <random>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <tuple>
#include <cassert>
using namespace std;
#define REP(i,n) for(int (i)=0;(i)<(int)(n);(i)++)
typedef long long ll;
template <class T> using reversed_priority_queue = priority_queue<T, vector<T>, greater<T> >;

int main ()
{
    ll A,B;
    cin >> A >> B;

    vector<ll> ans;
    REP(i,A) ans.push_back(i + 1);
    REP(i,B) ans.push_back(-(i + 1));

    ll Asum = 0, Bsum = 0;
    REP(i,A) Asum += i + 1;
    REP(i,B) Bsum += i + 1;

    ll diff = abs(Asum - Bsum);
    if (Asum < Bsum) {
        ans[A - 1] += diff;
    } else if (Asum > Bsum) {
        ans[A + B - 1] -= diff;
    }

    REP(i,ans.size()) {
        cout << ans[i] << ((i < ans.size() - 1) ? " " : "\n");
    }

    return 0;
}

#pragma GCC optimize ("-O3")
#include <bits/stdc++.h>  
 
using namespace std;
 
typedef long long ll;
typedef long double ld;
typedef pair<int,int> p32;
typedef pair<ll,ll> p64;
typedef pair<double,double> pdd;
typedef vector<ll> v64;
typedef vector<int> v32;
typedef vector<vector<int> > vv32;
typedef vector<vector<ll> > vv64;
typedef vector<vector<p64> > vvp64;
typedef vector<p64> vp64;
typedef vector<p32> vp32;
ll MOD = 998244353;
#define forn(i,e) for(ll i = 0; i < e; i++)
#define forsn(i,s,e) for(int i = s; i < e; i++)
#define rforn(i,s) for(ll i = s; i >= 0; i--)
#define rforsn(i,s,e) for(ll i = s; i >= e; i--)
#define ln "\n"
#define dbg(x) cout<<#x<<" = "<<x<<ln
#define mp make_pair
#define pb push_back
#define fi first
#define se second
#define INF 1e18
#define fast_cin() ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL)
#define all(x) (x).begin(), (x).end()
#define sz(x) ((ll)(x).size())
 
ll mpow(ll a, ll b){
	if(b >= (MOD-1)) b %= (MOD-1);
	if(b==0) return 1;
	ll t1 = mpow(a,b/2);
	t1 *= t1;
	t1 %= MOD;
	if(b%2) t1 *= a;
	t1 %= MOD;
	return t1;
}
 
ll mpow(ll a, ll b, ll p){
	if(b==0) return 1;
	ll t1 = mpow(a,b/2,p);   t1 *= t1;
	t1 %= p;
	if(b%2) t1 *= a;
	t1 %= p;
	return t1;
}
ll modinverse(ll a, ll m){
	ll m0 = m; 
    ll y = 0, x = 1; 
    if (m == 1) return 0; 
    while (a > 1){
        ll q = a / m; 
        ll t = m; 
        m = a % m, a = t; 
        t = y; 
        y = x - q * y; 
        x = t; 
    }
    if (x < 0) x += m0; 
    return x; 
}
ll range(ll l, ll r){
	return l + rand()%(r-l+1);
}

     
void solve(){
    ll a,b;
    cin>>a>>b;

    ll x=0;

    if(a==1 && b!=1){
        forsn(i, 1, b+1){
            cout<<-1*i<<" ";
            x+=i;
        }
        cout<<x;
        return;
    }
    if(a!=1 && b==1){
        forsn(i, 1, a+1){
            cout<<i<<" ";
            x+=i;
        }
        cout<<-1*x;
        return;
    }

    if(a>b){
        forsn(i, b, a+1){
            x+=i;
        }
        forsn(i, 1, a+1){
            cout<<i<<" ";
        }
        forsn(i, 1, b){
            cout<<-1*i<<" ";
        }
        cout<<-1*x;
    }
    else if(a<b){
        forsn(i, a, b+1){
            x+=i;
        }
        forsn(i, 1, a){
            cout<<i<<" ";
        }
        forsn(i, 1, b+1){
            cout<<-1*i<<" ";
        }
        cout<<x;
    }
    else{
        forsn(i, 1, a+1){
            cout<<i<<" ";
        }
        forsn(i, 1, b+1){
            cout<<-1*i<<" ";
        }

    }
    
}
 
int main()
{
	fast_cin();
    ll t=1;
    // cin>>t;
    forn(i,t) {
    	// cout << "Case #" << i+1 << ": ";
    	solve();
    }
    return 0;
}