
#include"bits/stdc++.h"
#define rep(i,n) for(ll i=0;i<n;++i)
#define ALL(x) x.begin(),x.end()
#define BACK(x) x.rbegin(),x.rend()
#define MOD 1000000007
#define INF INT_MAX
#define FLOAT_ANS setprecision(30)
#define TORAD(x) (x*acos(-1)/180.0)
#define TODEG(x) (x*180/acos(-1))
#define elif else if

using namespace std;
typedef long long ll;
typedef unsigned long long ull;

template<typename T>
bool chmin(T& a,T b){
	if(a>b){
		a=b;
		return true;
	}
	return false;
}

template<typename T>
bool chmax(T& a,T b){
	if(a<b){
		a=b;
		return true;
	}
	return false;
}

ll modpow(ll a, ll n, ll mod) {
    ll res=1;
    while (n>0) {
        if(n&1)res=(res*(a%mod))%mod;
        a=((a%mod)*(a%mod))%mod;
        n>>=1;
    }
    return res;
}

// MAIN PROGRAM -------------

int main(){
	ll a,b;
	bool spd=false;
	cin>>a>>b;
	if(a<b){
		swap(a,b);
		spd=true;
	}

	ll n=0;
	rep(i,a){
		if(spd)cout<<-(i+1)<<" ";
		else cout<<i+1<<" ";
		n+=i+1;
	}

	rep(i,b-1){
		if(spd)cout<<(i+1)<<" ";
		else cout<<-(i+1)<<" ";
		n-=i+1;
	}

	if(spd)cout<<n;
	else cout<<-n;
}

/*

*/
#include "bits/stdc++.h"
#include <chrono>
#include <random>

#define INF 1000000007
#define F first
#define S second
#define PB push_back
#define MP make_pair
#define REP(i,a,b) for (int i = a; i < b; i++)


#pragma GCC optimize("Ofast")
#pragma GCC optimize ("unroll-loops")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,fma,mmx,avx,tune=native")

using namespace std; 





typedef long long ll;
typedef long double ld;
typedef vector<int> vi;
typedef unordered_map<int,int> umi ;
typedef unordered_set<int> usi ;
typedef pair<int,int> pi;

struct custom_hash {
    static uint64_t splitmix64(uint64_t x) {
        // http://xorshift.di.unimi.it/splitmix64.c
        x += 0x9e3779b97f4a7c15;
        x = (x ^ (x >> 30)) * 0xbf58476d1ce4e5b9;
        x = (x ^ (x >> 27)) * 0x94d049bb133111eb;
        return x ^ (x >> 31);
    }

    size_t operator()(uint64_t x) const {
        static const uint64_t FIXED_RANDOM = chrono::steady_clock::now().time_since_epoch().count();
        return splitmix64(x + FIXED_RANDOM);
    }
};

bool ldequal(ld  a ,ld b){
    return abs(a-b) < 1e-9  ;
}
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
// shuffle(permutation.begin(), permutation.end(), rng); for permute 
// uniform_int_distribution<int>(0, i)(rng) for rand

void __print(int x) {cerr << x;}
void __print(long x) {cerr << x;}
void __print(long long x) {cerr << x;}
void __print(unsigned x) {cerr << x;}
void __print(unsigned long x) {cerr << x;}
void __print(unsigned long long x) {cerr << x;}
void __print(float x) {cerr << x;}
void __print(double x) {cerr << x;}
void __print(long double x) {cerr << x;}
void __print(char x) {cerr << '\'' << x << '\'';}
void __print(const char *x) {cerr << '\"' << x << '\"';}
void __print(const string &x) {cerr << '\"' << x << '\"';}
void __print(bool x) {cerr << (x ? "true" : "false");}

template<typename T, typename V>
void __print(const pair<T, V> &x) {cerr << '{'; __print(x.first); cerr << ','; __print(x.second); cerr << '}';}
template<typename T>
void __print(const T &x) {int f = 0; cerr << '{'; for (auto &i: x) cerr << (f++ ? "," : ""), __print(i); cerr << "}";}
void _print() {cerr << "]\n";}
template <typename T, typename... V>
void _print(T t, V... v) {__print(t); if (sizeof...(v)) cerr << ", "; _print(v...);}
#ifndef ONLINE_JUDGE
#define debug(x...) cerr << "[" << #x << "] = ["; _print(x)
#else
#define debug(x...)
#endif


 
 

//declare here-------------------------------------------------------------------------------
const int N =1e2 ;

//solve here---------------------------------------------------------------------------------
void solve(){
    int a ,b ;
    cin>>a>>b ;
    int pr=1 ;
    if(b>a){
      pr=-1 ;
      swap(a,b) ;
    }
    vi ans  ;
    REP(i,1,a+1)ans.PB(i) ;
    REP(i,1,b) ans.PB(-i) ;
    int sm=0 ;
    REP(i,b,a+1) sm+=i ;
    ans.PB(-sm) ;
    for(auto x:ans) cout<<pr*x<<" " ;
}
 

int main(){
    
    
    #ifndef ONLINE_JUDGE
    freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
    #endif
    ios::sync_with_stdio(0);
    cin.tie(0);
    long long test =1 ;
     //cin>>test ;
   
    REP(i,1,test+1){
        debug(i) ;
        //cout<<"Case #"<<i<<": " ;

        solve() ;
        cout<<"\n" ;
    }
    return 0 ;
}