#include <bits/stdc++.h>
using namespace std;
#define FOR(i, a, b) for(int i = (a); i < (b); i++)
#define RFOR(i, a, b) for(int i = (a) - 1; i >= (b); i--)
#define SZ(a) int(a.size())
#define ALL(a) a.begin(), a.end()
#define PB push_back
#define MP make_pair
#define F first
#define S second
typedef long long LL;
typedef vector<int> VI;
typedef pair<int, int> PII;
typedef double db;
__int128 fact[31];
vector<LL> ans;
void rec(int h, int cnt, int last, __int128 cur)
{
if (cnt == 0)
{
ans.PB(cur);
return;
}
FOR(x, 0, min(last, h) + 1)
rec(h - x, cnt - 1, x, cur / fact[x]);
}
int main()
{
ios::sync_with_stdio(0);
cin.tie(0);
fact[0] = 1;
FOR(i, 1, 31)
fact[i] = fact[i - 1] * i;
int d, h;
cin >> d >> h;
rec(h - 1, d, h - 1, fact[h - 1]);
sort(ALL(ans));
for (LL x : ans)
cout << x << "\n";
return 0;
}
dsfds