#include <bits/stdc++.h>
using namespace std;
int a[111][4];
int n, m, x;
int main() {
  int order[4] = {1, 0, 2, 3};
  cin >> n >> m;
  int cnt = m;
  memset(a, -1, sizeof a);
  int x = 0;
  for (int i = 0; i < n && cnt; i++) {
    for (int j = 0; j < 2 && cnt; j++) {
      cnt--;
      a[i][j == 0 ? 0 : 3] = ++x;
    }
  }
  for (int i = 0; i < n && cnt; i++) {
    for (int j = 0; j < 2 && cnt; j++) {
      cnt--;
      a[i][j == 0 ? 1 : 2] = ++x;
    }
  }
  int ind = 1;
  vector<int> v;
  for (int i = 0; i < n && m; i++) {
    for (int j = 0; j < 4; j++) {
      if (a[i][order[j]] != -1) {
        v.push_back(a[i][order[j]]);
        m--;
      }
    }
  }
  for (int i = 0; i < v.size(); i++) {
    printf("%d ", v[i]);
  }
}
