#!/usr/bin/env python3 from typing import * def solve(n: int) -> List[int]: al = [] ar = [] bl = [] br = [n - 1] cl = [] cr = [n - 1, n - 1] remaining = n - 1 remaining -= (n - 1) // 3 * 2 remaining -= max(0, (n - 1) % 3 - 1) for i in range(n - 1): if i % 3 == 0: al += [i] ar += [i, i] elif i % 3 == 1: if remaining >= 1: bl += [i] br += [i, i] remaining -= 1 else: bl += [i, i] br += [i] else: if remaining >= 1: cl += [i, i] cr += [i] remaining -= 1 else: cl += [i] cr += [i, i] if remaining != 0: return [-1] ans = [] ans.extend(reversed(al)) ans.extend(ar) ans.extend(reversed(bl)) ans.extend(br) ans.extend(reversed(cl)) ans.extend(cr) return ans # generated by online-judge-template-generator v4.1.0 (https://github.com/kmyk/online-judge-template-generator) def main(): N = int(input()) ans = solve(N) print(*ans) if __name__ == '__main__': main()