#include <bits/stdc++.h>   using namespace std;   int arr[1000000];   int main() {     int n;     while (scanf( %d , &n) != -1) {       if (n == 1) {         printf( 1 n );         continue;       }       if ((n & 1) && (n - 1) % 4) {         printf( -1 n );         continue;       }       if (!(n & 1) && n % 4) {         printf( -1 n );         continue;       }       for (int i = 1; i + i <= n; i += 2)         arr[i] = i + 1, arr[i + 1] = n - i + 1, arr[n - i + 1] = n - i,         arr[n - i] = i;       if (n % 2) arr[n / 2 + 1] = n / 2 + 1;       for (int i = 1; i <= n; ++i) printf(i > 1 ?   %d  :  %d , arr[i]);       printf(  n );     }     return 0;   }   