#include <bits/stdc++.h>
using namespace std;
pair<long long, long long> a[1111];
pair<long long, long long> b[1111];
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(NULL);
  cout.tie(NULL);
  long long n, m, t = 1, k = 1;
  cin >> n >> m;
  for (long long i = 1; i <= 2 * n; i += 2) {
    if (i <= m) a[k].first = i;
    if (i + 1 <= m) b[k].second = i + 1;
    if (2 * n + i <= m) a[k].second = 2 * n + i;
    if (2 * n + i + 1 <= m) b[k].first = 2 * n + i + 1;
    k++;
  }
  for (long long i = 1; i <= n; i++) {
    if (a[i].second != 0) cout << a[i].second << ' ';
    if (a[i].first != 0) cout << a[i].first << ' ';
    if (b[i].first != 0) cout << b[i].first << ' ';
    if (b[i].second != 0) cout << b[i].second << ' ';
  }
  return 0;
}
