#include using namespace std; typedef long long ll; int main() { int n; cin >> n; ll a[(n+1)*(n+1)]; for (ll i = 0, j = 1; i <= n; i++, j *= 2) for (ll k = 0, l = 1; k <= n; k++, l *= 5) a[i*(n+1)+k] = j*l; sort(a, a+(n+1)*(n+1)); for (ll i : a) cout << i << endl; return 0; }