#include <bits/stdc++.h>
using namespace std;
const long double EPS = 1e-9;
const long double PI = atan(1) * 4;
const long long M = 1000000007;
struct PT {
  double x, y;
  PT() {}
  PT(double x, double y) : x(x), y(y) {}
  PT(const PT &p) : x(p.x), y(p.y) {}
  PT operator+(const PT &p) const { return PT(x + p.x, y + p.y); }
  PT operator-(const PT &p) const { return PT(x - p.x, y - p.y); }
  PT operator*(double c) const { return PT(x * c, y * c); }
  PT operator/(double c) const { return PT(x / c, y / c); }
};
double dot(PT p, PT q) { return p.x * q.x + p.y * q.y; }
double dist2(PT p, PT q) { return dot(p - q, p - q); }
double cross(PT p, PT q) { return p.x * q.y - p.y * q.x; }
double cos_u2v(const PT &u, const PT &v) {
  return dot(u, v) / sqrt(dot(u, u) * dot(v, v));
}
double sin_u2v(const PT &u, const PT &v) {
  return cross(u, v) / sqrt(dot(u, u) * dot(v, v));
}
ostream &operator<<(ostream &os, const PT &p) {
  os << "(" << p.x << "," << p.y << ")";
}
double vector2angle(const PT &v) { return atan2(v.y, v.x); }
struct UnionFind {
  vector<long long> C;
  UnionFind(long long n) : C(n) {
    for (int i = 0; i < n; i++) C[i] = i;
  }
  long long find(long long x) { return (C[x] == x) ? x : C[x] = find(C[x]); }
  void merge(long long x, long long y) { C[find(x)] = find(y); }
};
long long mod(long long x, long long m) { return ((x % m) + m) % m; }
long long gcd(long long a, long long b) {
  for (; b > 0; swap(a, b)) a %= b;
  return a;
}
long long extended_euclid(long long a, long long b, long long &x,
                          long long &y) {
  long long xx = y = 0;
  long long yy = x = 1;
  while (b) {
    long long q = a / b;
    long long t = b;
    b = a % b;
    a = t;
    t = xx;
    xx = x - q * xx;
    x = t;
    t = yy;
    yy = y - q * yy;
    y = t;
  }
  return a;
}
long long mod_inverse(long long a, long long n) {
  long long x, y;
  long long d = extended_euclid(a, n, x, y);
  if (d > 1) return -1;
  return mod(x, n);
}
long long discretize(vector<long long> &x) {
  set<long long> avset(x.begin(), x.end());
  map<long long, long long> vmap;
  long long dn = 0;
  for (auto it = avset.begin(); it != avset.end(); it++) vmap[*it] = dn++;
  for (long long i = 0, n = x.size(); i < n; i++) x[i] = vmap[x[i]];
  return dn;
}
struct LPSolver {
  int m, n;
  vector<long long> B, N;
  vector<vector<long double>> D;
  LPSolver(const vector<vector<long double>> &A, const vector<long double> &b,
           const vector<long double> &c)
      : m(b.size()),
        n(c.size()),
        N(n + 1),
        B(m),
        D(m + 2, vector<long double>(n + 2)) {
    for (int i = 0; i < m; i++)
      for (int j = 0; j < n; j++) D[i][j] = A[i][j];
    for (int i = 0; i < m; i++) {
      B[i] = n + i;
      D[i][n] = -1;
      D[i][n + 1] = b[i];
    }
    for (int j = 0; j < n; j++) {
      N[j] = j;
      D[m][j] = -c[j];
    }
    N[n] = -1;
    D[m + 1][n] = 1;
  }
  void Pivot(int r, int s) {
    for (int i = 0; i < m + 2; i++)
      if (i != r)
        for (int j = 0; j < n + 2; j++)
          if (j != s) D[i][j] -= D[r][j] * D[i][s] / D[r][s];
    for (int j = 0; j < n + 2; j++)
      if (j != s) D[r][j] /= D[r][s];
    for (int i = 0; i < m + 2; i++)
      if (i != r) D[i][s] /= -D[r][s];
    D[r][s] = 1.0 / D[r][s];
    swap(B[r], N[s]);
  }
  bool Simplex(int phase) {
    int x = phase == 1 ? m + 1 : m;
    while (true) {
      int s = -1;
      for (int j = 0; j <= n; j++) {
        if (phase == 2 && N[j] == -1) continue;
        if (s == -1 || D[x][j] < D[x][s] || D[x][j] == D[x][s] && N[j] < N[s])
          s = j;
      }
      if (D[x][s] > -EPS) return true;
      int r = -1;
      for (int i = 0; i < m; i++) {
        if (D[i][s] < EPS) continue;
        if (r == -1 || D[i][n + 1] / D[i][s] < D[r][n + 1] / D[r][s] ||
            (D[i][n + 1] / D[i][s]) == (D[r][n + 1] / D[r][s]) && B[i] < B[r])
          r = i;
      }
      if (r == -1) return false;
      Pivot(r, s);
    }
  }
  long double solve(vector<long double> &x) {
    int r = 0;
    for (int i = 1; i < m; i++)
      if (D[i][n + 1] < D[r][n + 1]) r = i;
    if (D[r][n + 1] < -EPS) {
      Pivot(r, n);
      if (!Simplex(1) || D[m + 1][n + 1] < -EPS)
        return -numeric_limits<long double>::infinity();
      for (int i = 0; i < m; i++)
        if (B[i] == -1) {
          int s = -1;
          for (int j = 0; j <= n; j++)
            if (s == -1 || D[i][j] < D[i][s] ||
                D[i][j] == D[i][s] && N[j] < N[s])
              s = j;
          Pivot(i, s);
        }
    }
    if (!Simplex(2)) return numeric_limits<long double>::infinity();
    x = vector<long double>(n);
    for (int i = 0; i < m; i++)
      if (B[i] < n) x[B[i]] = D[i][n + 1];
    return D[m][n + 1];
  }
};
void buildadjlist(long long n, const vector<long long> &froms,
                  const vector<long long> &tos, vector<long long> &v2e0,
                  vector<long long> &e2n) {
  v2e0.resize(n);
  v2e0.assign(n, -1);
  long long en = froms.size();
  e2n.resize(en);
  for (int i = 0; i < en; i++) {
    long long f = froms[i];
    long long t = tos[i];
    e2n[i] = v2e0[f];
    v2e0[f] = i;
  }
}
void dijkstra(const vector<long long> &v2e0, const vector<long long> &e2t,
              const vector<long long> &e2c, const vector<long long> &e2n,
              long long src, vector<long long> &dist, vector<long long> &prec) {
  long long n = v2e0.size();
  dist.resize(n);
  dist.assign(n, INT_MAX);
  prec.resize(n);
  prec.assign(n, -1);
  vector<bool> arr(n);
  long long sel = src;
  dist[sel] = 0;
  while (sel >= 0) {
    arr[sel] = true;
    for (long long i = v2e0[sel]; i >= 0; i = e2n[i]) {
      long long to = e2t[i];
      long long cost = e2c[i];
      if (!arr[to] && dist[to] > dist[sel] + cost) {
        dist[to] = dist[sel] + cost;
        prec[to] = sel;
      }
    }
    sel = -1;
    for (long long i = 0; i < n; i++)
      if (!arr[i] && (sel == -1 || dist[i] < dist[sel])) sel = i;
  }
}
void tarjan_dfs(long long v, long long &timer, long long &cn,
                vector<long long> &vtime, vector<long long> &rtime,
                const vector<long long> &v2e0, const vector<long long> &e2t,
                const vector<long long> &e2n, vector<long long> &v2c,
                stack<long long> &stk) {
  stk.push(v);
  rtime[v] = vtime[v] = timer++;
  for (long long i = v2e0[v]; i >= 0; i = e2n[i]) {
    long long w = e2t[i];
    if (vtime[w] == -1) {
      tarjan_dfs(w, timer, cn, vtime, rtime, v2e0, e2t, e2n, v2c, stk);
      rtime[v] = min(rtime[v], rtime[w]);
    } else if (v2c[w] == -1)
      rtime[v] = min(rtime[v], vtime[w]);
  }
  if (vtime[v] == rtime[v]) {
    while (true) {
      long long pv = stk.top();
      v2c[pv] = cn;
      stk.pop();
      if (pv == v) break;
    }
    cn++;
  }
}
void tarjan_strong(long long n, const vector<long long> &v2e0,
                   const vector<long long> &e2t, const vector<long long> &e2n,
                   vector<long long> &v2c) {
  v2c.assign(n, -1);
  vector<long long> vtime(n, -1);
  vector<long long> rtime(n, -1);
  stack<long long> stk;
  long long timer = 0, cn = 0;
  for (long long i = 0; i < n; i++) {
    if (vtime[i] >= 0) continue;
    tarjan_dfs(i, timer, cn, vtime, rtime, v2e0, e2t, e2n, v2c, stk);
  }
}
struct FordFulk {
  const vector<long long> &v2e0;
  const vector<long long> &e2f;
  const vector<long long> &e2t;
  const vector<long long> &e2c;
  const vector<long long> &e2n;
  long long s, t;
  FordFulk(const vector<long long> &_v2e0, const vector<long long> &_e2f,
           const vector<long long> &_e2t, const vector<long long> &_e2c,
           const vector<long long> &_e2n, long long _s, long long _t)
      : s(_s), t(_t), v2e0(_v2e0), e2f(_e2f), e2t(_e2t), e2c(_e2c), e2n(_e2n) {}
  long long _find_aug_path(const vector<long long> &v2e0,
                           const vector<long long> &e2f,
                           const vector<long long> &e2t,
                           const vector<long long> &e2c,
                           const vector<long long> &e2n, long long s,
                           long long t, vector<long long> &epath) {
    vector<long long> q2v;
    vector<long long> q2p;
    vector<long long> q2e;
    vector<long long> q2f;
    vector<bool> inq(v2e0.size(), false);
    q2v.push_back(s);
    q2p.push_back(-1);
    q2e.push_back(-1);
    q2f.push_back(INT_MAX);
    inq[s] = true;
    for (long long i = 0; i < q2v.size(); i++) {
      long long crt = q2v[i];
      long long f = q2f[i];
      for (long long j = v2e0[crt]; j != -1; j = e2n[j]) {
        long long to = e2t[j];
        long long rem = e2c[j];
        if (inq[to]) continue;
        if (rem <= 0) continue;
        q2v.push_back(to);
        q2p.push_back(i);
        q2e.push_back(j);
        q2f.push_back(min(f, rem));
        inq[to] = true;
      }
    }
    for (long long i = 0; i < q2v.size(); i++) {
      if (q2v[i] != t) continue;
      stack<long long> stk;
      for (long long j = i; j > 0; j = q2p[j]) {
        stk.push(q2e[j]);
      }
      while (!stk.empty()) {
        epath.push_back(stk.top());
        stk.pop();
      }
      return q2f[i];
    }
    return 0;
  }
  long long eval() {
    long long en = e2f.size();
    map<pair<long long, long long>, long long> rsd;
    for (long long i = 0; i < en; i++) {
      long long f = e2f[i];
      long long t = e2t[i];
      rsd[make_pair(f, t)] += e2c[i];
      rsd[make_pair(t, f)] += 0;
    }
    map<pair<long long, long long>, long long> nei;
    long long ren = 0;
    for (auto er : rsd) {
      nei[er.first] = ren++;
    }
    long long rvn = v2e0.size();
    vector<long long> rv2e0(rvn, -1);
    vector<long long> re2f(ren);
    vector<long long> re2t(ren);
    vector<long long> re2c(ren);
    vector<long long> re2n(ren);
    vector<long long> re2p(ren);
    long long rei = 0;
    for (auto er : rsd) {
      long long f = er.first.first;
      long long t = er.first.second;
      long long c = er.second;
      re2f[rei] = f;
      re2t[rei] = t;
      re2c[rei] = c;
      re2p[rei] = nei[make_pair(t, f)];
      re2n[rei] = rv2e0[f];
      rv2e0[f] = rei;
      ++rei;
    }
    long long sol = 0;
    vector<long long> epath;
    while (true) {
      epath.clear();
      long long res =
          _find_aug_path(rv2e0, re2f, re2t, re2c, re2n, s, t, epath);
      if (res == 0) break;
      for (auto ei : epath) {
        re2c[ei] -= res;
        re2c[re2p[ei]] += res;
      }
      sol += res;
    }
    return sol;
  }
};
template <typename T>
struct BIT1D {
  long long n;
  vector<T> v;
  T (*fnx)(long long, T);
  T (*fab)(T, T);
  long long rg(long long k) { return ((k ^ (k + 1)) + 1) / 2; }
  BIT1D(long long _n, T v0, T (*_fnx)(long long, T), T (*_fab)(T, T))
      : n(_n), v(_n), fnx(_fnx), fab(_fab) {
    for (long long i = 0; i < n; i++) v[i] = fnx(rg(i), v0);
  }
  void update(long long i, T v1) {
    for (; i < n; i += rg(i)) v[i] = fab(v[i], v1);
  }
  T query(long long i) {
    long long j = i - rg(i);
    return (j < 0) ? v[i] : (query(j) + v[i]);
  }
};
template <typename T>
struct LazySegTree1D {
  vector<T> v;
  vector<long long> opr;
  vector<T> opd;
  vector<long long> nxt;
  long long LEFT;
  long long RGHT;
  T (*fnx)(long long, T);
  T (*fab)(T, T);
  LazySegTree1D(long long _l, long long _r, T _v, T (*_fnx)(long long, T),
                T (*_fab)(T, T))
      : v(1), opr(1), opd(1), nxt(1), LEFT(_l), RGHT(_r), fnx(_fnx), fab(_fab) {
    v[0] = fnx(RGHT - LEFT + 1, _v);
    opr[0] = 0;
    opd[0] = _v;
    nxt[0] = -1;
  }
  void _split(long long i, long long l0, long long r0) {
    assert(nxt[i] == -1);
    assert(opr[i] == 0);
    assert(l0 < r0);
    long long n = v.size();
    nxt[i] = n;
    long long m0 = (l0 + r0) / 2;
    v.push_back(fnx(m0 - l0 + 1, opd[i]));
    v.push_back(fnx(r0 - m0, opd[i]));
    opr.push_back(0);
    opr.push_back(0);
    opd.push_back(opd[i]);
    opd.push_back(opd[i]);
    nxt.push_back(-1);
    nxt.push_back(-1);
  }
  void _pushdown(long long i, long long l0, long long r0) {
    if (opr[i] == -1) return;
    long long m0 = (l0 + r0) / 2;
    if (nxt[i] == -1)
      _split(i, l0, r0);
    else if (opr[i] >= 0) {
      _set(nxt[i], l0, m0, l0, m0, opr[i], opd[i]);
      _set(nxt[i] + 1, m0 + 1, r0, m0 + 1, r0, opr[i], opd[i]);
    }
    opr[i] = -1;
  }
  void _set(long long i, long long l0, long long r0, long long l1, long long r1,
            long long o1, T v1) {
    assert(l1 >= l0 && r1 <= r0);
    if (l0 == l1 && r0 == r1) {
      if (o1 == 0) {
        v[i] = fnx(r0 - l0 + 1, v1);
        opr[i] = 0;
        opd[i] = v1;
      } else if (o1 == 1) {
        v[i] = fab(v[i], fnx(r0 - l0 + 1, v1));
        if (opr[i] == -1) {
          opr[i] = 1;
          opd[i] = v1;
        } else if (opr[i] == 0) {
          opr[i] = 0;
          opd[i] = fab(opd[i], v1);
        } else if (opr[i] == 1) {
          opr[i] = 1;
          opd[i] = fab(opd[i], v1);
        }
      }
      return;
    }
    long long m0 = (l0 + r0) / 2;
    _pushdown(i, l0, r0);
    if (l1 <= m0) _set(nxt[i], l0, m0, l1, min(r1, m0), o1, v1);
    if (r1 > m0) _set(nxt[i] + 1, m0 + 1, r0, max(l1, m0 + 1), r1, o1, v1);
    v[i] = fab(v[nxt[i]], v[nxt[i] + 1]);
  }
  T _get(long long i, long long l0, long long r0, long long l1, long long r1) {
    assert(l0 <= l1 && r1 <= r0);
    if (l0 == l1 && r1 == r0) return v[i];
    _pushdown(i, l0, r0);
    long long m0 = (l0 + r0) / 2;
    if (r1 <= m0) return _get(nxt[i], l0, m0, l1, r1);
    if (m0 + 1 <= l1) return _get(nxt[i] + 1, m0 + 1, r0, l1, r1);
    T lv = _get(nxt[i], l0, m0, l1, m0);
    T rv = _get(nxt[i] + 1, m0 + 1, r0, m0 + 1, r1);
    return fab(lv, rv);
  }
  void updres(long long l1, long long r1, T v1) {
    _set(0, LEFT, RGHT, l1, r1, 1, v1);
  }
  void setval(long long l1, long long r1, T v1) {
    _set(0, LEFT, RGHT, l1, r1, 0, v1);
  }
  T get(long long l1, long long r1) { return _get(0, LEFT, RGHT, l1, r1); }
};
void suffix_array(const string &s, vector<long long> &sa,
                  vector<long long> &rank) {
  long long n = s.size();
  long long ri = 0;
  vector<vector<long long>> tmprank(2, vector<long long>(n));
  vector<pair<pair<long long, long long>, long long>> kni(n);
  for (long long g = 1; g / 2 <= n - 1; g *= 2, ri = 1 - ri) {
    for (long long i = 0; i < n; i++) {
      long long key1 = (g == 1) ? s[i] : tmprank[ri][i];
      long long key2 = (g == 1)          ? 0
                       : (i + g / 2 < n) ? (tmprank[ri][i + g / 2])
                                         : -1;
      kni[i] = make_pair(make_pair(key1, key2), i);
    }
    sort(kni.begin(), kni.end());
    for (long long i = 0, last_rank = -1; i < n; i++) {
      long long this_rank =
          (i > 0 && kni[i].first == kni[i - 1].first) ? last_rank : i;
      last_rank = tmprank[1 - ri][kni[i].second] = this_rank;
    }
  }
  rank.resize(n);
  rank.assign(tmprank[ri].begin(), tmprank[ri].end());
  sa.resize(n);
  for (long long i = 0; i < n; i++) sa[rank[i]] = i;
}
struct SuffixTree {
  string str;
  vector<unordered_map<long long, long long>> sta;
  vector<unordered_map<long long, long long>> end;
  vector<unordered_map<long long, long long>> nxt;
  vector<long long> suflink;
  long long capacity;
  long long node_count;
  long long act_node;
  long long act_br;
  long long act_len;
  long long todo_count;
  bool _nodehasbr(long long node, long long br) {
    auto m = nxt[node];
    return m.find(br) != m.end();
  }
  long long _newnode() {
    if (node_count < capacity) {
      long long newi = node_count++;
      suflink[newi] = -1;
      sta[newi].clear();
      end[newi].clear();
      nxt[newi].clear();
      return newi;
    }
    sta.emplace_back();
    end.emplace_back();
    nxt.emplace_back();
    suflink.push_back(-1);
    ++node_count;
    ++capacity;
    return node_count - 1;
  }
  long long _edgerealend(long long node, long long br) {
    long long tmp = end[node][br];
    return (tmp == -1) ? (str.size() - 1) : tmp;
  }
  long long _edgelen(long long node, long long br) {
    return (br == -1) ? 0
           : (!_nodehasbr(node, br))
               ? 0
               : (_edgerealend(node, br) - sta[node][br] + 1);
  }
  void clear() {
    node_count = 0;
    act_node = 0;
    act_br = -1;
    act_len = 0;
    todo_count = 0;
    _newnode();
  }
  SuffixTree(long long est_strlen) {
    capacity = 0;
    if (est_strlen > 0) {
      long long est_nodecnt = est_strlen * 2;
      capacity = est_nodecnt;
      sta = vector<unordered_map<long long, long long>>(est_nodecnt);
      end = vector<unordered_map<long long, long long>>(est_nodecnt);
      nxt = vector<unordered_map<long long, long long>>(est_nodecnt);
      suflink = vector<long long>(est_nodecnt, -1);
    }
    clear();
  }
  bool _tryextend(long long chr) {
    if (act_len == 0) {
      if (!_nodehasbr(act_node, chr)) return false;
      act_br = chr;
      ++act_len;
      return true;
    }
    if (act_len == _edgelen(act_node, act_br)) {
      long long nxtnode = nxt[act_node][act_br];
      if (!_nodehasbr(nxtnode, chr)) return false;
      act_node = nxtnode;
      act_br = chr;
      act_len = 1;
      return true;
    }
    long long start = sta[act_node][act_br];
    if (chr != str[start + act_len]) return false;
    ++act_len;
    return true;
  }
  void _branch(long long node, long long chr) {
    long long newnode = _newnode();
    sta[node][chr] = str.size() - 1;
    end[node][chr] = -1;
    nxt[node][chr] = newnode;
  }
  long long _actsplit(long long chr) {
    long long new0 = _newnode();
    long long new1 = _newnode();
    long long start = sta[act_node][act_br];
    sta[new0][str[start + act_len]] = start + act_len;
    end[new0][str[start + act_len]] = end[act_node][act_br];
    nxt[new0][str[start + act_len]] = nxt[act_node][act_br];
    sta[new0][chr] = str.size() - 1;
    end[new0][chr] = -1;
    nxt[new0][chr] = new1;
    sta[act_node][act_br] = start;
    end[act_node][act_br] = start + act_len - 1;
    nxt[act_node][act_br] = new0;
    return new0;
  }
  long long _splitorbranch(long long chr) {
    if (act_br >= 0 && act_len < _edgelen(act_node, act_br))
      return _actsplit(chr);
    long long target_node = (act_len == 0) ? 0 : nxt[act_node][act_br];
    _branch(target_node, chr);
    return target_node;
  }
  string _edgestr(long long node, long long br) {
    long long start = sta[node][br];
    long long end = _edgerealend(node, br);
    return str.substr(start, end - start + 1);
  }
  void _actsupdate(long long node, long long br, long long len) {
    act_node = node, act_br = br, act_len = len;
  }
  void _actfastfwd(long long start, long long slen) {
    if (act_br == -1) return;
    while (true) {
      long long elen = _edgelen(act_node, act_br);
      if (slen <= elen) return;
      long long new_act_node = nxt[act_node][act_br];
      long long new_act_br = str[start + elen];
      long long new_act_len = act_len - elen;
      _actsupdate(new_act_node, new_act_br, new_act_len);
      start += elen;
      slen -= elen;
    }
  }
  bool _actsgotonextsuf() {
    if (act_len == 0) return false;
    long long estart = sta[act_node][act_br];
    if (act_node == 0) {
      act_br = (act_len == 1) ? (-1) : str[estart + 1];
      --act_len;
      _actfastfwd(estart + 1, act_len);
    } else {
      act_node = (suflink[act_node] >= 0) ? suflink[act_node] : 0;
      _actfastfwd(estart, act_len);
    }
  }
  void insert(long long chr) {
    str.push_back(chr);
    ++todo_count;
    long long prev_created = -1;
    for (long long waitlink = -1; todo_count > 0; --todo_count) {
      bool suffix_exists = _tryextend(chr);
      if (suffix_exists) {
        waitlink = act_node;
      } else {
        waitlink = _splitorbranch(chr);
      }
      if (prev_created >= 0) suflink[prev_created] = waitlink;
      prev_created = waitlink;
      if (suffix_exists) break;
      _actsgotonextsuf();
    }
  }
};
const int N = 100;
int l0[N] = {};
int l1[N] = {};
int r0[N] = {};
int r1[N] = {};
int main() {
  srand(time(NULL));
  int n, m;
  cin >> n >> m;
  int p = 1;
  for (int i = 0; i < n; ++i) {
    if (p > m) break;
    l0[i] = p++;
    if (p > m) break;
    r0[i] = p++;
    if (p > m) break;
  }
  for (int i = 0; i < n; ++i) {
    if (p > m) break;
    l1[i] = p++;
    if (p > m) break;
    r1[i] = p++;
    if (p > m) break;
  }
  for (int i = 0; i < n; ++i) {
    if (l1[i] > 0) printf("%d ", l1[i]);
    if (l0[i] > 0) printf("%d ", l0[i]);
    if (r1[i] > 0) printf("%d ", r1[i]);
    if (r0[i] > 0) printf("%d ", r0[i]);
  }
  printf("\n");
  return 0;
}
