#include <bits/stdc++.h>   using namespace std;   void myswap(int& a, int& b) {     int temp;     temp = a;     a = b;     b = temp;   }   void fun(vector<int>& vec, int k, int l, int r) {     if (k <= 1 || l >= r - 1) {       return;     }     int mid = (l + r) / 2;     if (k == 3) {       myswap(vec[mid - 1], vec[mid]);       return;     }     k--;     int p = k / 2;     if (p % 2 == 1) {       fun(vec, p, l, mid);       fun(vec, p, mid, r);     } else if (mid - l >= r - mid) {       fun(vec, p + 1, l, mid);       fun(vec, p - 1, mid, r);     } else {       fun(vec, p - 1, l, mid);       fun(vec, p + 1, mid, r);     }   }   int _count(int l, int r) {     if (l >= r) {       return 0;     }     if (l == r - 1) {       return 1;     }     int mid = (l + r) / 2;     return 1 + _count(l, mid) + _count(mid, r);   }   int main() {     int n, k, i, j;     cin >> n >> k;     if (k % 2 == 0) {       cout << -1;     } else if (k == 1) {       for (i = 1; i <= n; i++) {         cout << i <<    ;       }     } else {       int mm = _count(0, n);       if (k > mm) {         cout << -1;       } else {         vector<int> vec;         for (i = 1; i <= n; i++) {           vec.push_back(i);         }         fun(vec, k, 0, n);         for (i = 0; i < n; i++) {           cout << vec[i] <<    ;         }       }     }   }   