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