#include <bits/stdc++.h>
using namespace std;
int main() {
  long long u, d, i, j;
  while (cin >> u >> d) {
    vector<long long> v1, v2;
    if (u == 1 && d == 1) {
      cout << 3 << " " << 1 << " " << 2 << endl;
      return 0;
    }
    if (u == 0) {
      for (i = (u + d + 1); i >= 1; i--) cout << i << endl;
    } else if (d == 0) {
      for (i = 1; i <= (u + d + 1); i++) cout << i << endl;
    } else if (u > d) {
      long long u1 = u + 1;
      long long d1 = ((u + d) + 1 - d);
      for (i = (u + d + 1); i > u1; i--) cout << i << endl;
      for (i = 1; i <= u1; i++) cout << i << endl;
    } else if (d > u) {
      d = d + 1;
      u = ((u + d) + 1 - d);
      for (i = d; i >= 1; i--) cout << i << endl;
      for (i = d + 1; i <= d + u - 1; i++) cout << i << endl;
    } else if (u == d) {
      long long n = (u + d + 1);
      for (i = 1; i <= n; i++) {
        if (i % 2 != 0) {
          v1.push_back(i);
        } else
          v2.push_back(i);
      }
      long long ct1 = 0;
      long long ct2 = v2.size() - 1;
      long long c = 1;
      if (u % 2 == 0) {
        for (i = 1; i <= n; i++) {
          if (i % 2 != 0) {
            cout << v1[ct1] << endl;
            ct1++;
          } else {
            cout << v2[ct2] << endl;
            ct2--;
          }
        }
      } else {
        cout << v1[v1.size() - 1] << endl;
        for (i = 1; i <= n; i++) {
          if (i % 2 != 0) {
            if (ct1 == v1.size() - 1) {
              continue;
            }
            cout << v1[ct1] << endl;
            ct1++;
          } else {
            cout << v2[ct2] << endl;
            ct2--;
          }
        }
      }
    }
  }
}
