#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m;
  scanf("%d %d", &n, &m);
  vector<vector<int> > v(n);
  for (int i = 0; i < n; i++) {
    v[i].resize(4);
  }
  int a = 1;
  for (int i = n - 1; i >= 0; i--) {
    v[i][0] = a;
    a += 2;
  }
  a = 2;
  for (int i = n - 1; i >= 0; i--) {
    v[i][3] = a;
    a += 2;
  }
  a--;
  int b = a + 1;
  for (int i = n - 1; i >= 0; i--) {
    v[i][1] = a;
    a += 2;
  }
  for (int i = n - 1; i >= 0; i--) {
    v[i][2] = b;
    b += 2;
  }
  vector<int> res;
  for (int i = n - 1; i >= 0; i--) {
    res.push_back(v[i][1]);
    res.push_back(v[i][0]);
    res.push_back(v[i][2]);
    res.push_back(v[i][3]);
  }
  for (int i = 0; i < res.size(); i++) {
    if (res[i] <= m) printf("%d ", res[i]);
  }
  printf("\n");
  return 0;
}
