#pragma GCC optimize("Ofast")
#pragma GCC target("avx,avx2,fma")
#pragma GCC optimization ("unroll-loops")

#include<bits/stdc++.h>
#include<string.h>
using namespace std;
#define pb      push_back
#define all(v)  v.begin(),v.end()
#define see(x)  cout<<#x<<" : "<<(x)<<endl;
#define ya      cout<<"YES"<<endl;
#define no      cout<<"NO"<<endl;
#define ff      first
#define sc      second
#define scc(a)  scanf("%lld",&a);
#define inf     999999999
inline  int     random(int a=1,int b=10){return a+rand()%(b-a+1);}
typedef long long ll;
typedef pair<ll,ll> pii;
const ll N=3e5+7;

int main()
{
    ios::sync_with_stdio(false);
    cin.tie(0);

    int _;
    cin>>_;
    while(_--)
    {
        int n,c=0;
        bool f=0;
        cin>>n;
        for(int i=4;i<=4*n;)
        {
            c++;
            cout<<i<<' ';
            if(f)i+=2;
            else i+=4;
            f=1-f;
            if(c==n)break;
        }
        cout<<endl;
    }

    return 0;
}


#pragma GCC optimize("Ofast")
#pragma GCC target("avx,avx2,fma")
#pragma GCC optimization ("unroll-loops")

#include<bits/stdc++.h>
#include<string.h>
using namespace std;
#define pb      push_back
#define all(v)  v.begin(),v.end()
#define see(x)  cout<<#x<<" : "<<(x)<<endl;
#define ya      cout<<"YES"<<endl;
#define no      cout<<"NO"<<endl;
#define ff      first
#define sc      second
#define scc(a)  scanf("%lld",&a);
#define inf     999999999
inline  int     random(int a=1,int b=10){return a+rand()%(b-a+1);}
typedef long long ll;
typedef pair<ll,ll> pii;
const ll N=3e5+7;

int main()
{
    ios::sync_with_stdio(false);
    cin.tie(0);

    int _;
    cin>>_;
    while(_--)
    {
        int n,c=0;
        bool f=1;
        cin>>n;
        for(int i=3;i<=4*n; )
        {
            c++;
            if(f)
            cout<<i<<' ';
            else
                cout<<(3+i)-1<<' ';
            i=i+3;
            f=0;

            if(c==n)break;
        }
        cout<<endl;
    }

    return 0;
}


#pragma GCC optimize("Ofast")
#pragma GCC target("avx,avx2,fma")
#pragma GCC optimization ("unroll-loops")

#include<bits/stdc++.h>
#include<string.h>
using namespace std;
#define pb      push_back
#define all(v)  v.begin(),v.end()
#define see(x)  cout<<#x<<" : "<<(x)<<endl;
#define ya      cout<<"YES"<<endl;
#define no      cout<<"NO"<<endl;
#define ff      first
#define sc      second
#define scc(a)  scanf("%lld",&a);
#define inf     999999999
inline  int     random(int a=1,int b=10){return a+rand()%(b-a+1);}
typedef long long ll;
typedef pair<ll,ll> pii;
const ll N=3e5+7;

int main()
{
    ios::sync_with_stdio(false);
    cin.tie(0);

    int _;
    cin>>_;
    while(_--)
    {
        int n,c=0;
        bool f=1;
        cin>>n;
        for(int i=3;i<=4*n; )
        {
            c++;
            if(f)
            cout<<i<<' ';
            else
                cout<<(i)-1<<' ';
            i=i+3;
            f=0;

            if(c==n)break;
        }
        cout<<endl;
    }

    return 0;
}


#pragma GCC optimize("Ofast")
#pragma GCC target("avx,avx2,fma")
#pragma GCC optimization ("unroll-loops")

#include<bits/stdc++.h>
#include<string.h>
using namespace std;
#define pb      push_back
#define all(v)  v.begin(),v.end()
#define see(x)  cout<<#x<<" : "<<(x)<<endl;
#define ya      cout<<"YES"<<endl;
#define no      cout<<"NO"<<endl;
#define ff      first
#define sc      second
#define scc(a)  scanf("%lld",&a);
#define inf     999999999
inline  int     random(int a=1,int b=10){return a+rand()%(b-a+1);}
typedef long long ll;
typedef pair<ll,ll> pii;
const ll N=3e5+7;

int main()
{
    ios::sync_with_stdio(false);
    cin.tie(0);

    int _;
    cin>>_;
    while(_--)
    {
        int n,c=0;
        bool f=1;
        cin>>n;
        for(int i=2*n;i<=4*n; )
        {

         cout<<i<<" ";
         i+=2;
         c++;
            if(c==n)break;
        }
        cout<<endl;
    }

    return 0;
}


#include <bits/stdc++.h>
using namespace std;
#define ll           long long
#define all(v)       (v).begin() , (v).end()
#define vi           vector <ll>
#define vii          vector <pair<ll,ll>>
#define ii           pair<ll,ll>
#define sz(v)	     ((int)((v).size()))
#define lp(i,a,b)    for(int i=a;i<b;i++)
#define pb           push_back
#define pf           push_front
#define F            first
#define S            second
#define endl         "\n"
#define IOS          ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
const double PI = 3.14159265358979323846;
const ll inf=1e9+7,MOD=1e18+7,MAX=1e5+2;

int main() {
#ifndef ONLINE_JUDGE
    freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
#endif
    IOS
    int t;
    cin>>t;
    while(t--){
        int n;
        cin>>n;
        lp(i,0,n)
            cout<<4*n-i*2<<" ";
        cout<<endl;
    }
}


#include <bits/stdc++.h>
using namespace std;
#define ll           long long
#define all(v)       (v).begin() , (v).end()
#define vi           vector <ll>
#define vii          vector <pair<ll,ll>>
#define ii           pair<ll,ll>
#define sz(v)	     ((int)((v).size()))
#define lp(i,a,b)    for(int i=a;i<b;i++)
#define pb           push_back
#define pf           push_front
#define F            first
#define S            second
#define endl         "\n"
#define IOS          ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
const double PI = 3.14159265358979323846;
const ll inf=1e9+7,MOD=1e9+7,MAX=1e5+2;

int main() {
#ifndef ONLINE_JUDGE
    freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
#endif
    IOS
    int t;
    cin>>t;
    while(t--){
        int n;
        cin>>n;
        set<int>s;
        lp(j,1,4*n+1)
            s.insert(j);
        for(int i=4*n;i>=1;--i){
            if(s.find(i)==s.end())
                continue;
            lp(j,1,i)
                if(i%j==0)
                    s.erase(j);
        }
        int cnt=0;
        for(auto i:s)
            if(i%2==0&&++cnt<=n)
                cout<<i<<" ";
        cout<<endl;
    }
}


#include <bits/stdc++.h>
using namespace std;
#define ll           long long
#define all(v)       (v).begin() , (v).end()
#define vi           vector <ll>
#define vii          vector <pair<ll,ll>>
#define ii           pair<ll,ll>
#define sz(v)	     ((int)((v).size()))
#define lp(i,a,b)    for(int i=a;i<b;i++)
#define pb           push_back
#define pf           push_front
#define F            first
#define S            second
#define endl         "\n"
#define IOS          ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
const double PI = 3.14159265358979323846;
const ll inf=1e9+7,MOD=1e9+7,MAX=1e5+2;

int main() {
#ifndef ONLINE_JUDGE
    freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
#endif
    IOS
    int t;
    cin>>t;
    while(t--){
        int n;
        cin>>n;
        vi v;
        lp(i,2,4*n+1){
            bool f=0;
            lp(j,2,i){
                if(i%j==0)f=1;
            }
            if(!f)
                v.pb(i);
        }
        vi res;
        lp(i,0,sz(v)){
            lp(j,i,sz(v)){
                if(v[i]*v[j]<=4*n)
                    res.pb(v[i]*v[j]);
            }
        }
        lp(i,0,n)
            cout<<res[i]<<" ";
        cout<<endl;
    }
}


#include <bits/stdc++.h>
using namespace std;
#define ll           long long
#define all(v)       (v).begin() , (v).end()
#define vi           vector <ll>
#define vii          vector <pair<ll,ll>>
#define ii           pair<ll,ll>
#define sz(v)	     ((int)((v).size()))
#define lp(i,a,b)    for(int i=a;i<b;i++)
#define pb           push_back
#define pf           push_front
#define F            first
#define S            second
#define endl         "\n"
#define IOS          ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
const double PI = 3.14159265358979323846;
const ll inf=1e9+7,MOD=1e9+7,MAX=1e5+2;

int main() {
#ifndef ONLINE_JUDGE
    freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
#endif
    IOS
    int t;
    cin>>t;
    while(t--){
        int n;
        cin>>n;
        vi v;
        lp(i,2,4*n+1){
            bool f=0;
            lp(j,2,i){
                if(i%j==0)f=1;
            }
            if(!f)
                v.pb(i);
        }
        set<int>res;
        lp(i,0,min(sz(v),2)){
            lp(j,0,sz(v))
                if(v[i]*v[j]<=4*n)
                    res.insert(v[i]*v[j]);
        }
        int cnt=0;
        if(sz(v)>1)
            res.erase(9);
        for(auto i:res){
            cout<<i<<" ";
            if(++cnt==n)
                break;
        }
        cout<<endl;
    }
}


#include <bits/stdc++.h>
using namespace std;
#define ll           long long
#define all(v)       (v).begin() , (v).end()
#define vi           vector <ll>
#define vii          vector <pair<ll,ll>>
#define ii           pair<ll,ll>
#define sz(v)	     ((int)((v).size()))
#define lp(i,a,b)    for(int i=a;i<b;i++)
#define pb           push_back
#define pf           push_front
#define F            first
#define S            second
#define endl         "\n"
#define IOS          ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
const double PI = 3.14159265358979323846;
const ll inf=1e9+7,MOD=1e9+7,MAX=1e5+2;

int main() {
#ifndef ONLINE_JUDGE
    freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
#endif
    IOS
    int t;
    cin>>t;
    while(t--){
        int n;
        cin>>n;
        vi v;
        lp(i,2,4*n+1){
            bool f=0;
            lp(j,2,i){
                if(i%j==0)f=1;
            }
            if(!f)
                v.pb(i*2);
        }
        lp(i,0,n)
            cout<<v[i]<<" ";
        cout<<endl;
    }
}


#include <bits/stdc++.h>
using namespace std;
#define ll           long long
#define all(v)       (v).begin() , (v).end()
#define vi           vector <ll>
#define vii          vector <pair<ll,ll>>
#define ii           pair<ll,ll>
#define sz(v)	     ((int)((v).size()))
#define lp(i,a,b)    for(int i=a;i<b;i++)
#define pb           push_back
#define pf           push_front
#define F            first
#define S            second
#define endl         "\n"
#define IOS          ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
const double PI = 3.14159265358979323846;
const ll inf=1e9+7,MOD=1e9+7,MAX=1e5+2;

int main() {
#ifndef ONLINE_JUDGE
    freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
#endif
    IOS
    int t;
    cin>>t;
    while(t--){
        int n;
        cin>>n;
        vi v;
        lp(i,2,4*n){
            bool f=0;
            lp(j,2,i){
                if(i%j==0)f=1;
            }
            if(!f)
                v.pb(i*2);
        }
        lp(i,0,n)
            cout<<v[i]<<" ";
        cout<<endl;
    }
}


#include<bits/stdc++.h>

using namespace std;

#define FOR(i, j, k) for(int i = j; i <= k; i++)
#define ROF(i, j, k) for(int i = j; i >= k; i--)
#define PB push_back
#define MEM(n, val) memset((n), val, sizeof(n))
#define FastIO ios::sync_with_stdio(false); cin.tie(0); cout.tie(0);
#define F first
#define S second
#define MP make_pair
#define LL long long
#define MOD 998244353
#define MX 200010
#define INFL 1000000000000000000LL
#define INF 1000000000

typedef pair<int, int> PII;
typedef pair<LL, LL> PLL;

#include <ext/pb_ds/assoc_container.hpp> // Common file
#include <ext/pb_ds/tree_policy.hpp> // Including tree_order_statistics_node_update
using namespace __gnu_pbds;

/****************************short sieve and prime fact generate start***********************************/
bool flag[10010000];
vector<int> prime;

void gen_sieve(int limit)	{
    MEM(flag, 0);
	int sqrt_n = sqrt(limit);
	for (int i = 3; i <= sqrt_n; i += 2)	{
		if (!flag[i])
			for(int j = i * i; j <= limit; j += (i * 2)) flag[j] = 1;
	}
	prime.clear();prime.PB(2);
    for(int i = 3; i <= limit; i += 2)   {
        if(flag[i] == 0)prime.PB(i);
    }
}
/****************************short sieve and prime fact generate end***********************************/

void solve(int n) {
//    if(n == 1) {
//        cout << 2 << endl;
//        return;
//    }
//    cout << n << " : ";
    int lim = n * 4;
    int foo = 0;
    int mx = 0;
    int cnt, i;
    int yo = 0;
    for(i = 0, cnt = 0; cnt < n; i++, cnt++) {
        if(prime[i] * prime[foo] > lim) {
            foo++;
            i = foo - 1;
            cnt--;
            continue;
        }
        cout << prime[i] * prime[foo] << " ";
        yo++;
        mx = max(mx, prime[i] * prime[foo]);
    }
//    if(cnt == n && mx <= lim && yo == n) {
////        cout << "yes";
//    }
//    else {
//        int a = 10 / 0;
//    }
//    cout << " lim : " << lim << " ";
    cout << "\n";
}

