#include <bits/stdc++.h>
using namespace std;
const int N = 105;
int answer[N][4];
int main() {
  int n, m;
  cin >> n >> m;
  int k = 0;
  for (int i = 1; i <= n; ++i) {
    if (k == m) break;
    answer[i][0] = ++k;
    if (k == m) break;
    answer[i][3] = ++k;
  }
  for (int i = 1; i <= n; ++i) {
    if (k == m) break;
    answer[i][1] = ++k;
    if (k == m) break;
    answer[i][2] = ++k;
  }
  for (int i = 1; i <= n; ++i) {
    if (answer[i][1]) cout << answer[i][1] << ' ';
    if (answer[i][0]) cout << answer[i][0] << ' ';
    if (answer[i][2]) cout << answer[i][2] << ' ';
    if (answer[i][3]) cout << answer[i][3] << ' ';
  }
}
