#include<iostream>
#include<algorithm>
#include<cstdlib>
#include<sstream>
#include<cstring>
#include<cstdio>
#include<string>
#include<deque>
#include<cmath>
#include<queue>
#include<set>
#include<map>

using namespace std;

int a, b;
int aBoard[1010];
int bBoard[1010];

int main(void)
{
	scanf("%d%d", &a, &b);
	
	if (a >= b) {
		for (int i = 0 ; i < a ; i++) {
			aBoard[i] = i + 1;
		}
		int left = a;
		for (int i = 0 ; i < b ; i++) {
			bBoard[i] = left;
			left--;
		}
		
		while (left > 0) {
			for (int i = 0 ; i < b ; i++) {
				bBoard[i] = bBoard[i] + left;
				left--;
				if (left <= 0)
					break;
			}
		}
	} else {
		for (int i = 0 ; i < b ; i++) {
			bBoard[i] = i + 1;
		}
		int left = b;
		for (int i = 0 ; i < a ; i++) {
			aBoard[i] = left;
			left--;
		}
		
		while (left > 0) {
			for (int i = 0 ; i < a ; i++) {
				aBoard[i] = aBoard[i] + left;
				left--;
				if (left <= 0)
					break;
			}
		}
	}
	
	for (int i = 0 ; i < a ; i++) {
		printf("%d ", aBoard[i]);
	}
	for (int i = 0 ; i < b ; i++) {
		printf("%d ", -bBoard[i]);
	}	
	
	printf("\n");
	
	return 0;
}
#include<bits/stdc++.h>
using namespace std;
typedef int ll;
#define F first
#define S second
#define pb(x) push_back(x)
//cout.flush()
ll q, n, k, a[200001], c[20], c1, c2;
string s;
int main(){
//    ios_base::sync_with_stdio(0);
//    cin.tie(0);
    cin >> c1 >> c2;
    c[1]=0;
    c[2]=0;
    if(c1>=c2){
        for(int i=1; i<=c1; i++){
            cout << i << " ";
            c[1]+=i;
        }
        for(int i=1; i<c2; i++){
            cout << -i << " ";
            c[2]+=i;
        }
        cout << c[2]-c[1] << " ";
    }
    else{
        for(int i=1; i<c1; i++){
            cout << i << " ";
            c[1]+=i;
        }
        for(int i=1; i<=c2; i++){
            cout << -i << " ";
            c[2]+=i;
        }
        cout << c[2]-c[1] << " ";
    }
    return 0;
}