int main() {
//    freopen("in.txt", "r", stdin);
//    freopen("out.txt", "w", stdout);tt
    mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
    FastIO;
    gen_sieve(10010);
//    cout << prime.size() << " " << prime.back() << "\n";

//    FOR(i, 1, 100) {
//        solve(i);
//    }
//    return 0;

    int tc;

    cin >> tc;
    FOR(tt, 1, tc) {
        int n;
        cin >> n;
        solve(n);
    }

    return 0;
}
/**
4 6 10 14 22 26 34 38 46 58 62 74 9 15 21 33 39 51 57
*/


#include<bits/stdc++.h>

using namespace std;

#define FOR(i, j, k) for(int i = j; i <= k; i++)
#define ROF(i, j, k) for(int i = j; i >= k; i--)
#define PB push_back
#define MEM(n, val) memset((n), val, sizeof(n))
#define FastIO ios::sync_with_stdio(false); cin.tie(0); cout.tie(0);
#define F first
#define S second
#define MP make_pair
#define LL long long
#define MOD 998244353
#define MX 200010
#define INFL 1000000000000000000LL
#define INF 1000000000

typedef pair<int, int> PII;
typedef pair<LL, LL> PLL;

#include <ext/pb_ds/assoc_container.hpp> // Common file
#include <ext/pb_ds/tree_policy.hpp> // Including tree_order_statistics_node_update
using namespace __gnu_pbds;

/****************************short sieve and prime fact generate start***********************************/
bool flag[10010000];
vector<int> prime;

void gen_sieve(int limit)	{
    MEM(flag, 0);
	int sqrt_n = sqrt(limit);
	for (int i = 3; i <= sqrt_n; i += 2)	{
		if (!flag[i])
			for(int j = i * i; j <= limit; j += (i * 2)) flag[j] = 1;
	}
	prime.clear();prime.PB(2);
    for(int i = 3; i <= limit; i += 2)   {
        if(flag[i] == 0)prime.PB(i);
    }
}
/****************************short sieve and prime fact generate end***********************************/

void solve(int n) {
//    if(n == 1) {
//        cout << 2 << endl;
//        return;
//    }
//    cout << n << " : ";
    int lim = n * 4;
    int foo = 0;
    int mx = 0;
    int cnt, i;
    int yo = 0;
    for(cnt = 0; cnt < n; cnt++) {
        if(prime[cnt] * 2 > lim) {
//            cnt--;
            break;
        }
        cout << prime[cnt] * 2 << " ";
        yo++;
        mx = max(mx, prime[cnt] * 2);
    }
    for(i = 0; cnt < n; i++, cnt++) {
        int gun = prime[i] * prime[foo] * 2;
//        if(prime[i] != 2 && prime[foo] != 2) {
//            gun *= 2;
//        }
        if(gun > lim) {
            foo++;
            i = foo - 1;
            cnt--;
            continue;
        }
        cout << gun << " ";
        yo++;
        mx = max(mx, gun);
    }
    if(cnt == n && mx <= lim && yo == n) {
//        cout << "yes";
    }
    else {
        int a = 10 / 0;
    }
//    cout << " lim : " << lim << " ";
    cout << "\n";
}

int main() {
    freopen("in.txt", "r", stdin);
//    freopen("out.txt", "w", stdout);tt
    mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
    FastIO;
    gen_sieve(10010);
//    cout << prime.size() << " " << prime.back() << "\n";

//    FOR(i, 1, 100) {
//        solve(i);
//    }
//    return 0;

    int tc;

    cin >> tc;
    FOR(tt, 1, tc) {
        int n;
        cin >> n;
        solve(n);
    }

    return 0;
}
/**
4 6 10 14 22 26 34 38 46 58 62 74 9 15 21 33 39 51 57
*/


#include<bits/stdc++.h>

using namespace std;

#define FOR(i, j, k) for(int i = j; i <= k; i++)
#define ROF(i, j, k) for(int i = j; i >= k; i--)
#define PB push_back
#define MEM(n, val) memset((n), val, sizeof(n))
#define FastIO ios::sync_with_stdio(false); cin.tie(0); cout.tie(0);
#define F first
#define S second
#define MP make_pair
#define LL long long
#define MOD 998244353
#define MX 200010
#define INFL 1000000000000000000LL
#define INF 1000000000

typedef pair<int, int> PII;
typedef pair<LL, LL> PLL;

#include <ext/pb_ds/assoc_container.hpp> // Common file
#include <ext/pb_ds/tree_policy.hpp> // Including tree_order_statistics_node_update
using namespace __gnu_pbds;

/****************************short sieve and prime fact generate start***********************************/
bool flag[10010000];
vector<int> prime;

void gen_sieve(int limit)	{
    MEM(flag, 0);
	int sqrt_n = sqrt(limit);
	for (int i = 3; i <= sqrt_n; i += 2)	{
		if (!flag[i])
			for(int j = i * i; j <= limit; j += (i * 2)) flag[j] = 1;
	}
	prime.clear();prime.PB(2);
    for(int i = 3; i <= limit; i += 2)   {
        if(flag[i] == 0)prime.PB(i);
    }
}
/****************************short sieve and prime fact generate end***********************************/

void solve(int n) {
    if(n == 1) {
        cout << 1 << endl;
        return;
    }
    int lim = n * 4;
    int foo = 0;
    int mx = 0;
    int cnt, i;
    for(i = 0, cnt = 0; cnt < n; i++, cnt++) {
        if(prime[i] * prime[foo] > lim) {
            foo++;
            i = foo - 1;
            continue;
        }
        cout << prime[i] * prime[foo] << " ";
        mx = max(mx, prime[i] * prime[foo]);
    }
    if(cnt == n && mx <= lim) {
//        cout << "yes";
    }
    else {
        int a = 10 / 0;
    }
    cout << endl;
}

int main() {
//    freopen("in.txt", "r", stdin);
//    freopen("out.txt", "w", stdout);tt
    mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
    FastIO;
    gen_sieve(1010);

//    FOR(i, 1, 100) {
//        solve(i);
//    }
//    return 0;

    int tc;

    cin >> tc;
    FOR(tt, 1, tc) {
        int n;
        cin >> n;
        solve(n);

    }

    return 0;
}
/**
*/


#include<bits/stdc++.h>

using namespace std;

#define FOR(i, j, k) for(int i = j; i <= k; i++)
#define ROF(i, j, k) for(int i = j; i >= k; i--)
#define PB push_back
#define MEM(n, val) memset((n), val, sizeof(n))
#define FastIO ios::sync_with_stdio(false); cin.tie(0); cout.tie(0);
#define F first
#define S second
#define MP make_pair
#define LL long long
#define MOD 998244353
#define MX 200010
#define INFL 1000000000000000000LL
#define INF 1000000000

typedef pair<int, int> PII;
typedef pair<LL, LL> PLL;

#include <ext/pb_ds/assoc_container.hpp> // Common file
#include <ext/pb_ds/tree_policy.hpp> // Including tree_order_statistics_node_update
using namespace __gnu_pbds;

int main() {
//    freopen("in.txt", "r", stdin);
//    freopen("out.txt", "w", stdout);tt
    mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
    FastIO;

    int tc;

    cin >> tc;
    FOR(tt, 1, tc) {
        int n;
        cin >> n;
        for(int i = n * 4, cnt = 1; cnt <= n; i -= 2, cnt++) {
            cout << i << " ";
        }
        cout << "\n";
    }

    return 0;
}
/**
*/


#include<bits/stdc++.h>

using namespace std;

#define FOR(i, j, k) for(int i = j; i <= k; i++)
#define ROF(i, j, k) for(int i = j; i >= k; i--)
#define PB push_back
#define MEM(n, val) memset((n), val, sizeof(n))
#define FastIO ios::sync_with_stdio(false); cin.tie(0); cout.tie(0);
#define F first
#define S second
#define MP make_pair
#define LL long long
#define MOD 998244353
#define MX 200010
#define INFL 1000000000000000000LL
#define INF 1000000000

typedef pair<int, int> PII;
typedef pair<LL, LL> PLL;

#include <ext/pb_ds/assoc_container.hpp> // Common file
#include <ext/pb_ds/tree_policy.hpp> // Including tree_order_statistics_node_update
using namespace __gnu_pbds;

/****************************short sieve and prime fact generate start***********************************/
bool flag[10010000];
vector<int> prime;

void gen_sieve(int limit)	{
    MEM(flag, 0);
	int sqrt_n = sqrt(limit);
	for (int i = 3; i <= sqrt_n; i += 2)	{
		if (!flag[i])
			for(int j = i * i; j <= limit; j += (i * 2)) flag[j] = 1;
	}
	prime.clear();prime.PB(2);
    for(int i = 3; i <= limit; i += 2)   {
        if(flag[i] == 0)prime.PB(i);
    }
}
/****************************short sieve and prime fact generate end***********************************/

void solve(int n) {
//    if(n == 1) {
//        cout << 2 << endl;
//        return;
//    }
//    cout << n << " : ";
    int lim = n * 4;
    int foo = 0;
    int mx = 0;
    int cnt, i;
    int yo = 0;
    for(cnt = 0; cnt < n; cnt++) {
        if(prime[cnt] * 2 > lim) {
//            cnt--;
            break;
        }
        cout << prime[cnt] * 2 << " ";
        yo++;
        mx = max(mx, prime[cnt] * 2);
    }
    for(i = 0; cnt < n; i++, cnt++) {
        int gun = prime[i] * prime[foo] * 2;
//        if(prime[i] != 2 && prime[foo] != 2) {
//            gun *= 2;
//        }
        if(gun > lim) {
            foo++;
            i = foo;
            cnt--;
            continue;
        }
        cout << gun << " ";
        yo++;
        mx = max(mx, gun);
    }
    if(cnt == n && mx <= lim && yo == n) {
//        cout << "yes";
    }
    else {
        int a = 10 / 0;
    }
//    cout << " lim : " << lim << " ";
    cout << "\n";
}

int main() {
//    freopen("in.txt", "r", stdin);
//    freopen("out.txt", "w", stdout);tt
    mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
    FastIO;
    gen_sieve(10010);
//    cout << prime.size() << " " << prime.back() << "\n";
//
//    FOR(i, 1, 100) {
//        solve(i);
//    }
//    return 0;

    int tc;

    cin >> tc;
    FOR(tt, 1, tc) {
        int n;
        cin >> n;
        solve(n);
    }

    return 0;
}
/**
4 6 10 14 22 26 34 38 46 58 62 74 9 15 21 33 39 51 57
*/


#include<bits/stdc++.h>

using namespace std;

#define FOR(i, j, k) for(int i = j; i <= k; i++)
#define ROF(i, j, k) for(int i = j; i >= k; i--)
#define PB push_back
#define MEM(n, val) memset((n), val, sizeof(n))
#define FastIO ios::sync_with_stdio(false); cin.tie(0); cout.tie(0);
#define F first
#define S second
#define MP make_pair
#define LL long long
#define MOD 998244353
#define MX 200010
#define INFL 1000000000000000000LL
#define INF 1000000000

typedef pair<int, int> PII;
typedef pair<LL, LL> PLL;

#include <ext/pb_ds/assoc_container.hpp> // Common file
#include <ext/pb_ds/tree_policy.hpp> // Including tree_order_statistics_node_update
using namespace __gnu_pbds;

/****************************short sieve and prime fact generate start***********************************/
bool flag[10010000];
vector<int> prime;

void gen_sieve(int limit)	{
    MEM(flag, 0);
	int sqrt_n = sqrt(limit);
	for (int i = 3; i <= sqrt_n; i += 2)	{
		if (!flag[i])
			for(int j = i * i; j <= limit; j += (i * 2)) flag[j] = 1;
	}
	prime.clear();prime.PB(2);
    for(int i = 3; i <= limit; i += 2)   {
        if(flag[i] == 0)prime.PB(i);
    }
}
/****************************short sieve and prime fact generate end***********************************/

void solve(int n) {
    if(n == 1) {
        cout << 2 << endl;
        return;
    }
    int lim = n * 4;
    int foo = 0;
    int mx = 0;
    int cnt, i;
    for(i = 0, cnt = 0; cnt < n; i++, cnt++) {
        if(prime[i] * prime[foo] > lim) {
            foo++;
            i = foo - 1;
            cnt--;
            continue;
        }
        cout << prime[i] * prime[foo] << " ";
        mx = max(mx, prime[i] * prime[foo]);
    }
    if(cnt == n && mx <= lim) {
//        cout << "yes";
    }
    else {
        int a = 10 / 0;
    }
//    cout << " lim : " << lim << " ";
    cout << endl;
}

int main() {
//    freopen("in.txt", "r", stdin);
//    freopen("out.txt", "w", stdout);tt
    mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
    FastIO;
    gen_sieve(1010);

//    FOR(i, 1, 100) {
//        solve(i);
//    }
//    return 0;

    int tc;

    cin >> tc;
    FOR(tt, 1, tc) {
        int n;
        cin >> n;
        solve(n);

    }

    return 0;
}
/**
*/


#include<bits/stdc++.h>

using namespace std;

#define FOR(i, j, k) for(int i = j; i <= k; i++)
#define ROF(i, j, k) for(int i = j; i >= k; i--)
#define PB push_back
#define MEM(n, val) memset((n), val, sizeof(n))
#define FastIO ios::sync_with_stdio(false); cin.tie(0); cout.tie(0);
#define F first
#define S second
#define MP make_pair
#define LL long long
#define MOD 998244353
#define MX 200010
#define INFL 1000000000000000000LL
#define INF 1000000000

typedef pair<int, int> PII;
typedef pair<LL, LL> PLL;

#include <ext/pb_ds/assoc_container.hpp> // Common file
#include <ext/pb_ds/tree_policy.hpp> // Including tree_order_statistics_node_update
using namespace __gnu_pbds;

/****************************short sieve and prime fact generate start***********************************/
bool flag[10010000];
vector<int> prime;

