#include <bits/stdc++.h>
using namespace std;
int gcd(int a, int b) {
  int c;
  while (a != 0) {
    c = a;
    a = b % a;
    b = c;
  }
  return b;
}
int main() {
  ios_base::sync_with_stdio(0);
  int n, m, b = 0;
  cin >> n >> m;
  vector<vector<int> > arr(n, vector<int>(4, 0));
  for (int i = 0; i < n; i++) {
    if (b < m) {
      b++;
      arr[i][0] = b;
    }
    if (b < m) {
      b++;
      arr[i][3] = b;
    }
  }
  for (int i = 0; i < n; i++) {
    if (b < m) {
      b++;
      arr[i][1] = b;
    }
    if (b < m) {
      b++;
      arr[i][2] = b;
    }
  }
  for (int i = 0; i < n; i++) {
    if (arr[i][1] != 0) cout << arr[i][1] << ' ';
    if (arr[i][0] != 0) cout << arr[i][0] << ' ';
    if (arr[i][2] != 0) cout << arr[i][2] << ' ';
    if (arr[i][3] != 0) cout << arr[i][3] << ' ';
  }
  return 0;
}
