#include <bits/stdc++.h>
using namespace std;
const long long oo = 0x3f3f3f3f3f3f3f3f;
const double eps = 1e-9;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(nullptr);
  int n, m;
  cin >> n >> m;
  vector<vector<long long> > bus =
      vector<vector<long long> >(n, vector<long long>(4));
  for (long long i = (0); i < (m); i++) {
    if (i < 2 * n) {
      bus[i / 2][(i % 2) * 3] = i + 1;
    } else {
      int j = i - n * 2;
      bus[j / 2][(j % 2) * 1 + 1] = i + 1;
    }
  }
  for (long long i = (0); i < (n); i++) {
    ({
      if (bus[i][1]) cout << bus[i][1] << " ";
    });
    ({
      if (bus[i][0]) cout << bus[i][0] << " ";
    });
    ({
      if (bus[i][2]) cout << bus[i][2] << " ";
    });
    ({
      if (bus[i][3]) cout << bus[i][3] << " ";
    });
  }
  return 0;
}
