#include <bits/stdc++.h>
using namespace std;
int b[110][5];
int main(void) {
  cin.tie(0);
  ios_base::sync_with_stdio(false);
  int n, m, i;
  cin >> n >> m;
  int p = -1;
  for (i = 1; i <= m; i += 2) {
    int x = i % 2, y = i / 2;
    if (y == n) {
      p = i;
      break;
    } else {
      b[y + 1][x] = i;
      if (i + 1 <= m) b[y + 1][x + 3] = i + 1;
    }
  }
  if (p != -1) {
    for (i = p; i <= m; i += 2) {
      int x = i % 2, y = (i - p + 1) / 2;
      b[y + 1][x + 1] = i;
      if (i + 1 <= m) b[y + 1][x + 2] = i + 1;
    }
  }
  vector<int> v;
  for (i = 1; i <= n; i++) {
    if (b[i][2] != 0) v.push_back(b[i][2]);
    if (b[i][1] != 0) v.push_back(b[i][1]);
    if (b[i][3] != 0) v.push_back(b[i][3]);
    if (b[i][4] != 0) v.push_back(b[i][4]);
  }
  for (i = 0; i < m; i++) cout << v[i] << ' ';
  cout << endl;
  return 0;
}
