#include <bits/stdc++.h>
#include<stdio.h>
#include<math.h>
#include<algorithm>
#include<queue>
#include<deque>
#include<stack>
#include<string>
#include<string.h>
#include<vector>
#include<set>
#include<map>
#include<bitset>
#include<stdlib.h>
#include<cassert>
#include<time.h>
#include<bitset>
#include <numeric>
using namespace std;

typedef long long ll;
#define rep(i,n) for(int i = 0 ; i < n ; i++)
#define Rep(i,n) for(int i = 1 ; i <= n ; i++)
const int maxn=2e5+5;
const ll mod = 1e9 + 7;
const bool DEBUG = 0;

int main(){

    int a,b,ans;

    cin >> a >> b;

    
    int sum = 500500;
    Rep(i,a){
        if( i < a ){
            cout << i << ' ';
            sum = sum - i;
        }else{
            cout << sum << ' ';
        }
    }

    sum = 500500;
    Rep(i,b){
        if( i < b){
            cout << -i << ' ';
            sum = sum - i;
        }else{
            cout << -sum << ' ';
        }
    }
    

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

int a, b;
vector<int> ans;

int main() {
    ios::sync_with_stdio(false);
    cin.tie(0);
    while (cin >> a >> b) {
        int sum = 0;
        ans.clear();
        if (a >= b) {
            for (int i = 1; i <= a; i++) ans.push_back(i), sum += i;
            for (int i = 1; i < b; i++) ans.push_back(-i), sum -= i;
            ans.push_back(-sum);
        } else {
            for (int i = 1; i <= b; i++) ans.push_back(-i), sum -= i;
            for (int i = 1; i < a; i++) ans.push_back(i), sum += i;
            ans.push_back(-sum);            
        }
        for (int i = 1; i < a + b; i++) cout << ans[i - 1] << ' ';
        cout << ans[a + b - 1] << '\n';
    }
    return 0;
}