def construct_doubled_sequence(N):
sequence = [-1] * (2 * N)
for i in range(1, N + 1):
if sequence[i - 1] == -1 and i + i - 1 < 2 * N:
sequence[i - 1] = i
sequence[i + i - 1] = i
else:
return -1
return sequence
def solve_test_cases(T, test_cases):
results = []
for N in test_cases:
sequence = construct_doubled_sequence(N)
if sequence == -1:
results.append("-1")
else:
results.append(" ".join(map(str, sequence)))
return results
# Read input
import sys
input = sys.stdin.read
data = input().split()
T = int(data[0])
test_cases = [int(data[i]) for i in range(1, T + 1)]
# Solve test cases
results = solve_test_cases(T, test_cases)
# Print results
print("\n".join(results))
ZGVmIGNvbnN0cnVjdF9kb3VibGVkX3NlcXVlbmNlKE4pOgogICAgc2VxdWVuY2UgPSBbLTFdICogKDIgKiBOKQogICAgZm9yIGkgaW4gcmFuZ2UoMSwgTiArIDEpOgogICAgICAgIGlmIHNlcXVlbmNlW2kgLSAxXSA9PSAtMSBhbmQgaSArIGkgLSAxIDwgMiAqIE46CiAgICAgICAgICAgIHNlcXVlbmNlW2kgLSAxXSA9IGkKICAgICAgICAgICAgc2VxdWVuY2VbaSArIGkgLSAxXSA9IGkKICAgICAgICBlbHNlOgogICAgICAgICAgICByZXR1cm4gLTEKICAgIHJldHVybiBzZXF1ZW5jZQoKZGVmIHNvbHZlX3Rlc3RfY2FzZXMoVCwgdGVzdF9jYXNlcyk6CiAgICByZXN1bHRzID0gW10KICAgIGZvciBOIGluIHRlc3RfY2FzZXM6CiAgICAgICAgc2VxdWVuY2UgPSBjb25zdHJ1Y3RfZG91YmxlZF9zZXF1ZW5jZShOKQogICAgICAgIGlmIHNlcXVlbmNlID09IC0xOgogICAgICAgICAgICByZXN1bHRzLmFwcGVuZCgiLTEiKQogICAgICAgIGVsc2U6CiAgICAgICAgICAgIHJlc3VsdHMuYXBwZW5kKCIgIi5qb2luKG1hcChzdHIsIHNlcXVlbmNlKSkpCiAgICByZXR1cm4gcmVzdWx0cwoKIyBSZWFkIGlucHV0CmltcG9ydCBzeXMKaW5wdXQgPSBzeXMuc3RkaW4ucmVhZApkYXRhID0gaW5wdXQoKS5zcGxpdCgpCgpUID0gaW50KGRhdGFbMF0pCnRlc3RfY2FzZXMgPSBbaW50KGRhdGFbaV0pIGZvciBpIGluIHJhbmdlKDEsIFQgKyAxKV0KCiMgU29sdmUgdGVzdCBjYXNlcwpyZXN1bHRzID0gc29sdmVfdGVzdF9jYXNlcyhULCB0ZXN0X2Nhc2VzKQoKIyBQcmludCByZXN1bHRzCnByaW50KCJcbiIuam9pbihyZXN1bHRzKSkK