#include <bits/stdc++.h>
using namespace std;
void next(int &x) {
  switch (x) {
    case 0: {
      x = 2;
      break;
    }
    case 1: {
      x = 0;
      break;
    }
    case 2: {
      x = 3;
      break;
    }
    case 3: {
      x = 1;
      break;
    }
  }
}
int main() {
  int n, m;
  cin >> n >> m;
  queue<int> q[4];
  if (m <= n * 2) {
    int fl = 1;
    for (int i = 1; i <= m; i++) {
      if (fl) {
        q[0].push(i);
        fl = 0;
      } else {
        q[3].push(i);
        fl = 1;
      }
    }
    fl = 1;
    for (int i = 1; i <= m; i++) {
      if (fl) {
        cout << q[0].front() << " ";
        q[0].pop();
        fl = 0;
      } else {
        cout << q[3].front() << " ";
        q[3].pop();
        fl = 1;
      }
    }
  } else {
    int fl = 1;
    for (int i = 1; i <= n * 2; i++) {
      if (fl) {
        q[0].push(i);
        fl = 0;
      } else {
        q[3].push(i);
        fl = 1;
      }
    }
    for (int i = n * 2 + 1; i <= m; i++) {
      if (fl) {
        q[1].push(i);
        fl = 0;
      } else {
        q[2].push(i);
        fl = 1;
      }
    }
    fl = 1;
    for (int i = 1; i <= m; i++) {
      while (q[fl].empty()) next(fl);
      cout << q[fl].front() << " ";
      q[fl].pop();
      next(fl);
    }
  }
  return 0;
}
