#include <bits/stdc++.h>
int seat[120][5];
int out[4] = {1, 0, 2, 3};
int min(int a, int b) { return a > b ? b : a; }
int main() {
  int n, m;
  scanf("%d%d", &n, &m);
  memset(seat, 0, sizeof(seat));
  int fh = min(n * 2, m);
  for (int i = 0; i < fh; i++) {
    int row = i / 2 + 1;
    int col = i % 2 == 0 ? 0 : 3;
    seat[row][col] = i + 1;
  }
  for (int i = fh; i < m; i++) {
    int pos = i - 2 * n;
    int row = pos / 2 + 1;
    int col = pos % 2 == 0 ? 1 : 2;
    seat[row][col] = i + 1;
  }
  for (int i = 1; i <= n; i++) {
    for (int j = 0; j < 4; j++) {
      int person = seat[i][out[j]];
      if (person > 0) {
        printf("%d ", person);
      }
    }
  }
  return 0;
}
