#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
const int MAX_N = 20000;
const int MAX_VAL = 100000;
vector<int> primes;
void sieve() {
vector<bool> is_prime(MAX_VAL + 1, true);
is_prime[0] = is_prime[1] = false;
for (int i = 2; i <= MAX_VAL; ++i) {
if (is_prime[i]) {
primes.push_back(i);
for (int j = i * 2; j <= MAX_VAL; j += i) {
is_prime[j] = false;
}
}
}
}
void solve() {
int T;
cin >> T;
sieve();
while (T--) {
int N;
cin >> N;
vector<int> result;
int current_value = 1;
for (int i = 0; i < N; ++i) {
result.push_back(current_value * primes[i]);
current_value *= primes[i];
}
for (int i = 0; i < N; ++i) {
cout << result[i] << " ";
}
cout << "\n";
}
}
int main() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
solve();
return 0;
}