/*----------------------*/
/*----- Monazo1997 -----*/
/*----------------------*/
 
#include <bits/stdc++.h>
using namespace std;
//freopen("input.txt", "r", stdin);
//freopen("output.txt", "w", stdout);
 
typedef long long ll;
#define FIN ios::sync_with_stdio(0);cin.tie(0);cout.tie(0)
#define forr(i, a, b) for(ll i = (a); i < (ll) (b); i++)
#define forn(i, n) forr(i, 0, n)
#define pb push_back
#define mp make_pair
#define all(c) (c).begin(),(c).end()
#define DBG(x) cerr << #x << " = " << (x) << endl
#define DBGV(v,n) forn(i,n) cout << v[i] << " "; cout << endl
#define esta(x,c) ((c).find(x) != (c).end())
#define RAYA cerr << "===============================" << endl
const ll MOD = (ll)(1e9+7); // 998244353 
const ll INF = (ll)(1e7+10); // (1e18+10)
const int MAXN = (int)(2e5+5);
 
int main(){
   	FIN;
	
	ll a, b;
	cin >> a >> b;
	ll suma = 0;
	forn(i,a-1) {
		cout << i+1 << " ";
		suma += i+1;
	}
	suma += INF;
	cout << INF << " ";
	forn(i,b-1) {
		cout << -i-1 << " ";
		suma -= i+1;
	}
	cout << -suma << "\n";
	
	return 0;
}

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

int main(){
  int a,b,sa,wa;
  vector<int> god;
  cin>>a>>b;
  if(a==b){
    for(int i=1;i<=a;i++){
      god.push_back(i);
      god.push_back(-1*i);
    }
  }else if(a>b){
    sa=a-b;
    wa=0;
    for(int i=1;i<=sa+1;i++){
      god.push_back(i);
      wa+=i;
    }
    god.push_back(-1*wa);
    for(int i=0;i<b-1;i++){
      wa++;
      god.push_back(wa);
      god.push_back(-1*wa);
    }
  }else{
      sa=b-a;
    wa=0;
    for(int i=1;i<=sa+1;i++){
      god.push_back(-1*i);
      wa+=i;
    }
    god.push_back(wa);
    for(int i=0;i<a-1;i++){
      wa++;
      god.push_back(wa);
      god.push_back(-1*wa);
    }
  }
  for(int i=0;i<god.size();i++){
   cout<<god.at(i)<<" ";

  }
  cout<<endl;

}