// Problem: A - God Sequence
// Contest: AtCoder - AtCoder Regular Contest 117
// URL: https://atcoder.jp/contests/arc117/tasks/arc117_a
// Memory Limit: 1024 MB
// Time Limit: 2000 ms
// 
// Powered by CP Editor (https://cpeditor.org)

#include<bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
using namespace __gnu_pbds;
using namespace std;
typedef long long ll;
#define speed ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0)
#define mp make_pair
#define pb push_back
#define ff first
#define ss second
#define vi vector<ll>
#define vll vector<ll> 
#define all(x) (x).begin() , (x).end()

mt19937_64 rng(chrono::steady_clock::now().time_since_epoch().count());
#define rnd(x, y) uniform_ll_distribution<ll>(x, y)(rng)

void dbg(){
	cerr << endl;
}
template<typename Head , typename... Tail>
void dbg(Head h , Tail... t){
	cerr << h << " ";
	dbg(t...);
}

#ifdef EMBI_DEBUG
#define debug(...) cerr << "(" << #__VA_ARGS__  << "): ", dbg(__VA_ARGS__)
#else 
#define debug(...)
#endif

const ll max_n = 1e5 + 9;
const ll mod = 1e9 + 7;
const ll inf = 1e9;

typedef tree<ll,null_type,less<ll>,rb_tree_tag,tree_order_statistics_node_update> indexed_set;
ll power(ll a , ll b)
{
    ll prod = 1;
    while(b)
    {
        if(b&1)
        prod = (prod*a)%mod;
        a = (a*a)%mod;
        b >>= 1;
    }
    return prod;
}
void solve(){
	ll a , b;
	cin >> a >> b;
	
	if(a >= b) {
		//positive > negative
		vector<ll> pos , neg;
		ll sum = 0;
		for(ll i = 1 ; i <= a ; i++) {
			pos.pb(i);
			neg.pb(-i);
			sum += i;
		}
		
		while(neg.size() > b) {
			ll num = neg.back();
			neg.pop_back();
			neg.back() += num;
		}
		
		for(auto it : pos) {
			cout << it << " ";
		}
		for(auto it : neg) {
			cout << it << " ";
		}
	}
	else {
		vector<ll> pos , neg;
		ll sum = 0;
		for(ll i = 1 ; i <= b ; i++) {
			pos.pb(i);
			neg.pb(-i);
			sum += i;
		}
		
		while(pos.size() > a) {
			ll num = pos.back();
			pos.pop_back();
			pos.back() += num;
		}
		
		for(auto it : pos) {
			cout << it << " ";
		}
		for(auto it : neg) {
			cout << it << " ";
		}
	}
}
signed main(){
	ll t = 1;
	// cin >> t;
	for(ll i = 1 ; i <= t ; i++){
		solve();
	}
}

#include <bits/stdc++.h>
using namespace std;
int main() {
int x;
  int y;
  cin >> x >> y;
  int k = 0;
    for (int i = 0;i < min(x, y) - 1; i++) {
  cout << i + 1 << endl;
  cout << -1 * (i + 1) << endl; 
      k = i;
}
  if(!(x == y)){
  if(x == 1){
    cout << -1 << endl;}
  if(y == 1){
    cout << 1 << endl;}  
  }
if(x > y){
  for (int s = k;s < x - 1; s++) {
  cout << s + 2 << endl;
}
  cout << -1 * (x + y) * (x - y + 1) / 2 << endl;
}
if(x < y){
  for (int s = k;s < y - 1; s++) {
  cout << -1 * (s + 2) << endl;
}
  cout << (x + y) * (y - x + 1) / 2 << endl;
}
if(x == y){
  cout << (k + 1) + 1 << endl;
  cout << -1 * (k + 1) - 1 << endl;
}
  
}




