#include using namespace std; using ll = long long; const int INF = 1e9 + 10; const ll INFL = 4e18; using LL = __int128; LL binom(LL n, LL k) { if (k < 0 || k > n) return 0; if (k == 0 || k == n) return 1; if (k > n - k) k = n - k; LL res = 1; for (LL i = 0; i < k; i++) res = res * (n - i) / (i + 1); return res; } int main() { int N, I; cin >> N >> I; vector ans; LL sum = 0; int tmp = I; for (int n = max(N, I) + 10; n >= 1; n--) { ll now = binom(n, tmp); if (sum + now <= N && now > 0) { sum += now; ans.push_back(n); tmp--; if (sum == N || tmp == 1) break; } } for (ll x : ans) cout << x << ' '; cout << endl; }