#include using namespace std; typedef long long ll; typedef pair PII; const int MM = 1e9 + 7; const double eps = 1e-8; const int MAXN = 2e3 + 10; int n, m; void prework(){ } void read(){ } int a[MAXN][MAXN]; void solve(int casi){ // cout << "Case #" << casi << ": "; cin >> n >> m; if (n <= 3){ cout << m; for (int i = 1; i < n; i++) cout << " 0"; cout << endl; return ; } a[3][1] = 0; a[3][2] = 0; a[3][3] = m; int k = 3; for (int x = 4; x <= n; x++){ k = x; int y = x - 1; vector f; for (int i = 1; i <= y; i++){ f.push_back(PII(a[y][i] + 1, i)); } sort(f.begin(), f.end()); int cnt = 0, mm = x / 2; for (int i = 0; i < mm; i++) cnt += (a[x][f[i].second] = f[i].first); if (cnt <= m){ a[x][x] = m - cnt; } else{ a[y][x] = -1; for (int i = x + 1; i <= n; i++) a[y][i] = -1; k = y; break; } //for (int i = 1; i <= x; i++) // cout << a[x][i] << ' '; cout << endl; } for (int i = n; i >= 2; i--) cout << a[k][i] << ' '; cout << a[k][1] << endl; } void printans(){ } int main(){ // std::ios::sync_with_stdio(false); prework(); int T = 1; // cin>>T; for(int i = 1; i <= T; i++){ read(); solve(i); printans(); } return 0; }