#include <bits/stdc++.h>
using namespace std;
int a[109];
int b[109];
int c[109];
int d[109];
int main() {
  int n, m;
  while (cin >> n >> m) {
    int i(1);
    memset(a, 0, sizeof(a));
    memset(b, 0, sizeof(b));
    memset(c, 0, sizeof(c));
    memset(d, 0, sizeof(d));
    for (int j(1); j <= n && i <= m; j++, i += 2) {
      if (i == m) {
        a[j] = i;
      } else {
        a[j] = i;
        d[j] = i + 1;
      }
    }
    for (int j(1); j <= n && i <= m; j++, i += 2) {
      if (i == m) {
        b[j] = i;
      } else {
        b[j] = i;
        c[j] = i + 1;
      }
    }
    int j(1);
    if (b[j] != 0) {
      cout << b[j];
      cout << " " << a[j];
      if (c[j] != 0)
        cout << " " << c[j] << " " << d[j];
      else {
        if (d[j] != 0) cout << " " << d[j];
      }
    } else {
      cout << a[j];
      if (c[j] != 0)
        cout << " " << c[j] << " " << d[j];
      else {
        if (d[j] != 0) cout << " " << d[j];
      }
    }
    for (j++; a[j] != 0; j++) {
      if (b[j] != 0) cout << " " << b[j];
      cout << " " << a[j];
      if (c[j] != 0) cout << " " << c[j];
      if (d[j] != 0) cout << " " << d[j];
    }
    cout << endl;
  }
  return 0;
}
