#include <bits/stdc++.h>
using namespace std;
int main() {
  long long i, j, l, u, v, w, x, y, z, a, b, c, d, e, f, t = 1, tc;
  long long flg, sz, cnt, gt, ans, mx, mn, id;
  long long m, k, n;
  long long low, hi, md, inp[2007][5], sm, ff, tk[10];
  cin >> n >> m;
  id = 1;
  for (i = 1; i <= n; i++) inp[i][1] = id, id += 2;
  id = 2;
  for (i = 1; i <= n; i++) inp[i][4] = id, id += 2;
  id = 2 * n + 1;
  for (i = 1; i <= n; i++) inp[i][2] = id, id += 2;
  id = 2 * n + 2;
  for (i = 1; i <= n; i++) inp[i][3] = id, id += 2;
  for (i = 1; i <= n; i++) {
    if (inp[i][2] <= m) cout << inp[i][2] << " ";
    if (inp[i][1] <= m) cout << inp[i][1] << " ";
    if (inp[i][3] <= m) cout << inp[i][3] << " ";
    if (inp[i][4] <= m) cout << inp[i][4] << " ";
  }
  return 0;
}
