#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
using namespace std;
void solve(int cs) {
int n;
cin >> n;
vector<int> a = {6, 10, 15};
for (int i = 12; (int)a.size() != n; i++) {
if (i % a[0] == 0 || i % a[1] == 0 || i % a[2] == 0) {
if (i != 15) {
a.push_back(i);
}
}
}
sort(a.begin(), a.end());
for (int i = 0; i < n; i++) cout << a[i] << " \n"[i == n - 1];
}
int main() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
int tc = 1;
cin >> tc;
for (int cs = 1; cs <= tc; cs++) {
solve(cs);
}
return 0;
}