#include <bits/stdc++.h>
using namespace std;
int seat[102][4];
int n, m;
void MakeSeat() {
  int num = 1, d_num = 2 * n + 1;
  if (m > 2 * n) {
    for (int i = 1; i <= n; i++) {
      seat[i][0] = num++;
      seat[i][3] = num++;
      if (d_num <= m) seat[i][1] = d_num++;
      if (d_num <= m) seat[i][2] = d_num++;
    }
  } else {
    for (int i = 1; i <= n && num <= m; i++) {
      if (num <= m) seat[i][0] = num++;
      if (num <= m) seat[i][3] = num++;
    }
  }
}
void Print() {
  int ret = 0;
  for (int i = 1; i <= n; i++) {
    if (seat[i][1]) {
      if (ret) printf(" ");
      ret = 1;
      printf("%d", seat[i][1]);
    }
    if (seat[i][0]) {
      if (ret) printf(" ");
      ret = 1;
      printf("%d", seat[i][0]);
    }
    if (seat[i][2]) {
      if (ret) printf(" ");
      ret = 1;
      printf("%d", seat[i][2]);
    }
    if (seat[i][3]) {
      if (ret) printf(" ");
      ret = 1;
      printf("%d", seat[i][3]);
    }
  }
  printf("\n");
}
int main() {
  while (~scanf("%d%d", &n, &m)) {
    memset(seat, 0, sizeof(seat));
    MakeSeat();
    Print();
  }
  return 0;
}
