#include<bits/stdc++.h>
using namespace std;
using ll=long long;
using ull=unsigned long long;
using i128=__int128_t;
using u128=__uint128_t;
using ld=long double;
void solve()
{//模拟一下 发现1和2绝对不行 从3开始 我们只需要让一个奇数位加上1到n中的一个奇数 偶数位加上一个偶数 易知除2外所有偶数都不是质数
//所以构造出的排列合法 但是为了避免2的出现 我们从大到小开始放数字
int n;
cin >> n;
if(n==1||n==2)
{
cout <<-1;
return;
}
else
{
int temp=n;
if(n%2==1)
{
for(int i=1;i<=n;i++)
{
cout << n-i+1 << " ";
}
}
else
{
for(int i=1;i<=n;i++)
{
if(i%2==1) cout << n-i << " ";
else cout << n-i+2 << " ";
}
}
}
}
int main()
{
ios::sync_with_stdio(false);
cin.tie(nullptr);
int t=1;
//cin >> t;
while(t--)
{
solve();
}
return 0;
}