#include <bits/stdc++.h>
using namespace std;
template <typename T>
T modpow(T base, T exp, T modulus) {
  base %= modulus;
  T result = 1;
  while (exp > 0) {
    if (exp & 1) result = (result * base) % modulus;
    base = (base * base) % modulus;
    exp >>= 1;
  }
  return result;
}
vector<bool> primes(401, 1);
void solve(int test_case) {
  int n;
  cin >> n;
  int nn = n;
  int upto = 4 * n;
  vector<int> ans;
  int st = 2;
  while ((int)ans.size() < nn) {
    ans = vector<int>();
    st += 2;
    n = nn;
    for (int i = st; i <= upto && n > 0; i += 2) {
      n--;
      bool req = 1;
      for (int j : ans)
        if (i % j == 0) {
          req = 0;
          break;
        }
      if (req) ans.push_back(i);
    }
  }
  for (int i : ans) cout << i << " ";
  cout << endl;
}
void prefill() {
  for (int i = 2; i <= 400; i++) {
    if (primes[i])
      for (int j = i + i; j <= 400; j += i) primes[j] = 0;
  }
  int cnt = 0;
  for (int i = 4; i <= 400; i++) {
    if (!primes[i]) {
      cnt++;
      for (int j = i + i; j <= 400; j += i) primes[j] = 1;
    }
  }
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  int t = 1;
  cin >> t;
  for (int i = 1; i <= t; i++) {
    solve(i);
  }
  return 0;
}
