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

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

    vector<int> god(A + B);

    if (A > B)
    {
        int sum = 0;
        for (int i = 0; i < A; i++)
        {
            god.at(i) = i + 1;
            sum += i + 1;
        }

        for (int i = 0; i < B; i++)
        {
            if (A + i == god.size() - 1)
            {
                god.at(A + i) = sum * (-1);
            }
            else
            {
                god.at(A + i) = (i + 1) * (-1);
                sum += (i + 1) * (-1);
            }
        }
    }
    else
    {
        int sum = 0;
        for (int i = 0; i < B; i++)
        {
            god.at(i) = (i + 1) * (-1);
            sum += (i + 1) * (-1);
        }

        for (int i = 0; i < A; i++)
        {
            if (B + i == god.size() - 1)
            {
                god.at(B + i) = sum * (-1);
            }
            else
            {
                god.at(B + i) = i + 1;
                sum += i + 1;
            }
        }
    }
    for (int i = 0; i < god.size(); i++)
    {
        if (i != god.size() - 1)
            cout << god.at(i) << " ";
        else
            cout << god.at(i) << endl;
    }

    return 0;
}

#include <bits/stdc++.h>
using namespace std;
#define ll long long int

int main()
{
    ll t,i,j,k;
    ll a,b;
    cin>>a>>b;
    vector <ll> res;
    if(a>b)
    {
        ll x=(a*(a+1))/2-(b*(b-1))/2;
        for(i=1;i<=a;i++)
            cout<<i<<" ";
        for(i=1;i<b;i++)
            cout<<-i<<" ";
        cout<<-x<<endl;
    }
    else
    {
        ll x=(b*(b+1))/2-(a*(a-1))/2;
        for(i=1;i<=a-1;i++)
            cout<<i<<" ";
        for(i=1;i<=b;i++)
            cout<<-i<<" ";
        cout<<x<<endl;
    }
}