def doubled_sequence(n):
if n % 2 != 0:
return -1
else:
sequence = []
for i in range(1, n // 2 + 1):
sequence.append(i)
sequence.append(n - i + 1)
return ' '.join(map(str, sequence))
t = int(input())
for _ in range(t):
n = int(input())
print(doubled_sequence(n))
ZGVmIGRvdWJsZWRfc2VxdWVuY2Uobik6CiAgICBpZiBuICUgMiAhPSAwOgogICAgICAgIHJldHVybiAtMQogICAgZWxzZToKICAgICAgICBzZXF1ZW5jZSA9IFtdCiAgICAgICAgZm9yIGkgaW4gcmFuZ2UoMSwgbiAvLyAyICsgMSk6CiAgICAgICAgICAgIHNlcXVlbmNlLmFwcGVuZChpKQogICAgICAgICAgICBzZXF1ZW5jZS5hcHBlbmQobiAtIGkgKyAxKQogICAgICAgIHJldHVybiAnICcuam9pbihtYXAoc3RyLCBzZXF1ZW5jZSkpCgp0ID0gaW50KGlucHV0KCkpCgpmb3IgXyBpbiByYW5nZSh0KToKICAgIG4gPSBpbnQoaW5wdXQoKSkKICAgIHByaW50KGRvdWJsZWRfc2VxdWVuY2Uobikp