#include <bits/stdc++.h>
using namespace std;
int n, m, a[10][110], b[410];
int main() {
  while (~scanf("%d%d", &n, &m)) {
    memset(a, 0, sizeof(a));
    for (int i = 1; i <= min(m, 2 * n); i++) {
      if (i & 1) {
        a[1][(i + 1) >> 1] = i;
      } else {
        a[4][i >> 1] = i;
      }
    }
    for (int i = 2 * n + 1; i <= m; i++) {
      if (i & 1) {
        a[2][(i - 2 * n + 1) >> 1] = i;
      } else {
        a[3][(i - 2 * n) >> 1] = i;
      }
    }
    int cnt = 0;
    for (int i = 1; i <= n; i++) {
      if (a[2][i]) b[cnt++] = a[2][i];
      if (a[1][i]) b[cnt++] = a[1][i];
      if (a[3][i]) b[cnt++] = a[3][i];
      if (a[4][i]) b[cnt++] = a[4][i];
    }
    for (int i = 0; i < cnt - 1; i++) printf("%d ", b[i]);
    printf("%d\n", b[cnt - 1]);
  }
  return 0;
}
