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


int main() {
    int a,b;
    cin >> a >> b;
    if (a == b) {
        for (int i=0; i<a; i++) {
            int e_i = i+1;
            cout << e_i << " " << -1*e_i ;
            if (i != a-1) cout << " ";  

        }
    } else {
        int s = a > b ? 1 : -1;

        int sum = 0;
        for (int i=0; i<max(a,b); i++) {
            cout << s*(i+1) << " ";
            sum = sum + i+1;
        }
        int n = min(a,b);
        // cout << sum << endl;
        int k = sum/n;
        int w = n/2;
        int r = sum%n;
        // cout << k << " "<< w <<" "<< r << endl;
        for (int i=k+w; i>=k-w; i--) {
            // cout << i << endl;
            if (n%2==0 && i == k) continue;
            int e_i = i;
            if (r>0) {
                e_i++;
                r--;
            }
            e_i = -1 * s * e_i;
            cout << e_i;
            if (i != k-w)
            cout << " ";
        }
    }
    cout << endl;
    return 0;
}
#include <bits/stdc++.h>

using namespace std;


int main()
{
    int a, b, suma = 0;
    cin >> a >> b;
    for (int i = 0; i < a; i++)
    {
        cout << 1000000 - i << " ";
        suma += 1000000 - i;
    }
    for (int i = 1; i < b; i++)
    {
        cout << -i << " ";
        suma -= i;
    }
    cout << -suma << endl;
}
