#include <bits/stdc++.h>
using namespace std;
bool delimiter, unof = 1;
#define F first
#define S second
#define pb push_back
#define ll long long
#define all(x) x.begin() , x.end()
#define rep(i,s,e) for (int i = s; i < e; ++i)
#define rev(i,s,e) for (int i = s; i > e; --i)
inline namespace IO{
    template<class t> using con=vector<t>;
    template<class t, class u> using pi=pair<t,u>;

    template<class t, class u> istream& operator>>(istream& is, pi<t,u>& pr){
        is >> pr.F >> pr.S; return is;
    }
    template<class t, class u> ostream& operator<<(ostream& os, const pi<t,u>& pr){
        delimiter=0; os << (unof ? "\t{" : "") << pr.F << (unof? " , " : " ") << pr.S << (unof? "}" : ""); return os;
    }

    template<class t> istream& operator>>(istream& is,con<t>& v){
        for (auto &i : v) is >> i; return is;
    }
    template<class t> ostream& operator<<(ostream& os,const con<t>& v){
        delimiter=1; os << (unof? "[": ""); bool fst = 0;
        for(auto e:v) os << (unof and fst? ", " : "") << e << (delimiter ? ' ' : '\n'), fst = 1;
        os << (unof? "]": ""); return os;
    }
}
const int N = 1e5 + 9 ;


int main() {
    ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#ifdef CLion
    freopen("input.txt" , "r" , stdin);
//    freopen("output.txt", "w" , stdout);
#endif

    int a, b;
    cin >> a >> b;

    set<ll> s;
    if (a > b){
        int df = a - b;
        int pos = df + 1, neg = 1;
        a -= pos; b -= neg;

        ll sum = 0;
        rep(i,1,pos + 1){
            cout << i << " ";
            sum += i; s.insert(i);
        }
        cout << -sum << " ";
        s.insert(-sum);
    }
    else if (b > a){
        int df = b - a;
        int neg = df + 1, pos = 1;
        a -= pos; b -= neg;

        ll sum = 0;
        rep(i,1,neg + 1){
            cout << -i << " ";
            sum += -i; s.insert(-i);
        }
        cout << -sum << " ";
        s.insert(-sum);
    }

    for ( int i = 1e9; a > 0 and b > 0; --i,--a,--b ){
        if ( s.count(i) == 0 and s.count(-i) == 0 ){
            cout << i << " " << -i << " ";
        }
    }
    return 0;
}
#include<bits/stdc++.h>

using namespace std;

int main () {
    ios_base::sync_with_stdio(false); cin.tie(0);
    int a, b; cin >> a >> b;

    int sum = a * (a + 1) / 2 - b * (b + 1) / 2;
    for (int i = 1; i <= a; i++) {
        int x = i;
        if (sum < 0) x += abs(sum), sum = 0;
        cout << x << " ";
    }

    for (int i = 1; i <= b; i++) {
        int x = -i;
        if (sum > 0) x -= sum, sum = 0;
        cout << x << " ";
    }
    cout << "\n";
}