#include <bits/stdc++.h>
using namespace std;
int a[101][5];
int main() {
  int i;
  int m, n;
  cin >> n >> m;
  a[1][1] = 1;
  a[1][2] = 2 * n + 1;
  a[1][3] = 2 * (n + 1);
  a[1][4] = 2;
  for (i = 2; i <= n; i++) {
    a[i][1] = a[i - 1][1] + 2;
    a[i][2] = a[i - 1][2] + 2;
    a[i][3] = a[i - 1][3] + 2;
    a[i][4] = a[i - 1][4] + 2;
  }
  for (i = 1; i <= n; i++) {
    if (a[i][2] <= m) printf("%d ", a[i][2]);
    if (a[i][1] <= m) printf("%d ", a[i][1]);
    if (a[i][3] <= m) printf("%d ", a[i][3]);
    if (a[i][4] <= m) printf("%d ", a[i][4]);
  }
  printf("\n");
  return 0;
}
