#include <bits/stdc++.h>
using namespace std;
int main() {
  int lw[110], rw[110], ls[110], rs[110];
  memset(lw, 0, sizeof(lw));
  memset(rw, 0, sizeof(rw));
  memset(ls, 0, sizeof(ls));
  memset(rs, 0, sizeof(rs));
  int n, m;
  scanf("%d%d", &n, &m);
  int k = 1;
  int i = 0;
  for (; k <= m; k++) {
    lw[i] = k;
    k++;
    if (k > m) break;
    rw[i] = k;
    i++;
    if (i == n) break;
  }
  i = 0;
  k++;
  for (; k <= m; k++) {
    ls[i] = k;
    k++;
    if (k > m) break;
    rs[i] = k;
    i++;
    if (i == n) break;
  }
  for (int i = 0; i < n; i++) {
    if (ls[i]) cout << ls[i] << ' ';
    if (lw[i]) cout << lw[i] << ' ';
    if (rs[i]) cout << rs[i] << ' ';
    if (rw[i]) cout << rw[i] << ' ';
  }
  return 0;
}
