#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int m;
  cin >> m;
  int v[n][4];
  int last1 = 1;
  for (int i = 0; i < n; i++) {
    v[i][0] = last1;
    last1++;
    v[i][3] = last1;
    last1++;
  }
  for (int i = 0; i < n; i++) {
    v[i][1] = last1;
    last1++;
    v[i][2] = last1;
    last1++;
  }
  for (int i = 0; i < n; i++) {
    if (v[i][1] <= m) cout << v[i][1] << " ";
    if (v[i][0] <= m) cout << v[i][0] << " ";
    if (v[i][2] <= m) cout << v[i][2] << " ";
    if (v[i][3] <= m) cout << v[i][3] << " ";
  }
  return 0;
}
