#include <bits/stdc++.h>
using namespace std;
class problem {
 public:
  void idea() {
    input();
    on();
    off();
  }

 private:
  int rows, peoples;
  int **bus, *order;
  void input() {
    scanf("%i %i", &rows, &peoples);
    bus = new int *[rows + 1];
    for (int i = 1; i <= rows; i++) bus[i] = new int[(4 + 1)];
    for (int i = 1; i <= rows; i++)
      for (int j = 1; j <= 4; j++) bus[i][j] = 0;
    order = new int[peoples + 1];
  }
  int on() {
    int pass = 1;
    for (int i = 1; i <= rows; i++) {
      if (pass % 2 != 0) bus[i][1] = pass++;
      if (pass > peoples) return 0;
      if (pass % 2 == 0) bus[i][4] = pass++;
      if (pass > peoples) return 0;
    }
    for (int i = 1; i <= rows; i++) {
      if (pass % 2 != 0) bus[i][2] = pass++;
      if (pass > peoples) return 0;
      if (pass % 2 == 0) bus[i][3] = pass++;
      if (pass > peoples) return 0;
    }
    return 0;
  }
  void off() {
    int out = 1;
    for (int i = 1; i <= rows; i++) {
      if (bus[i][2] != 0) order[out++] = bus[i][2];
      if (out > peoples) break;
      if (bus[i][1] != 0) order[out++] = bus[i][1];
      if (out > peoples) break;
      if (bus[i][3] != 0) order[out++] = bus[i][3];
      if (out > peoples) break;
      if (bus[i][4] != 0) order[out++] = bus[i][4];
      if (out > peoples) break;
    }
    for (int i = 1; i <= peoples; i++) cout << order[i] << " ";
    cout << endl;
  }
};
int main() {
  problem test;
  test.idea();
  return 0;
}
