#include using namespace std; using ll = long long; #define rep(i, n) for (int i = 0; i < (int)(n); i++) const ll MAX = 50000; vector prime_list() { vector res; vector table(MAX + 10, true); for (ll i = 2; i <= MAX; i++) { if (table[i]) { res.push_back(i); for (ll j = i * 2; j <= MAX; j += i) { table[j] = false; } } } return res; } void solve() { ll n; cin >> n; auto list = prime_list(); vector ans(n, 0); rep(i, n) { ans[n - i - 1] = list[i] * list[i + 1]; } for (ll i = 1; i < n; i++) { for (const auto &j : list) { if (ans[i - 1] >= ans[i] * j) { continue; } bool ok = true; if (i < n) { auto g1 = __gcd(ans[i - 1], ans[i]); auto g2 = __gcd(ans[i - 1], ans[i] * j); ok &= g1 == g2; } if (i < n - 1) { auto g1 = __gcd(ans[i + 1], ans[i]); auto g2 = __gcd(ans[i + 1], ans[i] * j); ok &= g1 == g2; } if (ok) { ans[i] *= j; break; } } } rep(i, n) { if (i) cout << ' '; cout << ans[i]; } cout << endl; } int main() { std::cin.tie(nullptr); std::ios_base::sync_with_stdio(false); int T = 1; for (int t = 0; t < T; t++) { solve(); } return 0; }