// #define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
// #include<atcoder/all>
using namespace std;
// using namespace atcoder;
using ll=long long;
template<class T,class U> inline bool chmin(T&x,U y){if(x>y){x=y;return true;}return false;}
template<class T,class U> inline bool chmax(T&x,U y){if(x<y){x=y;return true;}return false;}
#define rep(i, n) for (int i = 0; i < (int)(n); i++)

// const ll INF = 1LL << 60;


int main() {
  int a,b;cin>>a>>b;
  if(a<b) {
    rep(i, b) cout << -1 *(i+1) << " ";
    rep(i, a-1) cout << 1 *(i+1) << " ";
    int sum = 0;
    for(int i = a; i <= b; i++) sum += i;
    cout << sum << endl;
  } else {
    rep(i, b-1) cout << -1 *(i+1) << " ";
    rep(i, a) cout << 1 *(i+1) << " ";
    int sum = 0;
    for(int i = b; i <= a; i++) sum += i;
    cout << -1*sum << endl;
  }

  return 0;
}
#include <bits/stdc++.h>
using namespace std;
typedef long long LL;
int main(void)
{
    LL  A,B;
    cin>>A>>B;
    LL ans=0;
    LL maxx=max(A,B);
    LL minn=min(A,B);
    for(LL  i=1;i<=minn-1;i++)
    {
        cout<<i<<' '<<-i<<' ';
    }
    if(A>B)
    {
        for(LL  i=minn;i<=maxx;i++)
        {
            cout<<i<<' ';
            ans=ans+i;
        }
        cout<<-ans<<' ';
        return 0;
    }
    else
    {
        for(LL  i=minn;i<=maxx;i++)
        {
            cout<<-i<<' ';
            ans=ans-i;
        }
        cout<<-ans<<' ';
        return 0;
    }
    return 0;
}
