#include <bits/stdc++.h>
using namespace std;
#define REP(i,n) for(int i=0;i<(n);i++)
typedef long long ll;

int main(){
  int a,b;cin>>a>>b;
  vector<ll> x(a,0),y(b,0);
  ll ttl=0;
  REP(i,a){
    x.at(i)=600000-i;
    ttl+=x.at(i);
  }
  ll ttl2=0;
  REP(i,b-1){
    y.at(i)=i+1;
    ttl2+=y.at(i);
  }
  y.at(b-1)=ttl-ttl2;
  REP(i,a) cout<<x.at(i)<<" ";
  REP(i,b) cout<<-y.at(i)<<" ";
  cout<<endl;
}
#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for (int i = 0; i < (n); ++i)
#define all(a) (a).begin(), (a).end() 
using ll = long long;
int mod = 1000000007;
const int INF = 1001001001;
template<class T> void chmin(T& a, T b) {if (a > b) a = b;}
template<class T> void chmax(T& a, T b) {if (a < b) a = b;}
int dx[4] = {1, -1, 0, 0};
int dy[4] = {0, 0, 1, -1};
int ddx[8] = {1, 1, 0, -1, -1, -1, 0, 1};
int ddy[8] = {0, 1, 1, 1, 0, -1, -1, -1};
using Graph = vector<vector<int>>;


int main() {
    int a, b; cin >> a >> b;
    if (a == b) {
        for (int i = 1; i <= a; i++) {
            cout << i << " " << -i << " ";
        }
        cout << endl;
        return 0;
    }
    int mi = min(a, b);
    int mx = max(a, b);
    int p = mx * (mx + 1) / 2;
    int d = (mi - 1) * mi / 2;
    for (int i = 1; i < mi; i++) {
        cout << i << " " << -i << " ";
    }
    int x = p - d;
    if (a > b) {
        for (int i = mi; i < mx + 1; i++) {
            cout << i << " ";
        }
        cout << -x << endl;
        return 0;
    }
    else {
        for (int i = mi; i < mx + 1; i++) {
            cout << -i << " ";
        }
        cout << x << endl;
    }
    return 0;
}