void gen_sieve(int limit)	{
    MEM(flag, 0);
	int sqrt_n = sqrt(limit);
	for (int i = 3; i <= sqrt_n; i += 2)	{
		if (!flag[i])
			for(int j = i * i; j <= limit; j += (i * 2)) flag[j] = 1;
	}
	prime.clear();prime.PB(2);
    for(int i = 3; i <= limit; i += 2)   {
        if(flag[i] == 0)prime.PB(i);
    }
}
/****************************short sieve and prime fact generate end***********************************/

void solve(int n) {
//    if(n == 1) {
//        cout << 2 << endl;
//        return;
//    }
//    cout << n << " : ";
    int lim = n * 4;
    int foo = 0;
    int mx = 0;
    int cnt, i;
    int yo = 0;
    for(cnt = 0; cnt < n; cnt++) {
        if(prime[cnt] * 2 > lim) {
//            cnt--;
            break;
        }
        cout << prime[cnt] * 2 << " ";
        yo++;
        mx = max(mx, prime[cnt] * 2);
    }
    for(i = 0; cnt < n; i++, cnt++) {
        int gun = prime[i] * prime[foo] * 2;
//        if(prime[i] != 2 && prime[foo] != 2) {
//            gun *= 2;
//        }
        if(gun > lim) {
            foo++;
            i = foo - 1;
            cnt--;
            continue;
        }
        cout << gun << " ";
        yo++;
        mx = max(mx, gun);
    }
    if(cnt == n && mx <= lim && yo == n) {
//        cout << "yes";
    }
    else {
        int a = 10 / 0;
    }
//    cout << " lim : " << lim << " ";
    cout << "\n";
}

int main() {
//    freopen("in.txt", "r", stdin);
//    freopen("out.txt", "w", stdout);tt
    mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
    FastIO;
    gen_sieve(10010);
//    cout << prime.size() << " " << prime.back() << "\n";

//    FOR(i, 1, 100) {
//        solve(i);
//    }
//    return 0;

    int tc;

    cin >> tc;
    FOR(tt, 1, tc) {
        int n;
        cin >> n;
        solve(n);
    }

    return 0;
}
/**
4 6 10 14 22 26 34 38 46 58 62 74 9 15 21 33 39 51 57
*/


#include <bits/stdc++.h>
#include <iostream>
using namespace std;
typedef long long ll;
#define F first
#define S second
#define pb push_back
#define ve vector<ll>
#define vp vector<pair<ll, ll>>
#define all(v) (v).begin(), (v).end()
#define sortve(v) sort(all(v))
#define rsrt(v) sort(v.rbegin(), v.rend())
#define rev(i, n) for (ll i = n - 1; i >= 0; i--)
#define f(i, n) for (ll i = 0; i < n; i++)
#define f1(i, n) for (ll i = 1; i < n + 1; i++)
#define f2(i, a, b) for (ll i = a; i < b; i++)
#define precision(x) cout << fixed << setprecision(x);
#define testcase \
    ll t;        \
    cin >> t;    \
    while (t--)
#define fast                      \
    ios_base::sync_with_stdio(0); \
    cin.tie(nullptr);             \
    cout.tie(nullptr)
#define bas cout << "\n";
const ll PI = 3.1415926535897932384626;
const ll mod = 1000000007;
const ll FMOD = 998244353;
const ll N = 100005;
const double eps = 1e-9;

// Let's Go 😇

int main()
{
    testcase
    {
        ll n, cnt = 0, val = 0;
        cin >> n;
        ve v;
        v.push_back(4);
        if (n > 1)
        {
            ll x = 6;
            v.push_back(6);
            n = n - 2;
            while (n > 0)
            {
                v.push_back(x + 4);
                x = x + 4;
                n--;
            }
        }
        f(i, (ll)v.size())
        {
            cout << v[i] << " ";
        }
        bas
        v.push_back(1);
        v.clear();
    }
    return 0;
}

/* SERIOUSLY, It ⬇ ain't a JOKE ⬇ */

/* The problem  is either
   in conditional statements
   or the increments or %mod or
   endl or you are printing
   something else*/


#include <bits/stdc++.h>
#include <iostream>
using namespace std;
typedef long long ll;
#define F first
#define S second
#define pb push_back
#define ve vector<ll>
#define vp vector<pair<ll, ll>>
#define all(v) (v).begin(), (v).end()
#define sortve(v) sort(all(v))
#define rsrt(v) sort(v.rbegin(), v.rend())
#define rev(i, n) for (ll i = n - 1; i >= 0; i--)
#define f(i, n) for (ll i = 0; i < n; i++)
#define f1(i, n) for (ll i = 1; i < n + 1; i++)
#define f2(i, a, b) for (ll i = a; i < b; i++)
#define precision(x) cout << fixed << setprecision(x);
#define testcase \
    ll t;        \
    cin >> t;    \
    while (t--)
#define fast                      \
    ios_base::sync_with_stdio(0); \
    cin.tie(nullptr);             \
    cout.tie(nullptr)
#define bas cout << "\n";
const ll PI = 3.1415926535897932384626;
const ll mod = 1000000007;
const ll FMOD = 998244353;
const ll N = 100005;
const double eps = 1e-9;

// Let's Go 😇

int main()
{
    testcase
    {
        ll n, cnt = 0, val = 0;
        cin >> n;
        ve v;
        v.push_back(4);
        if (n > 1)
        {
            ll x = 6;
            v.push_back(6);
            n = n - 2;
            while (n)
            {
                v.push_back(x + 4);
                x = x + 4;
                n--;
            }
        }
        f(i, (ll)v.size())
        {
            cout << v[i] << " ";
        }
        bas
    }
}

/* SERIOUSLY, It ⬇ ain't a JOKE ⬇ */

/* The problem  is either
   in conditional statements
   or the increments or %mod or
   endl or you are printing
   something else*/


#include <bits/stdc++.h>
#include <iostream>
using namespace std;
typedef long long ll;
#define F first
#define S second
#define pb push_back
#define ve vector<ll>
#define vp vector<pair<ll, ll>>
#define all(v) (v).begin(), (v).end()
#define sortve(v) sort(all(v))
#define rsrt(v) sort(v.rbegin(), v.rend())
#define rev(i, n) for (ll i = n - 1; i >= 0; i--)
#define f(i, n) for (ll i = 0; i < n; i++)
#define f1(i, n) for (ll i = 1; i < n + 1; i++)
#define f2(i, a, b) for (ll i = a; i < b; i++)
#define precision(x) cout << fixed << setprecision(x);
#define testcase \
    ll t;        \
    cin >> t;    \
    while (t--)
#define fast                      \
    ios_base::sync_with_stdio(0); \
    cin.tie(nullptr);             \
    cout.tie(nullptr)
#define bas cout << "\n";
const ll PI = 3.1415926535897932384626;
const ll mod = 1000000007;
const ll FMOD = 998244353;
const ll N = 100005;
const double eps = 1e-9;

// Let's Go 😇

int main()
{
    testcase
    {
        ll n, cnt = 0, val = 0;
        cin >> n;
        ve v;
        for (ll i = 4; i < 4 * n + 1 && v.size() < n; i++)
        {
            if (v.empty() != true)
            {
                ll x = v.size();
                val = 0;
                f(j, x)
                {
                    if ((v[j] % i) != 0 && (i % v[j]) != 0 && (__gcd(v[j], i)) != 1)
                    {
                        val++;
                    }
                }
                // cout << val << " ";

                if (val == x)
                {
                    v.pb(i);
                    cnt++;
                }
            }
            else
            {
                v.pb(i);
            }
        }
        f(i, n)
        {
            cout << v[i] << " ";
        }
        bas
        v.push_back(1);
        v.clear();
    }
}

/* SERIOUSLY, It ⬇ ain't a JOKE ⬇ */

/* The problem  is either
   in conditional statements
   or the increments or %mod or
   endl or you are printing
   something else*/


#include <bits/stdc++.h>
#include <iostream>
using namespace std;
typedef long long ll;
#define F first
#define S second
#define pb push_back
#define ve vector<ll>
#define vp vector<pair<ll, ll>>
#define all(v) (v).begin(), (v).end()
#define sortve(v) sort(all(v))
#define rsrt(v) sort(v.rbegin(), v.rend())
#define rev(i, n) for (ll i = n - 1; i >= 0; i--)
#define f(i, n) for (ll i = 0; i < n; i++)
#define f1(i, n) for (ll i = 1; i < n + 1; i++)
#define f2(i, a, b) for (ll i = a; i < b; i++)
#define precision(x) cout << fixed << setprecision(x);
#define testcase \
    ll t;        \
    cin >> t;    \
    while (t--)
#define fast                      \
    ios_base::sync_with_stdio(0); \
    cin.tie(nullptr);             \
    cout.tie(nullptr)
#define bas cout << "\n";
const ll PI = 3.1415926535897932384626;
const ll mod = 1000000007;
const ll FMOD = 998244353;
const ll N = 100005;
const double eps = 1e-9;

// Let's Go 😇
ve v;
int main()
{

    testcase
    {
        ll n;
        cin >> n;
        ll z = n + n / 4;
        while (z % 4 != 0)
        {
            z++;
        }
        v.push_back(z);
        ll val, cnt = 0;
        for (ll i = z; i < 4 * z + 1; i++)
        {
            ll x = v.size();
            val = 0;
            f(j, x)
            {
                if ((v[j] % i) != 0 && (i % v[j]) != 0 && (__gcd(v[j], i)) != 1)
                {
                    val++;
                }
            }
            if (val == x)
            {
                v.pb(i);
                cnt++;
            }
        }
        f(i, n)
        {
            cout << v[i] << " ";
        }
        v.clear();
        bas
    }
}

/* SERIOUSLY, It ⬇ ain't a JOKE ⬇ */

/* The problem  is either
   in conditional statements
   or the increments or %mod or
   endl or you are printing
   something else*/


#include <bits/stdc++.h>
#include <iostream>
using namespace std;
typedef long long ll;
#define F first
#define S second
#define pb push_back
#define ve vector<ll>
#define vp vector<pair<ll, ll>>
#define all(v) (v).begin(), (v).end()
#define sortve(v) sort(all(v))
#define rsrt(v) sort(v.rbegin(), v.rend())
#define rev(i, n) for (ll i = n - 1; i >= 0; i--)
#define f(i, n) for (ll i = 0; i < n; i++)
#define f1(i, n) for (ll i = 1; i < n + 1; i++)
#define f2(i, a, b) for (ll i = a; i < b; i++)
#define precision(x) cout << fixed << setprecision(x);
#define testcase \
    ll t;        \
    cin >> t;    \
    while (t--)
#define fast                      \
    ios_base::sync_with_stdio(0); \
    cin.tie(nullptr);             \
    cout.tie(nullptr)
#define bas cout << "\n";
const ll PI = 3.1415926535897932384626;
const ll mod = 1000000007;
const ll FMOD = 998244353;
const ll N = 100005;
const double eps = 1e-9;

// Let's Go 😇
ve v;
int main()
{
    v.push_back(4);
    v.push_back(6);
    ll x = 98, y = 6;
    while (x--)
    {
        v.push_back(4 + y);
        y = y + 4;
    }
    testcase
    {
        ll n;
        cin >> n;
        f(i, n)
        {
            cout << v[i] << " ";
        }
        bas
    }
}

/* SERIOUSLY, It ⬇ ain't a JOKE ⬇ */

/* The problem  is either
   in conditional statements
   or the increments or %mod or
   endl or you are printing
   something else*/


#include <bits/stdc++.h>
#include <iostream>
using namespace std;
typedef long long ll;
#define F first
#define S second
#define pb push_back
#define ve vector<ll>
#define vp vector<pair<ll, ll>>
#define all(v) (v).begin(), (v).end()
#define sortve(v) sort(all(v))
#define rsrt(v) sort(v.rbegin(), v.rend())
#define rev(i, n) for (ll i = n - 1; i >= 0; i--)
#define f(i, n) for (ll i = 0; i < n; i++)
#define f1(i, n) for (ll i = 1; i < n + 1; i++)
#define f2(i, a, b) for (ll i = a; i < b; i++)
#define precision(x) cout << fixed << setprecision(x);
#define testcase \
    ll t;        \
    cin >> t;    \
    while (t--)
#define fast                      \
    ios_base::sync_with_stdio(0); \
    cin.tie(nullptr);             \
    cout.tie(nullptr)
#define bas cout << "\n";
const ll PI = 3.1415926535897932384626;
const ll mod = 1000000007;
const ll FMOD = 998244353;
const ll N = 100005;
const double eps = 1e-9;

// Let's Go 😇

int main()
{
    testcase
    {
        ll n, cnt = 0, val = 0;
        cin >> n;
        ve v;
        for (ll i = 4; i < 4 * n + 1 && cnt < n; i++)
        {
            if (v.empty() != true)
            {
                ll x = v.size();
                val = 0;
                f(j, x)
                {
                    if ((v[j] % i) != 0 && (i % v[j]) != 0 && (__gcd(v[j], i)) != 1)
                    {
                        val++;
                    }
                }
                // cout << val << " ";

                if (val == x)
                {
                    v.pb(i);
                    cnt++;
                }
            }
            else
            {
                v.pb(i);
            }
        }
        f(i, n)
        {
            cout << v[i] << " ";
        }
        bas
    }
}

/* SERIOUSLY, It ⬇ ain't a JOKE ⬇ */

/* The problem  is either
   in conditional statements
   or the increments or %mod or
   endl or you are printing
   something else*/


#include <bits/stdc++.h>
#include <iostream>
using namespace std;
typedef long long ll;
#define F first
#define S second
#define pb push_back
#define ve vector<ll>
#define vp vector<pair<ll, ll>>
#define all(v) (v).begin(), (v).end()
#define sortve(v) sort(all(v))
#define rsrt(v) sort(v.rbegin(), v.rend())
#define rev(i, n) for (ll i = n - 1; i >= 0; i--)
#define f(i, n) for (ll i = 0; i < n; i++)
#define f1(i, n) for (ll i = 1; i < n + 1; i++)
#define f2(i, a, b) for (ll i = a; i < b; i++)
#define precision(x) cout << fixed << setprecision(x);
#define testcase \
    ll t;        \
    cin >> t;    \
    while (t--)
