#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, m, a[105][105];
  while (scanf("%d%d", &n, &m) != EOF) {
    int temp = 1;
    memset(a, 0, sizeof(a));
    for (int i = 1; i <= n; i++) {
      if (temp > m) break;
      a[1][i] = temp++;
      if (temp > m) break;
      a[4][i] = temp++;
    }
    for (int i = 1; i <= n; i++) {
      if (temp > m) break;
      a[2][i] = temp++;
      if (temp > m) break;
      a[3][i] = temp++;
    }
    for (int j = 1; j <= n; j++) {
      for (int i = 2; i >= 1; i--) {
        if (a[i][j] != 0) {
          printf("%d ", a[i][j]);
        }
      }
      for (int i = 3; i <= 4; i++) {
        if (a[i][j] != 0) {
          printf("%d ", a[i][j]);
        }
      }
    }
    puts("");
  }
  return 0;
}
