#include <bits/stdc++.h>
using namespace std;
const int inf = 0x3f3f3f3f;
const int maxn = 1005;
int a[105][4], id[4] = {1, 0, 2, 3};
int main() {
  int n, m;
  scanf("%d%d", &n, &m);
  a[n][0] = 1;
  a[n][1] = n * 2 + 1;
  a[n][2] = n * 2 + 2;
  a[n][3] = 2;
  for (int i = n - 1; i >= 1; i--) {
    for (int j = 0; j < 4; j++) a[i][j] = a[i + 1][j] + 2;
  }
  vector<int> ans;
  for (int i = n; i >= 1; i--) {
    for (int j = 0; j < 4; j++) {
      int k = id[j];
      if (a[i][k] <= m) ans.push_back(a[i][k]);
    }
  }
  for (int i = 0; i < ans.size(); i++) {
    printf("%d", ans[i]);
    if (i < ans.size() - 1)
      printf(" ");
    else
      printf("\n");
  }
  return 0;
}
