def generate_doubled_sequence(N):
if N % 2 != 0:
return "-1"
sequence = [0] * (2 * N) # Create an array of size 2N
# Place numbers from N down to 1
for i in range(N, 0, -1):
first_position = i - 1 # 0-indexed position for the first occurrence
second_position = first_position + i # 0-indexed position for the second occurrence
sequence[first_position] = i
sequence[second_position] = i
return ' '.join(map(str, sequence))
def main():
import sys
input = sys.stdin.read
data = input().strip().split()
T = int(data[0]) # Number of test cases
results = []
for i in range(1, T + 1):
N = int(data[i])
results.append(generate_doubled_sequence(N))
print("\n".join(results))
if __name__ == "__main__":
main()
ZGVmIGdlbmVyYXRlX2RvdWJsZWRfc2VxdWVuY2UoTik6CiAgICBpZiBOICUgMiAhPSAwOgogICAgICAgIHJldHVybiAiLTEiCgogICAgc2VxdWVuY2UgPSBbMF0gKiAoMiAqIE4pICAjIENyZWF0ZSBhbiBhcnJheSBvZiBzaXplIDJOCiAgICAKICAgICMgUGxhY2UgbnVtYmVycyBmcm9tIE4gZG93biB0byAxCiAgICBmb3IgaSBpbiByYW5nZShOLCAwLCAtMSk6CiAgICAgICAgZmlyc3RfcG9zaXRpb24gPSBpIC0gMSAgIyAwLWluZGV4ZWQgcG9zaXRpb24gZm9yIHRoZSBmaXJzdCBvY2N1cnJlbmNlCiAgICAgICAgc2Vjb25kX3Bvc2l0aW9uID0gZmlyc3RfcG9zaXRpb24gKyBpICAjIDAtaW5kZXhlZCBwb3NpdGlvbiBmb3IgdGhlIHNlY29uZCBvY2N1cnJlbmNlCgogICAgICAgIHNlcXVlbmNlW2ZpcnN0X3Bvc2l0aW9uXSA9IGkKICAgICAgICBzZXF1ZW5jZVtzZWNvbmRfcG9zaXRpb25dID0gaQoKICAgIHJldHVybiAnICcuam9pbihtYXAoc3RyLCBzZXF1ZW5jZSkpCgpkZWYgbWFpbigpOgogICAgaW1wb3J0IHN5cwogICAgaW5wdXQgPSBzeXMuc3RkaW4ucmVhZAogICAgZGF0YSA9IGlucHV0KCkuc3RyaXAoKS5zcGxpdCgpCiAgICAKICAg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