#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 5;
const long long int MOD = 1e9 + 7;
const long long int INV2 = 500000004;
int A[N][4];
int main(int argc, char const *argv[]) {
  cin.sync_with_stdio(0);
  cin.tie(0);
  int n, m;
  cin >> n >> m;
  int v = 1;
  for (int i = 1; i <= n; i++) {
    A[i][0] = v++;
    A[i][3] = v++;
  }
  for (int i = 1; i <= n; i++) {
    A[i][1] = v++;
    A[i][2] = v++;
  }
  for (int i = 1; i <= n; i++) {
    if (A[i][1] <= m) cout << A[i][1] << ' ';
    if (A[i][0] <= m) cout << A[i][0] << ' ';
    if (A[i][2] <= m) cout << A[i][2] << ' ';
    if (A[i][3] <= m) cout << A[i][3] << ' ';
  }
  return 0;
}
