#if _MSC_VER
#define _CRT_SECURE_NO_WARNINGS
#endif
#include <bits/stdc++.h>
#include <unordered_map>
#include <unordered_set>
using namespace std;

#ifndef ONLINE_JUDGE 
const bool DEBUG = true;
#else
const bool DEBUG = false;
#endif

void read() {}
template<class T>
void read(vector<T>& var) { for (int i = 0; i < (int)var.size(); ++i) cin >> var[i]; }
// Reads arbitrary values
template <class T1, class... T2>
void read(T1& var1, T2&... var2) { cin >> var1; read(var2...); }



void pln() { cout << (DEBUG ? "]\n" : "\n"); }

template <class T1, class... T2>
void pln(const T1& var1, const T2& ... var2) { cout << var1 << " "; pln(var2...); }

// Prints arbitrary values and goes to next line
template <class T>
void print(vector<T>& arg) { cout << (DEBUG ? " [ " : ""); for (auto& i : arg) cout << i << " "; cout << (DEBUG ? "]\n" : "\n"); }
template <class T1, class... T2>
constexpr void print(const T1& var1, const T2& ... var2) { cout << (DEBUG ? " [ " : ""); pln(var1, var2...); }

// Prints arbitrary values and goes to next line ONLY IF IN DEBUG MODE
template <class T1, class... T2>
constexpr void debug(const T1& var1, const T2& ... var2) { if (!DEBUG) return;  cout << " debug : [ "; pln(var1, var2...); }
template <class T>
void debug(vector<T>& arg) { cout << (DEBUG ? " debug : [ " : ""); for (auto& i : arg) cout << i << " "; cout << (DEBUG ? "]\n" : "\n"); }





using ll = long long;
using ull = unsigned long long;
using ld = long double;


#define all(x) begin(x), end(x)


#define SINGLE_TEST_CASE 01


void exec()
{
	int a, b;
	cin >> a >> b;

	ll sum = 0;
	for (int i = 1; i <= a - 1; ++i) {
		cout << i << " ";
		sum += i;
	}

	for (int j = 1; j <= b - 1; ++j) {
		cout << -j << " ";
		sum -= j;
	}

	cout << 500 * 1001 << " ";
	cout << -sum - (500 * 1001);
}

















int main()
{
	ios::sync_with_stdio(false);
	cin.tie(0); cout.tie(0);

	if (SINGLE_TEST_CASE)
		exec();
	else {
		int n;
		cin >> n;

		while (n--)
			exec();
	}

	return 0;
}

/**
 * Dont raise your voice, improve your argument.
 * --Desmond Tutu
 */
#include <bits/stdc++.h>
using namespace std;

const bool ready = [](){
    ios_base::sync_with_stdio(false); cin.tie(0);
    cout << fixed << setprecision(12);
    return true;
}();

using ld=long double;
const ld PI = acos((ld)-1);
using ll= long long;
#define int ll
#define all(v) (v).begin(), (v).end()
#define fori(n) for(int i=0; i<int(n); i++)

#define cini(i) int i; cin>>i;
#define cins(s) string s; cin>>s;
#define cind(d) ld d; cin>>d;
#define cinai(a,n) vi a(n); fori(n) { cin>>a[i]; }
#define cinas(s,n) vs s(n); fori(n) { cin>>s[i]; }
#define cinad(a,n) vd a(n); fori(n) { cin>>a[i]; }

using pii= pair<int, int>;
using pdd= pair<ld, ld>;
using vd= vector<ld>;
using vb= vector<bool>;
using vi= vector<int>;
using vvi= vector<vi>;
using vs= vector<string>;

#define endl "\n"

/* Use the bigger number with 1,2,3...m=max(a,b),
 * sum=m*(m+1)/2
 * Construct a seq with min(a,b) elements and that sum.
 */
void solve() {
    cini(a);
    cini(b);
    vi ans;

    for(int i=1; i<=max(a,b); i++) 
        ans.push_back(i);

    for(int i=1; i<min(a,b); i++)
        ans.push_back(-i);

    int ma=max(a,b)*(max(a,b)+1)/2;
    int mi=(min(a,b)-1)*min(a,b)/2;
    ans.push_back(-(ma-mi));

    if(a<b) {
        for(int i=0; i<a+b; i++)
            ans[i]=-ans[i];
    }
    for(int i : ans)
        cout<<i<<" ";
    cout<<endl;
}

signed main() {
    solve();
}