#include <bits/stdc++.h>
using namespace std;
#define int long long
const int N = 1e5 + 10;
signed main()
{
int n;cin >> n;
//当n小于等于2时,无法构造
if(n <= 2)
{
cout << -1 << endl;
return 0;
}
//通过判断可以发现当n为偶数时,[n-1,1]是可以互补为非质数的,最后补上个n就行
// 1 2 3 4 5 6 7 8 9 10
// 9 8 7 6 5 4 3 2 1 10
//当n为奇数时,[n,1]互补为非质数
//1 2 3 4 5 6 7
//7 6 5 4 3 2 1
if(n%2 == 0)
{
for(int i=n-1;i>=1;i--)
{
cout << i << ' ';
}cout << n << endl;
}else
{
for(int i=n;i>=1;i--)
{
cout << i << ' ';
}
}
return 0;
}

京公网安备 11010502036488号