#define fast                      \
    ios_base::sync_with_stdio(0); \
    cin.tie(nullptr);             \
    cout.tie(nullptr)
#define bas cout << "\n";
const ll PI = 3.1415926535897932384626;
const ll mod = 1000000007;
const ll FMOD = 998244353;
const ll N = 100005;
const double eps = 1e-9;

// Let's Go 😇
ve v;
int main()
{

    testcase
    {
        ll n;
        cin >> n;
        ll z = 2 * n;
        ll val, cnt = 0;
        for (ll i = z; i < 4 * z; i = i + 2)
        {
            v.push_back(i);
        }
        f(i, n)
        {
            cout << v[i] << " ";
        }
        v.clear();
        bas
    }
}

/* SERIOUSLY, It ⬇ ain't a JOKE ⬇ */

/* The problem  is either
   in conditional statements
   or the increments or %mod or
   endl or you are printing
   something else*/


//
//  Ya Ali
//
#include<bits/stdc++.h>

using namespace std;

typedef long long ll;
#define forn(i, n) for(int i = 0; i < int(n); ++i)
int f(int x) {
    int c = 0;
    while (x) x/= 2, c++;
    return c;
}

void solve()
{
             int n;
        cin >> n;
        vector<int> ans;
        int k = 4;
        cout << 4 << " ";
        for (int i = 1; i < n; i++)
        {
            cout << k * 2 - 2 << " ";
            k += 2;
        }
        cout << "\n";
}

int main() {
    ios::sync_with_stdio(false);
    cin.tie(NULL);

    int q = 1;
    cin >> q;
    for ( ; q > 0; --q)
        solve();

    return 0;
}


//
//  Ya Ali
//
#include<bits/stdc++.h>

using namespace std;

typedef long long ll;
#define forn(i, n) for(int i = 0; i < int(n); ++i)
int f(int x) {
    int c = 0;
    while (x) x/= 2, c++;
    return c;
}

void solve()
{
             int n;
        cin >> n;
        for (int i = 1; i <= n; i++)
            cout << 8 * i - 2  << " ";
        cout << "\n";
}

int main() {
    ios::sync_with_stdio(false);
    cin.tie(NULL);

    int q = 1;
    cin >> q;
    for ( ; q > 0; --q)
        solve();

    return 0;
}


//
//  Ya Ali
//
#include<bits/stdc++.h>

using namespace std;

typedef long long ll;
#define forn(i, n) for(int i = 0; i < int(n); ++i)
int f(int x) {
    int c = 0;
    while (x) x/= 2, c++;
    return c;
}

