#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define ps(b) cout << (b ? "YES" : "NO") << '\n'
#define pc cout << "Case " << tc << ": "
#ifdef LOCAL
#include "def.h"
#else
#define ck(...)
#endif
const ll M = 1e9 + 7, N = 2e4 + 5;
set<ll> v;
void pre(){
ll j;
for (j = 2; j < N; j++) {
if((j&1 and (j*3)%5==0) or ~j&1) v.insert(j * 3);
}
for (j = 2; j < N; j++){
if((j&1 and (j*5)%3 == 0) or ~j&1) v.insert(j * 5);
}
}
void test(int tc) {
ll a = 0, b = 0, c = 0, d = 0, i = 0, j = 0, k = 0, m = 0, n = 0, q = 0;
cin >> n;
// vector<ll> v(n); for (i = 0; i < n; ++i) { cin >> v[i]; }
if(n==3) cout << 6 << ' ' << 10 << ' ' << 15;
else {
for (auto e:v){
cout << e << ' ';
if(--n == 0)
break;
}
}
cout << '\n';
}
signed main() {
cin.tie(0)->sync_with_stdio(0); cin.exceptions(cin.failbit|cin.badbit);
int tc = 0, t = 1;
pre();
cin >> t;
while (tc < t) test(++tc);
return 0;
}