#include <bits/stdc++.h>
using namespace std;
pair<pair<int, int>, pair<int, int> > p[105];
int main() {
  int n, m;
  cin >> n >> m;
  int count = 1;
  if (m == 1) {
    cout << 1;
    return 0;
  }
  for (int i = 1; i <= n; i++) {
    if (count < m) {
      p[i].first.first = count;
      count++;
      p[i].second.second = count;
      count++;
    } else if (count == m) {
      p[i].first.first = count;
      count++;
      break;
    }
  }
  for (int i = 1; i <= n; i++) {
    if (count < m) {
      p[i].first.second = count;
      count++;
      p[i].second.first = count;
      count++;
    } else if (count == m) {
      p[i].first.second = count;
      count++;
      break;
    }
  }
  for (int i = 1; i <= n; i++) {
    if (p[i].first.second != 0) cout << p[i].first.second << " ";
    if (p[i].first.first != 0) cout << p[i].first.first << " ";
    if (p[i].second.first != 0) cout << p[i].second.first << " ";
    if (p[i].second.second) cout << p[i].second.second << " ";
  }
}