void solve()
{
            int n;
        cin >> n;
        int c = 1;
        int s = 4;
        int k = 2;
        cout << 4 << " ";
        forn(i, n - 1)
        {
            if (c == 2) c = 0, k += 2;
            cout << s + k << " ";
            s += k;
            c++;
        }
        cout << "\n";

int main() {
    ios::sync_with_stdio(false);
    cin.tie(NULL);

    int q = 1;
    cin >> q;
    for ( ; q > 0; --q)
        solve();

    return 0;
}


#include<bits/stdc++.h>

using namespace std;

template <typename A, typename B>
string to_string(pair<A, B> p);

template <typename A, typename B, typename C>
string to_string(tuple<A, B, C> p);

template <typename A, typename B, typename C, typename D>
string to_string(tuple<A, B, C, D> p);

string to_string(const string& s) {
    return '"' + s + '"';
}

string to_string(const char* s) {
    return to_string((string) s);
}

string to_string(bool b) {
    return (b ? "true" : "false");
}

string to_string(vector<bool> v) {
    bool first = true;
    string res = "{";
    for (int i = 0; i < static_cast<int>(v.size()); i++) {
        if (!first) {
            res += ", ";
        }
        first = false;
        res += to_string(v[i]);
    }
    res += "}";
    return res;
}

template <size_t N>
string to_string(bitset<N> v) {
    string res = "";
    for (size_t i = 0; i < N; i++) {
        res += static_cast<char>('0' + v[i]);
    }
    return res;
}

template <typename A>
string to_string(A v) {
    bool first = true;
    string res = "{";
    for (const auto &x : v) {
        if (!first) {
            res += ", ";
        }
        first = false;
        res += to_string(x);
    }
    res += "}";
    return res;
}

template <typename A, typename B>
string to_string(pair<A, B> p) {
    return "(" + to_string(p.first) + ", " + to_string(p.second) + ")";
}

template <typename A, typename B, typename C>
string to_string(tuple<A, B, C> p) {
    return "(" + to_string(get<0>(p)) + ", " + to_string(get<1>(p)) + ", " + to_string(get<2>(p)) + ")";
}

template <typename A, typename B, typename C, typename D>
string to_string(tuple<A, B, C, D> p) {
    return "(" + to_string(get<0>(p)) + ", " + to_string(get<1>(p)) + ", " + to_string(get<2>(p)) + ", " + to_string(get<3>(p)) + ")";
}

void debug_out() { cerr << endl; }

template <typename Head, typename... Tail>
void debug_out(Head H, Tail... T) {
    cerr << " " << to_string(H);
    debug_out(T...);
}
#define debug(...) cerr << "{" << #__VA_ARGS__ << "}:", debug_out(__VA_ARGS__)

#define ll long long
#define ull unsigned long long
#define ld long double
#define pb push_back
#define eb emplace_back
#define mp make_pair
#define all(x) x.begin(), x.end()
#define rall(x) x.rbegin(), x.rend()
#define sz(s) (int)s.size()
#define bs(x) (bitset<32>(x)).to_string()
#define bs64(x) (bitset<64>(x)).to_string()
#define ubs64(x) (bitset<65>(x)).to_string()
#define bit(x) __builtin_popcount(x)
#define bit64(x) __builtin_popcountll(x)
#define smin(x, y) (x) = min((x), (y))
#define smax(x, y) (x) = max((x), (y))
#define forn(i, n) for(int i = 0; i < int(n); ++i)

typedef pair<int, int> pii;
typedef pair<int, pair<int, int>> piii;
typedef pair<ll, ll> pll;
typedef pair<ll, pair<ll, ll>> plll;

const double PI = 3.14159265359;
const int mod = 1e9 + 7;
const int inf = INT_MAX;
const ll inf64 = LLONG_MAX;
const ull uinf64 = ULLONG_MAX;

bool isPrime(int n)
{
    // Corner cases
    if (n <= 1)
        return false;
    if (n <= 3)
        return true;

    // This is checked so that we can skip
    // middle five numbers in below loop
    if (n % 2 == 0 || n % 3 == 0)
        return false;

    for (int i = 5; i * i <= n; i = i + 6)
        if (n % i == 0 || n % (i + 2) == 0)
            return false;

    return true;
}
int main() {
    ios_base::sync_with_stdio(false);
    cin.tie(0);

    int T;
    cin >> T;
    while (T--) {
        int n;
        cin >> n;
        vector<int> ans;
        int k = 4;
        cout << 4 << " ";
        for (int i = 1; i < n; i++)
        {
            cout << k * 2 - 2 << " ";
            k += 2;
        }
        cout << "\n";
    }

}


//
//  Ya Ali
//
#include<bits/stdc++.h>

using namespace std;

typedef long long ll;
#define forn(i, n) for(int i = 0; i < int(n); ++i)
int f(int x) {
    int c = 0;
    while (x) x/= 2, c++;
    return c;
}

void solve()
{
        int n;
        cin >> n;
        int i = 6;
        cout << 4 << " ";
        n--;
        while (n--)
        {
            while(i % 4 == 0) i += 2;
            cout << i << " ";
            i += 2;
        }
        cout << "\n";
}

int main() {
    ios::sync_with_stdio(false);
    cin.tie(NULL);

    int q = 1;
    cin >> q;
    for ( ; q > 0; --q)
        solve();

    return 0;
}


//
//  Ya Ali
//
#include<bits/stdc++.h>

using namespace std;

typedef long long ll;
#define forn(i, n) for(int i = 0; i < int(n); ++i)
int f(int x) {
    int c = 0;
    while (x) x/= 2, c++;
    return c;
}

void solve()
{
             int n;
        cin >> n;
        int k = 2;
        for(int i = 0; i < n; i++) cout << k << " ", k += 2;
        cout << "\n";
}

int main() {
    ios::sync_with_stdio(false);
    cin.tie(NULL);

    int q = 1;
    cin >> q;
    for ( ; q > 0; --q)
        solve();

    return 0;
}


//
//  Ya Ali
//
#include<bits/stdc++.h>

using namespace std;

typedef long long ll;
#define forn(i, n) for(int i = 0; i < int(n); ++i)
int f(int x) {
    int c = 0;
    while (x) x/= 2, c++;
    return c;
}

void solve()
{
              int n;
        cin >> n;
        int s = 4 * n;
        while (n--)
        {
            cout << s << " ";
            s -= 2;
        }
        cout << "\n";
}
int main() {
    ios::sync_with_stdio(false);
    cin.tie(NULL);

    int q = 1;
    cin >> q;
    for ( ; q > 0; --q)
        solve();

    return 0;
}


//
//  Ya Ali
//
#include<bits/stdc++.h>

using namespace std;

typedef long long ll;
#define forn(i, n) for(int i = 0; i < int(n); ++i)
int f(int x) {
    int c = 0;
    while (x) x/= 2, c++;
    return c;
}

void solve()
{
            int n;
        cin >> n;
        int c = 1;
        int s = 4;
        int k = 2;
        cout << 4 << " ";
        forn(i, n - 1)
        {
            if (c == 2) c = 0, k += 2;
            cout << s + k << " ";
            s += k;
            c++;
        }
        cout << "\n";
}
int main() {
    ios::sync_with_stdio(false);
    cin.tie(NULL);

    int q = 1;
    cin >> q;
    for ( ; q > 0; --q)
        solve();

    return 0;
}


#include<bits/stdc++.h>
const int maxn = 800+10;
using namespace std;
bool st[maxn];
int gcd(int a,int b)
{
	if(!b) return a;
	return gcd(b,a%b);
}
bool solves(vector<int>&a,int b)
{
	for(auto i:a)
	{
		if(gcd(i,b)==1) return false;
	}
	for(int i=0;i<a.size();i++)
	{
		if(b%a[i]==0) return false;
	}
	return true;
}
int t,n;
int main()
{
	ios::sync_with_stdio(false);
	cin.tie(0);cout.tie(0);
	cin>>t;
	while(t--)
	{
		cin>>n;
		vector<int>a;
		int ans = 4*n;
		a.push_back(ans);
		for(int i=1;i<=n;i++)
		{
			while(!solves(a,ans)) ans-=2;
			a.push_back(ans);
			cout<<ans<<' ';
		}
		cout<<endl;
	}
	return 0;
 }


#include<bits/stdc++.h>
const int maxn = 800+10;
using namespace std;
bool st[maxn];
void init()
{
	for(int i=2;i<=200;i++)
	{
		st[i*4]=true;
	}
	for(int i=1;i<=100;i++)
	{
		st[i*10]=true;
	}
}
int t,n;
int main()
{
	ios::sync_with_stdio(false);
	cin.tie(0);cout.tie(0);
	cin>>t;
	init();
	while(t--)
	{
		cin>>n;
		int ans=2;
		for(int i=1;i<=n;i++)
		{
			ans+=2;
			while(st[ans])
				ans+=2;
				cout<<ans<<" ";
		}
		cout<<endl;
	}
	return 0;
 }


#include<bits/stdc++.h>
const int maxn = 800+10;
using namespace std;
bool st[maxn];
int gcd(int a,int b)
{
	if(!b) return a;
	return gcd(b,a%b);
}
bool solves(vector<int>&a,int b)
{
	for(auto i:a)
	{
		if(gcd(i,b)==1) return false;
	}
	for(int i=0;i<a.size();i++)
	{
		if(b%a[i]==0) return false;
	}
	return true;
}
int t,n;
int main()
{
	ios::sync_with_stdio(false);
	cin.tie(0);cout.tie(0);
	cin>>t;
	while(t--)
	{
		cin>>n;
		vector<int>a;
		int ans = 4;
		a.push_back(ans);
		for(int i=1;i<=n;i++)
		{
			while(!solves(a,ans)) ans+=2;
			a.push_back(ans);
			cout<<ans<<' ';
		}
		cout<<endl;
	}
	return 0;
 }


#include<bits/stdc++.h>
const int maxn = 800+10;
using namespace std;
bool st[maxn];
void init()
{
	for(int i=2;i<=200;i++)
	{
		st[i*4]=true;
	}
}
int t,n;
int main()
{
	ios::sync_with_stdio(false);
	cin.tie(0);cout.tie(0);
	cin>>t;
	init();
	while(t--)
	{
		cin>>n;
		int ans=2;
		for(int i=1;i<=n;i++)
		{
			ans+=2;
			if(st[ans]){
				ans+=2;
				cout<<ans<<" ";
			}
			else{
				cout<<ans<<" ";
			}
		}
		cout<<endl;
	}
	return 0;
 }


#include<bits/stdc++.h>
const int maxn = 800+10;
using namespace std;
bool st[maxn];
void init()
{
	for(int i=2;i<=200;i++)
	{
		st[i*4]=true;
	}
	for(int i=1;i<=100;i++)
	{
		st[i*10]=true;
	}
}
int t,n;
int main()
{
	ios::sync_with_stdio(false);
	cin.tie(0);cout.tie(0);
	cin>>t;
	init();
	while(t--)
	{
		cin>>n;
		int ans=4;
		for(int i=1;i<=n;i++)
		{
			ans+=2;
			while(st[ans])
				ans+=2;
				cout<<ans<<" ";
		}
		cout<<endl;
	}
	return 0;
 }


#include<bits/stdc++.h>
const int maxn = 200+10;
using namespace std;
bool st[maxn];
void init()
{
	for(int i=2;i<=50;i++)
	{
		st[i*4]=true;
	}
}
int t,n;
int main()
{
	ios::sync_with_stdio(false);
	cin.tie(0);cout.tie(0);
	cin>>t;
	init();
	while(t--)
	{
		cin>>n;
		int ans=2;
		for(int i=1;i<=n;i++)
		{
			ans+=2;
			if(st[ans]){
				ans+=2;
				cout<<ans<<" ";
			}
			else{
				cout<<ans<<" ";
			}
		}
		cout<<endl;
	}
	return 0;
 }


#include <bits/stdc++.h>
using namespace std;

bool prime(int no)
{
    if (no <= 1)
        return false;

    for (int i = 2; i < no; i++)
        if (no % i == 0)
            return false;

    return true;
}
int main()
{
    int t;
    cin>>t;
    while(t--)
    {
        int n;
        cin>>n;
        int l=n;
        vector<int> v;
        for(int i=2; i<=4*n; i++)
        {
            if(prime(i))
                v.push_back(i);
        }
        int i=1;
        while(i<v.size() && l>0)
        {
            if(v[i]>2*n)
                break;
            cout<<2*v[i]<<" ";
            l--;
            i++;

        }
        int b=v.size();
        while(l>0)
        {
            cout<<v[b-1]<<" ";
            l--;
            b--;
        }
        cout<<endl;
    }

	return 0;
}


#include <bits/stdc++.h>
using namespace std;

int main()
{
    int t;
    cin>>t;
    while(t--)
    {
        int n;
        cin>>n;
        int l=n;
        int i=4*n-1;
        while(l>0 && i>2)
        {
            if(i%2==0)
            {
                cout<<i<<" ";
                l--;
            }
            i--;
        }
        cout<<endl;
    }

	return 0;
}


#include <bits/stdc++.h>
using namespace std;

int main()
{
    int t;
    cin>>t;
    while(t--)
    {
        int n;
        cin>>n;
        int l=n;
        vector<int> v;
        int i=4*n;
        while(l>=0)
        {
            if(i%2==0)
                cout<<i<<" ";
            i--;
            l--;
        }
        cout<<endl;
    }

	return 0;
}


#include <bits/stdc++.h>
using namespace std;

int main()
{
    int t;
    cin>>t;
    while(t--)
    {
        int n;
        cin>>n;
        int l=n;
        int i=4*n-2;
        while(l>0)
        {
            cout<<i<<" ";
            l--;
            i=i-2;
        }
        cout<<endl;
    }

	return 0;
}


#include <bits/stdc++.h>
using namespace std;

int main()
{
    int t;
    cin>>t;
    while(t--)
    {
        int n;
        cin>>n;
        int l=n;
        int i=4*n-1;
        while(l>0)
        {
            if(i%2==0)
            {
                cout<<i<<" ";
                l--;
            }
            i--;
        }
        cout<<endl;
    }

	return 0;
}


#include <bits/stdc++.h>
using namespace std;

bool prime(int no)
{
    if (no <= 1)
        return false;

    for (int i = 2; i < no; i++)
        if (no % i == 0)
            return false;

    return true;
}
int main()
{
    int t;
    cin>>t;
    while(t--)
    {
        int n;
        cin>>n;
        int l=n;
        vector<int> v;
        for(int i=2; i<=4*n; i++)
        {
            if(prime(i))
                v.push_back(i);
        }
        int i=0;
        while(i<v.size() && l>0)
        {
            if(v[i]>2*n)
                break;
            cout<<2*v[i]<<" ";
            l--;
            i++;

        }
        int b=v.size();
        while(l>0)
        {
            cout<<v[b-1]<<" ";
            l--;
            b--;
        }
        cout<<endl;
    }

	return 0;
}


#include<bits/stdc++.h>

// Include file

using namespace std;
using ll = long long;

#define ar array
#define vt vector
#define pii pair<int, int>
#define mp make_pair
#define psh push_back
#define rel pop_back
#define que queue

// I need a bad bish, addison rae

#define lb lower_bound
#define ub upper_bound
#define str string
#define FOR(i, v) for(int i =0; i < v; i++)
#define FORd(i, v) for(int i = v; i>=0; i--)
#define make_graph(a) vector<int> a[10000]
#define ld loung double

// You know, we know, psych you don't know...
const int subs = 20;
const int temps = 1e4 + subs;
int a[temps];
int b[temps];
int c[temps];

vector<int> edges[20000];

namespace number_theory {
    const int mod =(int) 1e9+7;
    int gcd(int x, int y) {
        return __gcd(x, y);
    }
    ll gcd(ll x, ll y) {
        return __gcd(x, y);
    }
    vector<int> sieve(int x){
        assert(x<100000&&x>1);
        bool a[100000];
        vector<int> s;
        memset(a, 1, sizeof(a));
        // N times, primes occur n / log n times, from 1 to n, which means the efficiency is n log (log n)
        for(int i = 2; i<= x; i++){
            if(a[i]) {
                for(int p = i*i; p<=x; p+=i) {
                    a[p]=0;
                }
            }
        }

        for(int i = 2; i<=x; i++){
            if(a[i]) s.push_back(i);
        }
        return s;
    }
    vector<int> factors(int x) {
        set<int> fac;
        vector<int> space;
        for(int i = 1; i<= int(sqrt(x)); i++) {
            if(x%i==0) {
                fac.insert(x/i);
                fac.insert(i);
            }
        }

        for(auto &y : fac) {
            space.push_back(y);
        }
        return space;
    }
    int lcm(int x, int y) {
        int ans = x*y/__gcd(x, y);
        return ans;
    }
    bool prime(int x) {
        for(int i = 2; i<=int(sqrt(x)); i++) {
            if(x%i==0) return false;
        }
        return true;
    }
    vector<pair<int, int>> prime_factors(int x) {
        assert(x<10000);
        vector<int> a = sieve(x);
        vector<int> b(10000);
        int n = x;
        for(auto &i : a) {
            while(n%i==0){
                n/=i;
                b[i]++;
            }
        }
        vector<pair<int, int>> result;
        for(int i =0; i < 10000; i++) {
            if(b[i]>0) {
                result.push_back(make_pair(i, b[i]));
            }
        }
        return result;
    }
}
void solve() {
    int n; scanf("%d",&n);
    int x = 4;
    int t=1;
    vector<int> vals = number_theory::sieve(1000);
    for(int i =0; i < n; i++) {
        cout << 2*vals[i] << " ";
    }
    cout << '\n';

    // int n; scanf("%d",&n);
    // string s; cin >> s;
    // for(int i =0; i < n; i++) {

    // }
}

int main() {
    cin.tie(0);
    int tt; scanf("%d",&tt);
    for(int i =0; i < tt; i++)
        solve();

}


#include<bits/stdc++.h>

// Include file

using namespace std;
using ll = long long;

#define ar array
#define vt vector
#define pii pair<int, int>
#define mp make_pair
#define psh push_back
#define rel pop_back
#define que queue

// I need a bad bish, addison rae

#define lb lower_bound
#define ub upper_bound
#define str string
#define FOR(i, v) for(int i =0; i < v; i++)
#define FORd(i, v) for(int i = v; i>=0; i--)

// You know, we know, psych you don't know...
const int subs = 20;
const int temps = 1e4 + subs;

vector<int> soe(int n)
{
    // Create a boolean array "prime[0..n]" and initialize
    // all entries it as true. A value in prime[i] will
    // finally be false if i is Not a prime, else true.
    bool prime[n+1];
    memset(prime, true, sizeof(prime));
    vector<int> g;

    for (int p=2; p*p<=n; p++)
    {
        // If prime[p] is not changed, then it is a prime
        if (prime[p] == true)
        {

            for (int i=p*p; i<=n; i += p)
                prime[i] = false;
        }
    }
    for(int i =2; i<= n; i++) {
        if(prime[i]==true){
            g.push_back(i);
        }
    }

    // Print all prime numbers

    return g;
}

namespace number_theory {
    const int mod =(int) 1e9+7;
    int gcd(int x, int y) {
        return __gcd(x, y);
    }
    ll gcd(ll x, ll y) {
        return __gcd(x, y);
    }
    vector<int> sieve(int x){
        assert(x<100000);
        bool a[10000];
        vector<int> s;
        memset(a, true, sizeof(a));
        // N times, primes occur n / log n times, from 1 to n, which means the efficiency is n log (log n)
        for(int i = 2; i<= x; i++){
            if(a[i]) {
                for(int p = i*i; p<=x; p+=i) {
                    a[p]=false;
                }
            }
        }

        for(int i = 2; i<=x; i++){
            if(a[i]) s.psh(i);
        }
        return s;
    }
    vector<int> factors(int x) {
        set<int> fac;
        vector<int> space;
        for(int i = 1; i<= int(sqrt(x)); i++) {
            if(x%i==0) {
                fac.insert(x/i);
                fac.insert(i);
            }
        }

        for(auto &y : fac) {
            space.push_back(y);
        }
        return space;
    }
    int lcm(int x, int y) {
        int ans = x*y/__gcd(x, y);
        return ans;
    }
    bool prime(int x) {
        for(int i = 2; i<=int(sqrt(x)); i++) {
            if(x%i==0) return false;
        }
        return true;
    }
    vector<pair<int, int>> prime_factors(int x) {
        assert(x<10000);
        vector<int> a = sieve(x);
        vector<int> b(10000);
        int n = x;
        for(auto &i : a) {
            while(n%i==0){
                n/=i;
                b[i]++;
            }
        }
        vector<pair<int, int>> result;
        for(int i =0; i < 10000; i++) {
            if(b[i]>0) {
                result.push_back(make_pair(i, b[i]));
            }
        }
        return result;
    }
}
int main() {
	cin.tie(0);
	ios::sync_with_stdio(0);
	int n;
    cin >> n;
    for(int i =0; i < n; i++){
        int tt;
        cin >> tt;

        vector<int> v=soe(1000);
        vector<int> b;
        for(int j =0; j < tt; j++) {
            b.push_back(v[j]*2);
        }
        for(auto &y: b) {
            cout << y << " ";
        }
        cout << "\n";
    }
}


#include<bits/stdc++.h>

// Include file

using namespace std;
using ll = long long;

#define ar array
#define vt vector
#define pii pair<int, int>
#define mp make_pair
#define psh push_back
#define rel pop_back
#define que queue

// I need a bad bish, addison rae

#define lb lower_bound
#define ub upper_bound
#define str string
#define FOR(i, v) for(int i =0; i < v; i++)
#define FORd(i, v) for(int i = v; i>=0; i--)
#define make_graph(a) vector<int> a[10000]
#define ld loung double

// You know, we know, psych you don't know...
const int subs = 20;
const int temps = 1e4 + subs;
int a[temps];
int b[temps];
int c[temps];

vector<int> edges[20000];

namespace number_theory {
    const int mod =(int) 1e9+7;
    int gcd(int x, int y) {
        return __gcd(x, y);
    }
    ll gcd(ll x, ll y) {
        return __gcd(x, y);
    }
    vector<ll> sieve(int x){
        assert(x<100000&&x>1);
        bool a[100000];
        vector<ll> s;
        memset(a, 1, sizeof(a));
        // N times, primes occur n / log n times, from 1 to n, which means the efficiency is n log (log n)
        for(int i = 2; i<= x; i++){
            if(a[i]) {
                for(int p = i*i; p<=x; p+=i) {
                    a[p]=0;
                }
            }
        }

        for(int i = 2; i<=x; i++){
            if(a[i]) s.push_back(i);
        }
        return s;
    }
    vector<int> factors(int x) {
        set<int> fac;
        vector<int> space;
        for(int i = 1; i<= int(sqrt(x)); i++) {
            if(x%i==0) {
                fac.insert(x/i);
                fac.insert(i);
            }
        }

        for(auto &y : fac) {
            space.push_back(y);
        }
        return space;
    }
    int lcm(int x, int y) {
        int ans = x*y/__gcd(x, y);
        return ans;
    }
    bool prime(int x) {
        for(int i = 2; i<=int(sqrt(x)); i++) {
            if(x%i==0) return false;
        }
        return true;
    }
    vector<pair<int, int>> prime_factors(int x) {
        assert(x<10000);
        vector<ll> a = sieve(x);
        vector<int> b(10000);
        int n = x;
        for(auto &i : a) {
            while(n%i==0){
                n/=i;
                b[i]++;
            }
        }
        vector<pair<int, int>> result;
        for(int i =0; i < 10000; i++) {
            if(b[i]>0) {
                result.push_back(make_pair(i, b[i]));
            }
        }
        return result;
    }
}
void solve() {
    int n; scanf("%d",&n);
    int x = 4;
    int t=1;

    vector<ll> vals = number_theory::sieve(4*n);
    for(int i =0; i < n; i++) {
        cout << ll(2*vals[i]) << " ";
    }
    cout << '\n';

    // int n; scanf("%d",&n);
    // string s; cin >> s;
    // for(int i =0; i < n; i++) {

    // }
}

int main() {
    cin.tie(0);
    int tt; scanf("%d",&tt);
    for(int i =0; i < tt; i++)
        solve();

}


#include<bits/stdc++.h>

// Include file

using namespace std;
using ll = long long;

#define ar array
#define vt vector
#define pii pair<int, int>
#define mp make_pair
#define psh push_back
#define rel pop_back
#define que queue

// I need a bad bish, addison rae

#define lb lower_bound
#define ub upper_bound
#define str string
#define FOR(i, v) for(int i =0; i < v; i++)
#define FORd(i, v) for(int i = v; i>=0; i--)
#define make_graph(a) vector<int> a[10000]
#define ld loung double

// You know, we know, psych you don't know...
const int subs = 20;
const int temps = 1e4 + subs;

const int mxe = 2e5;
vector<int> edges[mxe];

namespace number_theory {
    const int mod =(int) 1e9+7;
    int gcd(int x, int y) {
        return __gcd(x, y);
    }
    ll gcd(ll x, ll y) {
        return __gcd(x, y);
    }
    vector<int> sieve(int x){
        assert(x<100000&&x>1);
        bool a[100000];
        vector<int> s;
        memset(a, 1, sizeof(a));
        // N times, primes occur n / log n times, from 1 to n, which means the efficiency is n log (log n)
        for(int i = 2; i<= x; i++){
            if(a[i]) {
                for(int p = i*i; p<=x; p+=i) {
                    a[p]=0;
                }
            }
        }

        for(int i = 2; i<=x; i++){
            if(a[i]) s.push_back(i);
        }
        return s;
    }
    vector<int> factors(int x) {
        set<int> fac;
        vector<int> space;
        for(int i = 1; i<= int(sqrt(x)); i++) {
            if(x%i==0) {
                fac.insert(x/i);
                fac.insert(i);
            }
        }

        for(auto &y : fac) {
            space.push_back(y);
        }
        return space;
    }
    int lcm(int x, int y) {
        int ans = x*y/__gcd(x, y);
        return ans;
    }
    bool prime(int x) {
        for(int i = 2; i<=int(sqrt(x)); i++) {
            if(x%i==0) return false;
        }
        return true;
    }
    vector<pair<int, int>> prime_factors(int x) {
        assert(x<10000);
        vector<int> a = sieve(x);
        vector<int> b(10000);
        int n = x;
        for(auto &i : a) {
            while(n%i==0){
                n/=i;
                b[i]++;
            }
        }
        vector<pair<int, int>> result;
        for(int i =0; i < 10000; i++) {
            if(b[i]>0) {
                result.push_back(make_pair(i, b[i]));
            }
        }
        return result;
    }
}
int main() {
	cin.tie(0);
	ios::sync_with_stdio(0);

    int a;
    cin >> a;
    for(int i =0; i < a; i++) {
        int b;
        cin >> b;
        vector<int> v;
        for(int i =1; i <= b; i++) {
            v.push_back((2*b+2*i));
        }
        for(auto &x : v) {
            cout << x << " ";

        }
        cout << '\n';
    }

}


#include<bits/stdc++.h>

// Include file

using namespace std;
using ll = long long;

#define ar array
#define vt vector
#define pii pair<int, int>
#define mp make_pair
#define psh push_back
#define rel pop_back
#define que queue

// I need a bad bish, addison rae

#define lb lower_bound
#define ub upper_bound
#define str string
#define FOR(i, v) for(int i =0; i < v; i++)
#define FORd(i, v) for(int i = v; i>=0; i--)
#define make_graph(a) vector<int> a[10000]
#define ld loung double

// You know, we know, psych you don't know...
const int subs = 20;
const int temps = 1e4 + subs;
int a[temps];
int b[temps];
int c[temps];

template<typename... T>
void read(T&... args) {
	((cin >> args), ...);
}

void solve(int n) {
	cout << n << '\n';
}

namespace number_theory {
    const int mod =(int) 1e9+7;
    int gcd(int x, int y) {
        return __gcd(x, y);
    }
    ll gcd(ll x, ll y) {
        return __gcd(x, y);
    }
    vector<int> sieve(int x){
        assert(x<100000&&x>1);
        bool a[100000];
        vector<int> s;
        memset(a, 1, sizeof(a));
        // N times, primes occur n / log n times, from 1 to n, which means the efficiency is n log (log n)
        for(int i = 2; i<= x; i++){
            if(a[i]) {
                for(int p = i*i; p<=x; p+=i) {
                    a[p]=0;
                }
            }
        }

        for(int i = 2; i<=x; i++){
            if(a[i]) s.push_back(i);
        }
        return s;
    }
    vector<int> factors(int x) {
        set<int> fac;
        vector<int> space;
        for(int i = 1; i<= int(sqrt(x)); i++) {
            if(x%i==0) {
                fac.insert(x/i);
                fac.insert(i);
            }
        }

        for(auto &y : fac) {
            space.push_back(y);
        }
        return space;
    }
    int lcm(int x, int y) {
        int ans = x*y/__gcd(x, y);
        return ans;
    }
    bool prime(int x) {
        for(int i = 2; i<=int(sqrt(x)); i++) {
            if(x%i==0) return false;
        }
        return true;
    }
    vector<pair<int, int>> prime_factors(int x) {
        assert(x<10000);
        vector<int> a = sieve(x);
        vector<int> b(10000);
        int n = x;
        for(auto &i : a) {
            while(n%i==0){
                n/=i;
                b[i]++;
            }
        }
        vector<pair<int, int>> result;
        for(int i =0; i < 10000; i++) {
            if(b[i]>0) {
                result.push_back(make_pair(i, b[i]));
            }
        }
        return result;
    }
}
int main() {
	cin.tie(0);
	ios::sync_with_stdio(0);
	int n;
    cin >> n;
    for(int i =0; i < n; i++){
        int x;
        cin >> x;
        vector<int> v=number_theory::sieve(4*x);
        for(int i =0; i < x; i++) {
            cout << (v[i]*2) << " ";
        }
        cout << '\n';
    }
}


#include<bits/stdc++.h>

// Include file

using namespace std;
using ll = long long;

#define ar array
#define vt vector
#define pii pair<int, int>
#define mp make_pair
#define psh push_back
#define rel pop_back
#define que queue

// I need a bad bish, addison rae

#define lb lower_bound
#define ub upper_bound
#define str string
#define FOR(i, v) for(int i =0; i < v; i++)
#define FORd(i, v) for(int i = v; i>=0; i--)
#define make_graph(a) vector<int> a[10000]
#define ld loung double

// You know, we know, psych you don't know...
const int subs = 20;
const int temps = 1e4 + subs;
int a[temps];
int b[temps];
int c[temps];

template<typename... T>
void read(T&... args) {
	((cin >> args), ...);
}

void solve(int n) {
	cout << n << '\n';
}

namespace number_theory {
    const int mod =(int) 1e9+7;
    int gcd(int x, int y) {
        return __gcd(x, y);
    }
    ll gcd(ll x, ll y) {
        return __gcd(x, y);
    }
    vector<int> sieve(int x){
        assert(x<100000&&x>1);
        bool a[100000];
        vector<int> s;
        memset(a, 1, sizeof(a));
        // N times, primes occur n / log n times, from 1 to n, which means the efficiency is n log (log n)
        for(int i = 2; i<= x; i++){
            if(a[i]) {
                for(int p = i*i; p<=x; p+=i) {
                    a[p]=0;
                }
            }
        }

        for(int i = 2; i<=x; i++){
            if(a[i]) s.push_back(i);
        }
        return s;
    }
    vector<int> factors(int x) {
        set<int> fac;
        vector<int> space;
        for(int i = 1; i<= int(sqrt(x)); i++) {
            if(x%i==0) {
                fac.insert(x/i);
                fac.insert(i);
            }
        }

        for(auto &y : fac) {
            space.push_back(y);
        }
        return space;
    }
    int lcm(int x, int y) {
        int ans = x*y/__gcd(x, y);
        return ans;
    }
    bool prime(int x) {
        for(int i = 2; i<=int(sqrt(x)); i++) {
            if(x%i==0) return false;
        }
        return true;
    }
    vector<pair<int, int>> prime_factors(int x) {
        assert(x<10000);
        vector<int> a = sieve(x);
        vector<int> b(10000);
        int n = x;
        for(auto &i : a) {
            while(n%i==0){
                n/=i;
                b[i]++;
            }
        }
        vector<pair<int, int>> result;
        for(int i =0; i < 10000; i++) {
            if(b[i]>0) {
                result.push_back(make_pair(i, b[i]));
            }
        }
        return result;
    }
}
int main() {
	cin.tie(0);
	ios::sync_with_stdio(0);
	int n;
    cin >> n;
    for(int i =0; i < n; i++){
        int x;
        cin >> x;
        vector<int> v=number_theory::sieve(4*x);
        for(auto &y: v) {
            cout << (y*2) << " ";
        }
        cout << '\n';
    }
}


import java.math.BigInteger;
import java.util.*;
import java.io.*;
import java.lang.Math;
public class run {
    static class fr {
        BufferedReader br;
        StringTokenizer st;

        public fr() {
            br = new BufferedReader(new
                    InputStreamReader(System.in));
        }

        String next() {
            while (st == null || !st.hasMoreElements()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        int nextInt() {
            return Integer.parseInt(next());
        }

        long nextLong() {
            return Long.parseLong(next());
        }

        double nextDouble() {
            return Double.parseDouble(next());
        }

        String nextLine() {
            String str = "";
            try {
                str = br.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        }

        int[] readArr(int n) {
            int a[] = new int[n];
            for (int i = 0; i < n; i++) {
                a[i] = this.nextInt();
            }
            return a;
        }
    }

    static int sum(int[] a) {
        int s = 0;
        for (int i : a) s += i;
        return s;
    }

    static int min(int a[]) {
        int mn = 1000000000;
        for(int i : a) mn=Math.min(mn,i);
        return mn;
    }
    static int max(int a[]){
        int mx=-10000000;
        for(int i : a) mx=Math.max(mx,i);
        return mx;
    }
    static ArrayList<Integer> sieve(int n) {
        boolean primes[] = new boolean[n+1];
        ArrayList<Integer> s = new ArrayList<>();
        for(int i =0; i <= n; i++) primes[i] = true;
        for(int i =2; i <= n; i++) {
            if(primes[i]) {
                for(int j = i*i; j<=n; j+=i) {
                    primes[j] = false;
                }
            }
        }
        for(int i = 2; i<=n; i++) {
            if(primes[i]) s.add(i);
        }
        return s;
    }

    public static void main(String args[]) {
        fr s = new fr();
        int n = s.nextInt();
        for(int tt=0; tt<n; tt++) {
            int a=s.nextInt();
            ArrayList<Integer> mx = sieve(4*a);
            for(int i=0; i<a;i++) {
                try {
                    System.out.print(mx.get(i) * 2 + " ");
                } catch(Exception e) {
                    break;
                }
            }
            System.out.println();
        }
    }
}


#include <bits/stdc++.h>
using namespace std;
#define IOS ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#define ll long long
int main(){

#ifndef ONLINE_JUDGE
	freopen("input.txt","r",stdin);
	freopen("output.txt","w",stdout);
#endif

	IOS;
	int t;
    cin >> t;
    while(t--){
        int n;
        cin >> n;
        int temp=2;
        for(int i=1; i<=n; i++){
            cout << n+temp<<" ";
            temp+=2;
        }
        cout <<endl;
    }

}


#include <bits/stdc++.h>
using namespace std;
#define IOS ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#define ll long long
int main(){

#ifndef ONLINE_JUDGE
	freopen("input.txt","r",stdin);
	freopen("output.txt","w",stdout);
#endif

	IOS;
	int t;
    cin >> t;
    while(t--){
        int n;
        cin >> n;
        for(int i=1; i<=n; i++){
            cout << n*(i+1)<<" ";
        }
        cout <<endl;
    }

}


#include <bits/stdc++.h>
using namespace std;
#define IOS ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#define ll long long
int main(){

#ifndef ONLINE_JUDGE
	freopen("input.txt","r",stdin);
	freopen("output.txt","w",stdout);
#endif

	IOS;
	int t;
    cin >> t;
    while(t--){
        int n;
        cin >> n;
        cout << n <<" "<<n+1<<" "<<n+2<<endl;
    }

}


#include <bits/stdc++.h>
using namespace std;
#define IOS ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#define ll long long
int main(){

#ifndef ONLINE_JUDGE
	freopen("input.txt","r",stdin);
	freopen("output.txt","w",stdout);
#endif

	IOS;
	int t;
    cin >> t;
    while(t--){
        int n;
        cin >> n;
        int temp=2;
        int j = n;
        for(int i=1; i<=n; i++){
            cout << j*temp<<" ";
            j++;
        }
        cout <<endl;
    }
}


#include <bits/stdc++.h>
using namespace std;
#define IOS ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#define ll long long
int main(){

#ifndef ONLINE_JUDGE
	freopen("input.txt","r",stdin);
	freopen("output.txt","w",stdout);
#endif

	IOS;
	int t;
    cin >> t;
    while(t--){
        int n;
        cin >> n;
        cout << n <<" "<<(n*2)-1<<" "<<(n*3)-1<<endl;
    }

}


#include <bits/stdc++.h>
using namespace std;
#define IOS ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#define ll long long
int main(){

#ifndef ONLINE_JUDGE
	freopen("input.txt","r",stdin);
	freopen("output.txt","w",stdout);
#endif

	IOS;
	int t;
    cin >> t;
    while(t--){
        int n;
        cin >> n;
        int temp=2;
        int j =2;
        for(int i=1; i<=n; i++){
            cout << j*temp<<" ";
            j++;
        }
        cout <<endl;
    }
}


#include <bits/stdc++.h>
using namespace std;
#define IOS ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#define ll long long
int main(){

#ifndef ONLINE_JUDGE
	freopen("input.txt","r",stdin);
	freopen("output.txt","w",stdout);
#endif

	IOS;
	int t;
    cin >> t;
    while(t--){
        int n;
        cin >> n;
        int temp=2;
        for(int i=1; i<=n; i++){
            cout << n+temp<<" ";
            temp+=n;
        }
        cout <<endl;
    }
}


// ------------------------INCLUDES--------------------------- //

#include <iostream>
#include <fstream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <algorithm>
#include <map>
#include <set>
#include <vector>
#include <array>
#include <string>
#include <climits>
#include <ctime>
#include <cstdlib>
#include <queue>
#include <stack>

using namespace std;

// ----------------- Define-s and Typedef-s ------------------ //

typedef long long ll;
typedef long double ld;
typedef unsigned long long ull;

#define sz(x) (int)(x).size()
#define mn(a, n) *min_element(a, a + n)
#define mx(a, n) *max_element(a, a + n)
#define mnv(a) *min_element(all(a))
#define mxv(a) *max_element(all(a))
#define FOR(i, a) for (ull i=0;i<(a);++i)
#define FORD(i, a) for (ull i=(a)-1;i>=0;i--)
#define FORT(i,a,b) for (ull i=(a);i<=(b);++i)
#define FORTD(i,b,a) for (ull i=(b);i>=(a);--i)
#define trav(i,v) for (auto i : v)
#define all(v) v.begin(),v.end()
#define rall(v) v.rbegin(),v.rend()
#define ad push_back
#define fr first
#define sc second
#define mpr(a,b) make_pair(a,b)
#define pir pair<int,int>
#define vi vector<int>
#define vc vector<char>
#define vs vector<string>
#define vll vector<long long>
#define vull vector<unsigned long long>
#define fastio ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0);

// ----------------------FUNCTIONS-------------------------- //

template <typename T>
istream& operator >>(istream& input, vector <T>& s) {
	for (T& a : s) {
		input >> a;
	}
	return input;
}

template <typename T>
ostream& operator <<(ostream& output, vector <T>& s) {
	for (T& a : s) {
		output << a << ' ';
	}
	output << endl;
	return output;
}

template <typename T>
T gcd(T a, T b) {
	return !b ? a : gcd(b, a % b);
}

template <typename T>
T lcm(T a, T b) {
	return a / gcd(a, b) * b;
}

template <typename T>
int isPrime(T a) {
	if (a == 1) return 1;
	else if (a == 2) return 0;
	else if (!(a % 2)) return 2;
	else {
		for (ull i = 3; i * i <= a; i += 2) {
			if (!(a % i)) return i;
		}
	}
	return 0;
}

int vsum(vector <int> vec) {
	int sum = 0;
	trav(t, vec)
		sum += t;
	return sum;
}

int sumyd(ll n) {
	int sum = 0;
	while (n != 0) {
		sum += n % 10;
		n /= 10;
	}
	return sum;
}

ull fact(ull n) {
	if (n == 1) {
		return 1;
	}
	else {
		return n * fact(n - 1);
	}
}

// -----------------------SOLUTION----------------------------- //

void solve() {
	int n, a = 2, b = 1;
	cin >> n;
	FOR(i, n) {
		cout << a * b + 2 << ' ';
		b++;
	}
	cout << endl;
}

int main() {
	int t;
	cin >> t;
	while (t--) {
		solve();
	}
	return 0;
}


// ------------------------INCLUDES--------------------------- //

#include <iostream>
#include <fstream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <algorithm>
#include <map>
#include <set>
#include <vector>
#include <array>
#include <string>
#include <climits>
#include <ctime>
#include <cstdlib>
#include <queue>
#include <stack>

using namespace std;

// ----------------- Define-s and Typedef-s ------------------ //

typedef long long ll;
typedef long double ld;
typedef unsigned long long ull;

#define sz(x) (int)(x).size()
#define mn(a, n) *min_element(a, a + n)
#define mx(a, n) *max_element(a, a + n)
#define mnv(a) *min_element(all(a))
#define mxv(a) *max_element(all(a))
#define FOR(i, a) for (ull i=0;i<(a);++i)
#define FORD(i, a) for (ull i=(a)-1;i>=0;i--)
#define FORT(i,a,b) for (ull i=(a);i<=(b);++i)
#define FORTD(i,b,a) for (ull i=(b);i>=(a);--i)
#define trav(i,v) for (auto i : v)
#define all(v) v.begin(),v.end()
#define rall(v) v.rbegin(),v.rend()
#define ad push_back
#define fr first
#define sc second
#define mpr(a,b) make_pair(a,b)
#define pir pair<int,int>
#define vi vector<int>
#define vc vector<char>
#define vs vector<string>
#define vll vector<long long>
#define vull vector<unsigned long long>
#define fastio ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0);

// ----------------------FUNCTIONS-------------------------- //

template <typename T>
istream& operator >>(istream& input, vector <T>& s) {
	for (T& a : s) {
		input >> a;
	}
	return input;
}

template <typename T>
ostream& operator <<(ostream& output, vector <T>& s) {
	for (T& a : s) {
		output << a << ' ';
	}
	output << endl;
	return output;
}

template <typename T>
T gcd(T a, T b) {
	return !b ? a : gcd(b, a % b);
}

template <typename T>
T lcm(T a, T b) {
	return a / gcd(a, b) * b;
}

template <typename T>
int isPrime(T a) {
	if (a == 1) return 1;
	else if (a == 2) return 0;
	else if (!(a % 2)) return 2;
	else {
		for (ull i = 3; i * i <= a; i += 2) {
			if (!(a % i)) return i;
		}
	}
	return 0;
}

int vsum(vector <int> vec) {
	int sum = 0;
	trav(t, vec)
		sum += t;
	return sum;
}

int sumyd(ll n) {
	int sum = 0;
	while (n != 0) {
		sum += n % 10;
		n /= 10;
	}
	return sum;
}

ull fact(ull n) {
	if (n == 1) {
		return 1;
	}
	else {
		return n * fact(n - 1);
	}
}

// -----------------------SOLUTION----------------------------- //

void solve() {
	int n;
	cin >> n;
	int k = n * 4;
	FOR(i, n) {
		cout << k << ' ';
		k -= 4;
	}
	cout << endl;
}

int main() {
	int t;
	cin >> t;
	while (t--) {
		solve();
	}
	return 0;
}


// ------------------------INCLUDES--------------------------- //

#include <iostream>
#include <fstream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <algorithm>
#include <map>
#include <set>
#include <vector>
#include <array>
#include <string>
#include <climits>
#include <ctime>
#include <cstdlib>
#include <queue>
#include <stack>

using namespace std;

// ----------------- Define-s and Typedef-s ------------------ //

typedef long long ll;
typedef long double ld;
typedef unsigned long long ull;

#define sz(x) (int)(x).size()
#define mn(a, n) *min_element(a, a + n)
#define mx(a, n) *max_element(a, a + n)
#define mnv(a) *min_element(all(a))
#define mxv(a) *max_element(all(a))
#define FOR(i, a) for (ull i=0;i<(a);++i)
#define FORD(i, a) for (ull i=(a)-1;i>=0;i--)
#define FORT(i,a,b) for (ull i=(a);i<=(b);++i)
#define FORTD(i,b,a) for (ull i=(b);i>=(a);--i)
#define trav(i,v) for (auto i : v)
#define all(v) v.begin(),v.end()
#define rall(v) v.rbegin(),v.rend()
#define ad push_back
#define fr first
#define sc second
#define mpr(a,b) make_pair(a,b)
#define pir pair<int,int>
#define vi vector<int>
#define vc vector<char>
#define vs vector<string>
#define vll vector<long long>
#define vull vector<unsigned long long>
#define fastio ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0);

// ----------------------FUNCTIONS-------------------------- //

template <typename T>
istream& operator >>(istream& input, vector <T>& s) {
	for (T& a : s) {
		input >> a;
	}
	return input;
}

template <typename T>
ostream& operator <<(ostream& output, vector <T>& s) {
	for (T& a : s) {
		output << a << ' ';
	}
	output << endl;
	return output;
}

template <typename T>
T gcd(T a, T b) {
	return !b ? a : gcd(b, a % b);
}

template <typename T>
T lcm(T a, T b) {
	return a / gcd(a, b) * b;
}

template <typename T>
int isPrime(T a) {
	if (a == 1) return 1;
	else if (a == 2) return 0;
	else if (!(a % 2)) return 2;
	else {
		for (ull i = 3; i * i <= a; i += 2) {
			if (!(a % i)) return i;
		}
	}
	return 0;
}

int vsum(vector <int> vec) {
	int sum = 0;
	trav(t, vec)
		sum += t;
	return sum;
}

int sumyd(ll n) {
	int sum = 0;
	while (n != 0) {
		sum += n % 10;
		n /= 10;
	}
	return sum;
}

ull fact(ull n) {
	if (n == 1) {
		return 1;
	}
	else {
		return n * fact(n - 1);
	}
}

// -----------------------SOLUTION----------------------------- //

void solve() {
	ull n, a = 2;
	int k = 0;
	cin >> n;
	FOR(i, n) {
		if (!isPrime(a)) {
			cout << a * 2 << ' ';
		}
		else {
			i--;
		}
		if (a == 1)
			a++;
		else
			a += 2;
	}
	cout << endl;
}

int main() {
	int t;
	cin >> t;
	while (t--) {
		solve();
	}
	return 0;
}


// ------------------------INCLUDES--------------------------- //

#include <iostream>
#include <fstream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <algorithm>
#include <map>
#include <set>
#include <vector>
#include <array>
#include <string>
#include <climits>
#include <ctime>
#include <cstdlib>
#include <queue>
#include <stack>

using namespace std;

// ----------------- Define-s and Typedef-s ------------------ //

typedef long long ll;
typedef long double ld;
typedef unsigned long long ull;

#define sz(x) (int)(x).size()
#define mn(a, n) *min_element(a, a + n)
#define mx(a, n) *max_element(a, a + n)
#define mnv(a) *min_element(all(a))
#define mxv(a) *max_element(all(a))
#define FOR(i, a) for (ull i=0;i<(a);++i)
#define FORD(i, a) for (ull i=(a)-1;i>=0;i--)
#define FORT(i,a,b) for (ull i=(a);i<=(b);++i)
#define FORTD(i,b,a) for (ull i=(b);i>=(a);--i)
#define trav(i,v) for (auto i : v)
#define all(v) v.begin(),v.end()
#define rall(v) v.rbegin(),v.rend()
#define ad push_back
#define fr first
#define sc second
#define mpr(a,b) make_pair(a,b)
#define pir pair<int,int>
#define vi vector<int>
#define vc vector<char>
#define vs vector<string>
#define vll vector<long long>
#define vull vector<unsigned long long>
#define fastio ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0);

// ----------------------FUNCTIONS-------------------------- //

template <typename T>
istream& operator >>(istream& input, vector <T>& s) {
	for (T& a : s) {
		input >> a;
	}
	return input;
}

template <typename T>
ostream& operator <<(ostream& output, vector <T>& s) {
	for (T& a : s) {
		output << a << ' ';
	}
	output << endl;
	return output;
}

template <typename T>
T gcd(T a, T b) {
	return !b ? a : gcd(b, a % b);
}

template <typename T>
T lcm(T a, T b) {
	return a / gcd(a, b) * b;
}

template <typename T>
int isPrime(T a) {
	if (a == 1) return 1;
	else if (a == 2) return 0;
	else if (!(a % 2)) return 2;
	else {
		for (ull i = 3; i * i <= a; i += 2) {
			if (!(a % i)) return i;
		}
	}
	return 0;
}

int vsum(vector <int> vec) {
	int sum = 0;
	trav(t, vec)
		sum += t;
	return sum;
}

int sumyd(ll n) {
	int sum = 0;
	while (n != 0) {
		sum += n % 10;
		n /= 10;
	}
	return sum;
}

ull fact(ull n) {
	if (n == 1) {
		return 1;
	}
	else {
		return n * fact(n - 1);
	}
}

// -----------------------SOLUTION----------------------------- //

void solve() {
	int n;
	cin >> n;
	int k = 0;
	FORT(i, 1, 1000) {
		if (!isPrime(i)) {
			cout << i * 2 << ' ';
			k++;
		}
		if (k == n) {
			break;
		}
	}
	cout << endl;
}

int main() {
	int t;
	cin >> t;
	while (t--) {
		solve();
	}
	return 0;
}


// ------------------------INCLUDES--------------------------- //

#include <iostream>
#include <fstream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <algorithm>
#include <map>
#include <set>
#include <vector>
#include <array>
#include <string>
#include <climits>
#include <ctime>
#include <cstdlib>
#include <queue>
#include <stack>

using namespace std;

// ----------------- Define-s and Typedef-s ------------------ //

typedef long long ll;
typedef long double ld;
typedef unsigned long long ull;

#define sz(x) (int)(x).size()
#define mn(a, n) *min_element(a, a + n)
#define mx(a, n) *max_element(a, a + n)
#define mnv(a) *min_element(all(a))
#define mxv(a) *max_element(all(a))
#define FOR(i, a) for (ull i=0;i<(a);++i)
#define FORD(i, a) for (ull i=(a)-1;i>=0;i--)
#define FORT(i,a,b) for (ull i=(a);i<=(b);++i)
#define FORTD(i,b,a) for (ull i=(b);i>=(a);--i)
#define trav(i,v) for (auto i : v)
#define all(v) v.begin(),v.end()
#define rall(v) v.rbegin(),v.rend()
#define ad push_back
#define fr first
#define sc second
#define mpr(a,b) make_pair(a,b)
#define pir pair<int,int>
#define vi vector<int>
#define vc vector<char>
#define vs vector<string>
#define vll vector<long long>
#define vull vector<unsigned long long>
#define fastio ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0);

// ----------------------FUNCTIONS-------------------------- //

template <typename T>
istream& operator >>(istream& input, vector <T>& s) {
	for (T& a : s) {
		input >> a;
	}
	return input;
}

template <typename T>
ostream& operator <<(ostream& output, vector <T>& s) {
	for (T& a : s) {
		output << a << ' ';
	}
	output << endl;
	return output;
}

template <typename T>
T gcd(T a, T b) {
	return !b ? a : gcd(b, a % b);
}

template <typename T>
T lcm(T a, T b) {
	return a / gcd(a, b) * b;
}

template <typename T>
int isPrime(T a) {
	if (a == 1) return 1;
	else if (a == 2) return 0;
	else if (!(a % 2)) return 2;
	else {
		for (ull i = 3; i * i <= a; i += 2) {
			if (!(a % i)) return i;
		}
	}
	return 0;
}

int vsum(vector <int> vec) {
	int sum = 0;
	trav(t, vec)
		sum += t;
	return sum;
}

int sumyd(ll n) {
	int sum = 0;
	while (n != 0) {
		sum += n % 10;
		n /= 10;
	}
	return sum;
}

ull fact(ull n) {
	if (n == 1) {
		return 1;
	}
	else {
		return n * fact(n - 1);
	}
}

// -----------------------SOLUTION----------------------------- //

void solve() {
	int n, k = 10, p = 0;
	cin >> n;
	if (n == 1) {
		cout << 4 << endl;
	}
	else if (n == 2) {
		cout << 4 << ' ' << 6 << endl;
	}
	else if (n == 3) {
		cout << 4 << ' ' << 6 << ' ' << 10 << endl;
	}
	else {
		FOR(i, n - 3) {
			if (p == 0) {
				k += 4;
				cout << k << ' ';
				p = 1;
			}
			else {
				k += 8;
				cout << k << ' ';
				p = 0;
			}
		}
	}
	cout << endl;
}

int main() {
	int t;
	cin >> t;
	while (t--) {
		solve();
	}
	return 0;
}


// ------------------------INCLUDES--------------------------- //

#include <iostream>
#include <fstream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <algorithm>
#include <map>
#include <set>
#include <vector>
#include <array>
#include <string>
#include <climits>
#include <ctime>
#include <cstdlib>
#include <queue>
#include <stack>

using namespace std;

// ----------------- Define-s and Typedef-s ------------------ //

typedef long long ll;
typedef long double ld;
typedef unsigned long long ull;

#define sz(x) (int)(x).size()
#define mn(a, n) *min_element(a, a + n)
#define mx(a, n) *max_element(a, a + n)
#define mnv(a) *min_element(all(a))
#define mxv(a) *max_element(all(a))
#define FOR(i, a) for (ull i=0;i<(a);++i)
#define FORD(i, a) for (ull i=(a)-1;i>=0;i--)
#define FORT(i,a,b) for (ull i=(a);i<=(b);++i)
#define FORTD(i,b,a) for (ull i=(b);i>=(a);--i)
#define trav(i,v) for (auto i : v)
#define all(v) v.begin(),v.end()
#define rall(v) v.rbegin(),v.rend()
#define ad push_back
#define fr first
#define sc second
#define mpr(a,b) make_pair(a,b)
#define pir pair<int,int>
#define vi vector<int>
#define vc vector<char>
#define vs vector<string>
#define vll vector<long long>
#define vull vector<unsigned long long>
#define fastio ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0);

// ----------------------FUNCTIONS-------------------------- //

template <typename T>
istream& operator >>(istream& input, vector <T>& s) {
	for (T& a : s) {
		input >> a;
	}
	return input;
}

template <typename T>
ostream& operator <<(ostream& output, vector <T>& s) {
	for (T& a : s) {
		output << a << ' ';
	}
	output << endl;
	return output;
}

template <typename T>
T gcd(T a, T b) {
	return !b ? a : gcd(b, a % b);
}

template <typename T>
T lcm(T a, T b) {
	return a / gcd(a, b) * b;
}

template <typename T>
int isPrime(T a) {
	if (a == 1) return 1;
	else if (a == 2) return 0;
	else if (!(a % 2)) return 2;
	else {
		for (ull i = 3; i * i <= a; i += 2) {
			if (!(a % i)) return i;
		}
	}
	return 0;
}

int vsum(vector <int> vec) {
	int sum = 0;
	trav(t, vec)
		sum += t;
	return sum;
}

int sumyd(ll n) {
	int sum = 0;
	while (n != 0) {
		sum += n % 10;
		n /= 10;
	}
	return sum;
}

ull fact(ull n) {
	if (n == 1) {
		return 1;
	}
	else {
		return n * fact(n - 1);
	}
}

// -----------------------SOLUTION----------------------------- //

void solve() {
	int n;
	cin >> n;
	int k = n * 4;
	FOR(i, n) {
		cout << k << ' ';
		k -= 2;
	}
	cout << endl;
}

int main() {
	int t;
	cin >> t;
	while (t--) {
		solve();
	}
	return 0;
}


// ------------------------INCLUDES--------------------------- //

#include <iostream>
#include <fstream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <algorithm>
#include <map>
#include <set>
#include <vector>
#include <array>
#include <string>
#include <climits>
#include <ctime>
#include <cstdlib>
#include <queue>
#include <stack>

using namespace std;

// ----------------- Define-s and Typedef-s ------------------ //

typedef long long ll;
typedef long double ld;
typedef unsigned long long ull;

#define sz(x) (int)(x).size()
#define mn(a, n) *min_element(a, a + n)
#define mx(a, n) *max_element(a, a + n)
#define mnv(a) *min_element(all(a))
#define mxv(a) *max_element(all(a))
#define FOR(i, a) for (ull i=0;i<(a);++i)
#define FORD(i, a) for (ull i=(a)-1;i>=0;i--)
#define FORT(i,a,b) for (ull i=(a);i<=(b);++i)
#define FORTD(i,b,a) for (ull i=(b);i>=(a);--i)
#define trav(i,v) for (auto i : v)
#define all(v) v.begin(),v.end()
#define rall(v) v.rbegin(),v.rend()
#define ad push_back
#define fr first
#define sc second
#define mpr(a,b) make_pair(a,b)
#define pir pair<int,int>
#define vi vector<int>
#define vc vector<char>
#define vs vector<string>
#define vll vector<long long>
#define vull vector<unsigned long long>
#define fastio ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0);

// ----------------------FUNCTIONS-------------------------- //

template <typename T>
istream& operator >>(istream& input, vector <T>& s) {
	for (T& a : s) {
		input >> a;
	}
	return input;
}

template <typename T>
ostream& operator <<(ostream& output, vector <T>& s) {
	for (T& a : s) {
		output << a << ' ';
	}
	output << endl;
	return output;
}

template <typename T>
T gcd(T a, T b) {
	return !b ? a : gcd(b, a % b);
}

template <typename T>
T lcm(T a, T b) {
	return a / gcd(a, b) * b;
}

template <typename T>
int isPrime(T a) {
	if (a == 1) return 1;
	else if (a == 2) return 0;
	else if (!(a % 2)) return 2;
	else {
		for (ull i = 3; i * i <= a; i += 2) {
			if (!(a % i)) return i;
		}
	}
	return 0;
}

int vsum(vector <int> vec) {
	int sum = 0;
	trav(t, vec)
		sum += t;
	return sum;
}

int sumyd(ll n) {
	int sum = 0;
	while (n != 0) {
		sum += n % 10;
		n /= 10;
	}
	return sum;
}

ull fact(ull n) {
	if (n == 1) {
		return 1;
	}
	else {
		return n * fact(n - 1);
	}
}

// -----------------------SOLUTION----------------------------- //

void solve() {
	int n, a = 4, b = 3;
	cin >> n;
	cout << a << ' ';
	FOR(i, n) {
		if (!isPrime(b)) {
			cout << b * 2 << ' ';
		}
		else {
			i--;
		}
		b += 2;
	}
	cout << endl;
}

int main() {
	int t;
	cin >> t;
	while (t--) {
		solve();
	}
	return 0;
}


// ------------------------INCLUDES--------------------------- //

#include <iostream>
#include <fstream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <algorithm>
#include <map>
#include <set>
#include <vector>
#include <array>
#include <string>
#include <climits>
#include <ctime>
#include <cstdlib>
#include <queue>
#include <stack>

using namespace std;

// ----------------- Define-s and Typedef-s ------------------ //

typedef long long ll;
typedef long double ld;
typedef unsigned long long ull;

#define sz(x) (int)(x).size()
#define mn(a, n) *min_element(a, a + n)
#define mx(a, n) *max_element(a, a + n)
#define mnv(a) *min_element(all(a))
#define mxv(a) *max_element(all(a))
#define FOR(i, a) for (ull i=0;i<(a);++i)
#define FORD(i, a) for (ull i=(a)-1;i>=0;i--)
#define FORT(i,a,b) for (ull i=(a);i<=(b);++i)
#define FORTD(i,b,a) for (ull i=(b);i>=(a);--i)
#define trav(i,v) for (auto i : v)
#define all(v) v.begin(),v.end()
#define rall(v) v.rbegin(),v.rend()
#define ad push_back
#define fr first
#define sc second
#define mpr(a,b) make_pair(a,b)
#define pir pair<int,int>
#define vi vector<int>
#define vc vector<char>
#define vs vector<string>
#define vll vector<long long>
#define vull vector<unsigned long long>
#define fastio ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0);

// ----------------------FUNCTIONS-------------------------- //

template <typename T>
istream& operator >>(istream& input, vector <T>& s) {
	for (T& a : s) {
		input >> a;
	}
	return input;
}

template <typename T>
ostream& operator <<(ostream& output, vector <T>& s) {
	for (T& a : s) {
		output << a << ' ';
	}
	output << endl;
	return output;
}

template <typename T>
T gcd(T a, T b) {
	return !b ? a : gcd(b, a % b);
}

template <typename T>
T lcm(T a, T b) {
	return a / gcd(a, b) * b;
}

template <typename T>
int isPrime(T a) {
	if (a == 1) return 1;
	else if (a == 2) return 0;
	else if (!(a % 2)) return 2;
	else {
		for (ull i = 3; i * i <= a; i += 2) {
			if (!(a % i)) return i;
		}
	}
	return 0;
}

int vsum(vector <int> vec) {
	int sum = 0;
	trav(t, vec)
		sum += t;
	return sum;
}

int sumyd(ll n) {
	int sum = 0;
	while (n != 0) {
		sum += n % 10;
		n /= 10;
	}
	return sum;
}

ull fact(ull n) {
	if (n == 1) {
		return 1;
	}
	else {
		return n * fact(n - 1);
	}
}

// -----------------------SOLUTION----------------------------- //

void solve() {
	int n, a = 4, b = 1;
	cin >> n;
	cout << a << ' ';
	FOR(i, n - 1) {
		if (b % 4 != 0)
			cout << a * b + 2 << ' ';
		else {
			i--;
		}
		b++;
	}
	cout << endl;
}

int main() {
	int t;
	cin >> t;
	while (t--) {
		solve();
	}
	return 0;
}


// ------------------------INCLUDES--------------------------- //

#include <iostream>
#include <fstream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <algorithm>
#include <map>
#include <set>
#include <vector>
#include <array>
#include <string>
#include <climits>
#include <ctime>
#include <cstdlib>
#include <queue>
#include <stack>

using namespace std;

// ----------------- Define-s and Typedef-s ------------------ //

typedef long long ll;
typedef long double ld;
typedef unsigned long long ull;

#define sz(x) (int)(x).size()
#define mn(a, n) *min_element(a, a + n)
#define mx(a, n) *max_element(a, a + n)
#define mnv(a) *min_element(all(a))
#define mxv(a) *max_element(all(a))
#define FOR(i, a) for (ull i=0;i<(a);++i)
#define FORD(i, a) for (ull i=(a)-1;i>=0;i--)
#define FORT(i,a,b) for (ull i=(a);i<=(b);++i)
#define FORTD(i,b,a) for (ull i=(b);i>=(a);--i)
#define trav(i,v) for (auto i : v)
#define all(v) v.begin(),v.end()
#define rall(v) v.rbegin(),v.rend()
#define ad push_back
#define fr first
#define sc second
#define mpr(a,b) make_pair(a,b)
#define pir pair<int,int>
#define vi vector<int>
#define vc vector<char>
#define vs vector<string>
#define vll vector<long long>
#define vull vector<unsigned long long>
#define fastio ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0);

// ----------------------FUNCTIONS-------------------------- //

template <typename T>
istream& operator >>(istream& input, vector <T>& s) {
	for (T& a : s) {
		input >> a;
	}
	return input;
}

template <typename T>
ostream& operator <<(ostream& output, vector <T>& s) {
	for (T& a : s) {
		output << a << ' ';
	}
	output << endl;
	return output;
}

template <typename T>
T gcd(T a, T b) {
	return !b ? a : gcd(b, a % b);
}

template <typename T>
T lcm(T a, T b) {
	return a / gcd(a, b) * b;
}

template <typename T>
int isPrime(T a) {
	if (a == 1) return 1;
	else if (a == 2) return 0;
	else if (!(a % 2)) return 2;
	else {
		for (ull i = 3; i * i <= a; i += 2) {
			if (!(a % i)) return i;
		}
	}
	return 0;
}

int vsum(vector <int> vec) {
	int sum = 0;
	trav(t, vec)
		sum += t;
	return sum;
}

int sumyd(ll n) {
	int sum = 0;
	while (n != 0) {
		sum += n % 10;
		n /= 10;
	}
	return sum;
}

ull fact(ull n) {
	if (n == 1) {
		return 1;
	}
	else {
		return n * fact(n - 1);
	}
}

// -----------------------SOLUTION----------------------------- //

void solve() {
	int n, k = 10, p = 0;
	cin >> n;
	if (n == 1) {
		cout << 4 << endl;
	}
	else if (n == 2) {
		cout << 4 << ' ' << 6 << endl;
	}
	else if (n == 3) {
		cout << 4 << ' ' << 6 << ' ' << 10 << endl;
	}
	else {
		cout << "4 6 10";
		FOR(i, n - 3) {
			if (p == 0) {
				k += 4;
				cout << k << ' ';
				p = 1;
			}
			else {
				k += 8;
				cout << k << ' ';
				p = 0;
			}
		}
	}
	cout << endl;
}

int main() {
	int t;
	cin >> t;
	while (t--) {
		solve();
	}
	return 0;
}