#include<iostream>
#include<vector>
#define pb push_back
using namespace std;
vector<int> vec;
int main()
{
int i,j,k,l,m,n,p;
cin>>n>>k;
int dp[10010]={0};
for(i=1;i<=n;i++)
{
dp[i]+=dp[i-1]+2;
}
m=(k<=0)?-k:k;
l=((n-1)*n)/2;
if((l-m)%2==1)
{
cout<<"-1";
return 0;
}
if(m>l)
{
cout<<"-1";
return 0;
}
m=l-m;
vec.pb(0);
int sum=0;
for(i=1;i<n;i++)
{
if(sum>=m)
{
j=i;
break;
}
sum+=dp[i];
}
p=0;
for(i=n-j;i>0;i--)
{
int temp=vec[p];
vec.pb(++temp);
p++;
}
l=vec.size();
for(i=j-1;i>=1;i--)
{
if(m>=dp[i])
{
int temp=vec[l-1];
vec.pb(--temp);
m-=dp[i];
}
else
{
int temp=vec[l-1];
vec.pb(++temp);
}
l++;
}
if(k<0)
{
l=vec.size();
for(i=0;i<l;i++)
{
vec[i]=-vec[i];
}
}
l=vec.size();
for(i=0;i<l;i++)
{
cout<<vec[i]<<" ";
}
return 0;
}
I2luY2x1ZGU8aW9zdHJlYW0+CiNpbmNsdWRlPHZlY3Rvcj4KI2RlZmluZSBwYiBwdXNoX2JhY2sKdXNpbmcgbmFtZXNwYWNlIHN0ZDsKCnZlY3RvcjxpbnQ+IHZlYzsKCmludCBtYWluKCkKewogICAgaW50IGksaixrLGwsbSxuLHA7CiAgICBjaW4+Pm4+Pms7CiAgICBpbnQgZHBbMTAwMTBdPXswfTsKICAgIGZvcihpPTE7aTw9bjtpKyspCiAgICB7CiAgICAgICAgZHBbaV0rPWRwW2ktMV0rMjsKICAgIH0KICAgIG09KGs8PTApPy1rOms7CiAgICBsPSgobi0xKSpuKS8yOwogICAgaWYoKGwtbSklMj09MSkKICAgIHsKICAgICAgICBjb3V0PDwiLTEiOwogICAgICAgIHJldHVybiAwOwogICAgfQogICAgaWYobT5sKQogICAgewogICAgICAgIGNvdXQ8PCItMSI7CiAgICAgICAgcmV0dXJuIDA7CiAgICB9CiAgICBtPWwtbTsKICAgIHZlYy5wYigwKTsKICAgIGludCBzdW09MDsKICAgIGZvcihpPTE7aTxuO2krKykKICAgIHsKICAgICAgICBpZihzdW0+PW0pCiAgICAgICAgewogICAgICAgICAgICBqPWk7CiAgICAgICAgICAgIGJyZWFrOwogICAgICAgIH0KICAgICAgICBzdW0rPWRwW2ldOwogICAgfQogICAgcD0wOwogICAgZm9yKGk9bi1qO2k+MDtpLS0pCiAgICB7CiAgICAgICAgaW50IHRlbXA9dmVjW3BdOwogICAgICAgIHZlYy5wYigrK3RlbXApOwogICAgICAgIHArKzsKICAgIH0KICAgIGw9dmVjLnNpemUoKTsKICAgIGZvcihpPWotMTtpPj0xO2ktLSkKICAgIHsKICAgICAgICBpZihtPj1kcFtpXSkKICAgICAgICB7CiAgICAgICAgICAgIGludCB0ZW1wPXZlY1tsLTFdOwogICAgICAgICAgICB2ZWMucGIoLS10ZW1wKTsKICAgICAgICAgICAgbS09ZHBbaV07CiAgICAgICAgfQogICAgICAgIGVsc2UKICAgICAgICB7CiAgICAgICAgICAgIGludCB0ZW1wPXZlY1tsLTFdOwogICAgICAgICAgICB2ZWMucGIoKyt0ZW1wKTsKICAgICAgICB9CiAgICAgICAgbCsrOwogICAgfQogICAgaWYoazwwKQogICAgewogICAgICAgIGw9dmVjLnNpemUoKTsKICAgICAgICBmb3IoaT0wO2k8bDtpKyspCiAgICAgICAgewogICAgICAgICAgICB2ZWNbaV09LXZlY1tpXTsKICAgICAgICB9CiAgICB9CiAgICBsPXZlYy5zaXplKCk7CiAgICBmb3IoaT0wO2k8bDtpKyspCiAgICB7CiAgICAgICAgY291dDw8dmVjW2ldPDwiICI7CiAgICB9CiAgICByZXR1cm4gMDsKfQ==