#include <iostream>
#include <algorithm>
#include <vector>
#include <map>
#include <cmath>
#include <set>
//#include <bits/stdc++.h>

using namespace std;

#define endl '\n'
#define all(v) v.begin(), v.end()
#define front(v) *v.begin()
#define back(v) *(--v.end())
#define len(v) v.size()
#define int long long

using longl = long long;
using longd = long double;

const longl INF = 1e9;
const longl LINF = 1e18;
const longl mod = 1e9 + 7;
const double PI = acos(-1);
//------------------------------------------------------------------------------------------------

longl divup(longl a, longl b){
    return (a + b - 1) / b;
}

longl bin_pow(longl a, longl b){
    longl res = 1;

    while (b > 0){
        if (b % 2)
            res = res * a % mod;

        a = a * a % mod;
        b /= 2;
    }
    return res;
}


//------------------------------------------------------------------------------------------------
int32_t main() {
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    cout.tie(nullptr);

    int a, b;
    cin >> a >> b;
    
    int n;
    int k;
    if (a > b) {
        n = a;
        k = 1;
    }
    else {
        n = b;
        k = -1;
    }

    int sum = 0;
    int sum2 = 0;
    vector<int> tmp;
    for (int i = 0; i < n; i++){
        cout << (i + 1) * k << ' ';
        sum += (i + 1) * k;

        if (i < min(a, b) - 1){
            cout << -((i + 1) * k) << ' ';
        }
        else {
            sum2 += (i + 1) * k;
        }
    }

    cout << -sum2;

    return 0;
}
#include<stdio.h>
#include <iostream>
#include <string>
#include<vector>

using namespace std;

int main()
{
    long A, B;
    cin >> A;
    cin >> B;

    long sum = 0;

    vector<long> Ea, Eb;

    int C;
    if (A<B)
    {
        for (int i = 1; i <= B; i++)
        {
            Eb.push_back(i*-1);
            if (i >= A)
                sum += i;
        }
        for (int i = 1; i <= A; i++)
        {
            if (i == A)
                Ea.push_back(sum);
            Ea.push_back(i);
        }
    }

    else if (A>B)
    {
        for (int i = 1; i <= A; i++)
        {
            Ea.push_back(i);
            if (i >= B)
                sum += i;
        }
        for (int i = 1; i <= B; i++)
        {
            if (i == B)
                Eb.push_back(sum*-1);
            Eb.push_back(i*-1);
        }
    }
    else
    {
        for (int i = 1; i <= A; i++)
        {
            Ea.push_back(i);
            Eb.push_back(i*-1);
        }
    }

    for (int i = 0; i < A; i++)
        cout << Ea[i] << " ";
    for (int i = 0; i < B; i++)
        cout << Eb[i] << " ";
    

    return 0;
}