#include<bits/stdc++.h>
using namespace std;
const int N=2007;
int a[N],b[N];
int main()
{
	int A,B,C; scanf("%d%d",&A,&B);
	C=max(A,B);
	for(int i=1;i<=C;i++)a[i]=i,b[i]=-i;
	for(int i=C;i>=A+1;i--)a[i-1]+=a[i];
	for(int i=C;i>=B+1;i--)b[i-1]+=b[i];
	for(int i=1;i<=A;i++)printf("%d ",a[i]);
	for(int i=1;i<=B;i++)printf("%d ",b[i]);
	return 0;
}

#include<bits/stdc++.h>
using namespace std;
typedef long long   ll;
typedef long double ld;
typedef vector<int> vi;
typedef vector<vector<int>> vvi;
typedef vector<ll>  vl;
typedef vector<pair<int,int>> vpi;
#define tr(it, a) for(auto it = a.begin(); it != a.end(); it++)
#define pb    push_back
#define mp    make_pair
#define rev(i,a,b) for(int i=a;i<b;i++)
#define sz(a)   (int)a.size()
#define all(a)  a.begin(),a.end()
//const ll  MOD =998244353;
ll  gcd(ll a,ll b){if(b==0)return a;return gcd(b,a%b);}
ll lcm(ll a, ll b){return a / gcd(a, b) * b;}
int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    int a,b;
    cin>>a>>b;
    if(a==b)
    {
        for(int i=1;i<=a;i++)
        cout<<i<<" ";
        for(int i=1;i<=b;i++)
        cout<<-i<<" ";
    }
    else
    {
        if(a>b)
        {
            ll s=a*(a+1)/2;
            ll s1=(b-1)*b/2;
            for(int i=1;i<=a;i++)
            cout<<i<<" ";
            for(int i=1;i<b;i++)
            cout<<-i<<" ";
            cout<<s1-s<<" ";
        }
        else
        {
            for(int i=1;i<=b;i++)
            cout<<-i<<" ";
            for(int i=1;i<a;i++)
            cout<<i<<" ";
            cout<<abs((a*(a-1)/2)-(b*(b+1)/2))<<" ";
        }
    }
}

