#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int i, n, s, j;
  int t;
  cin >> t;
  while (t--) {
    cin >> n;
    vector<int> v;
    for (i = 2; i <= (4 * n); i += 2) {
      v.push_back(i);
      s = v.size();
      for (j = 0; j < (s - 1); j++) {
        if (v[j] == 0) continue;
        if (i % v[j] == 0) v[j] = 0;
      }
    }
    for (i = 0; i < v.size(); i++) {
      if (v[i] != 0) cout << v[i] << " ";
    }
    cout << endl;
  }
}
