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