#include <bits/stdc++.h>
using namespace std;
int main(void) {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int n, m;
  cin >> n >> m;
  int arr[101][5];
  for (int i = 0; i < 101; i++) {
    for (int j = 0; j < 5; j++) arr[i][j] = 0;
  }
  int count = 1;
  for (int i = 1; i <= n; i++) {
    arr[i][1] = count;
    count++;
    if (count == m + 1) break;
    arr[i][4] = count;
    count++;
    if (count == m + 1) break;
  }
  for (int i = 1; i <= n; i++) {
    if (count == m + 1) break;
    arr[i][2] = count;
    count++;
    if (count == m + 1) break;
    arr[i][3] = count;
    count++;
  }
  for (int i = 1; i <= n; i++) {
    if (arr[i][2]) cout << arr[i][2] << " ";
    if (arr[i][1]) cout << arr[i][1] << " ";
    if (arr[i][3]) cout << arr[i][3] << " ";
    if (arr[i][4]) cout << arr[i][4] << " ";
  }
  return 0;
}
