#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m;
  cin >> n >> m;
  int count = 1;
  vector<int> lw;
  vector<int> rw;
  while (count <= m && lw.size() < n) {
    lw.push_back(count++);
    if (count <= m) rw.push_back(count++);
  }
  vector<int> lnw;
  vector<int> rnw;
  while (count <= m && lnw.size() < n) {
    lnw.push_back(count++);
    if (count <= m) rnw.push_back(count++);
  }
  count = m;
  int a = 0, b = 0, c = 0, d = 0;
  while (count) {
    if (a < lnw.size()) {
      cout << lnw[a] << " ";
      a++;
      count--;
    }
    if (b < lw.size() && count != 0) {
      cout << lw[b] << " ";
      b++;
      count--;
    }
    if (c < rnw.size() && count != 0) {
      cout << rnw[c] << " ";
      c++;
      count--;
    }
    if (d < rw.size() && count != 0) {
      cout << rw[d] << " ";
      d++;
      count--;
    }
  }
}
