#include <bits/stdc++.h>
int s[105][5], o[4] = {1, 0, 2, 3};
int main() {
  memset(s, -1, sizeof s);
  int n, m, p = 0, q, i, j;
  scanf("%d%d", &n, &m), q = n < m ? n : m;
  for (i = 1; i <= 2 * n && i <= m; ++i)
    if (i & 1)
      s[(i + 1) / 2][0] = i;
    else
      s[(i + 1) / 2][3] = i;
  for (; i <= 4 * n && i <= m; ++i)
    if (i & 1)
      s[(i + 1 - 2 * n) / 2][1] = i;
    else
      s[(i + 1 - 2 * n) / 2][2] = i;
  for (i = 1; i <= n; ++i)
    for (j = 0; j < 4; ++j)
      if (s[i][o[j]] > -1) {
        if (p)
          putchar(' ');
        else
          p = 1;
        printf("%d", s[i][o[j]]);
      }
  puts("");
  return 0;
}
