#include <bits/stdc++.h>
using namespace std;
int a[2228][28];
int main() {
  int n, m;
  scanf("%d %d", &n, &m);
  int x = 1, p = 1;
  int i = 1;
  while (i <= m && x <= n) {
    a[x][p] = i;
    if (p == 1) {
      p = 4;
    } else {
      p = 1;
      x++;
    }
    i++;
  }
  x = 1, p = 2;
  while (i <= m && x <= n) {
    a[x][p] = i;
    if (p == 2) {
      p = 3;
    } else {
      p = 2;
      x++;
    }
    i++;
  }
  for (int i = 1; i <= n; ++i) {
    if (a[i][2] != 0) {
      cout << a[i][2] << ' ';
    }
    if (a[i][1] != 0) {
      cout << a[i][1] << ' ';
    }
    if (a[i][3] != 0) {
      cout << a[i][3] << ' ';
    }
    if (a[i][4] != 0) {
      cout << a[i][4] << ' ';
    }
  }
  cout << endl;
  return 0;
}
