#include <bits/stdc++.h>
using namespace std;
#define rep(i,a,n) for(int i=(a); i<(n); i++)
#define rrep(i,a,n) for(int i=(a); i>=(n); i--)
#define all(n) begin(n),end(n)
#define rall(n) rbegin(n),rend(n)
//#define yn(bool) if(bool){cout<<Yes<<endl;}else{cout<<No<<endl;}
#define fore(i,a) for(auto &i:a)
using ll = long long;
using vi = vector<int>;
using vl = vector<ll>;
ll myceil(ll a,ll b){return (a+(b-1))/b;}
ll myfloor(ll a,ll b){return a/b;}
template <typename T> inline bool chmin(T& a, const T& b) {bool compare = a > b; if (a > b) a = b; return compare;}
template <typename T> inline bool chmax(T& a, const T& b) {bool compare = a < b; if (a < b) a = b; return compare;}
void _main(); int main() { cin.tie(0); ios::sync_with_stdio(false); _main(); }

void _main() {
    int a,b;
    cin>>a>>b;
    vl e(a+b);
    if(a >= b) {
        rep(i,0,a) e[i] = i+1;
        rep(i,a,a+b-1) e[i] = -(i+1-a);
        rep(i,0,a+b-1) e[a+b-1] -= e[i];
    }else{
        rep(i,0,a-1) e[i] = i+1;
        rep(i,a,a+b) e[i] = -(i+1-a);
        rep(i,0,a+b){
            if(i != a-1) e[a-1] -= e[i];
        }
    }
    rep(i,0,a+b){
        if(i) cout<<" ";
        cout<<e[i];
    }
    cout<<endl;
}
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)

int main(){
  int A, B;
  cin >> A >> B;
  long long a = 0;
  if(A > B){
    for(int i = 1; i <= A; i++){
      cout << i << " ";
      a += i;
    }
    for(int i = 1; i < B; i++){
      cout << -i << " ";
      a -= i;
    }
    cout << -a << endl;
  }else if(A < B){
    for(int i = 1; i <= B; i++){
      cout << -i << " ";
      a += i;
    }
    for(int i = 1; i < A; i++){
      cout << i << " ";
      a -= i;
    }
    cout << a << endl;
  }else{
    for(int i = 1; i <= A; i++){
      cout << i << " " << -i;
      if(i != A){
        cout << " ";
      }else{
        cout << endl;
      }
    }
  }
}