#include <bits/stdc++.h>
using namespace std;
void main2() {
  long long int n, f = 0;
  cin >> n;
  vector<long long int> v(4 * n + 1, 0);
  for (long long int i = 2; i <= 4 * n; i += 2) v[i] = 1;
  for (long long int i = 2; i <= 2 * n; i++) {
    if (v[i] == 1) {
      f = 1;
      for (long long int j = 2 * i; j <= 4 * n; j++) {
        if (v[j] == 1) f = 0;
      }
      if (f == 0) v[i] = 0;
    }
  }
  for (long long int i = 2; i <= 4 * n; i++)
    if (v[i] == 1) cout << i << " ";
  cout << "\n";
  return;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long int t = 1;
  cin >> t;
  while (t--) {
    main2();
  }
  return 0;
}
