#include using namespace std; int main() { int n,last; cin >> n; switch ((n - 1) % 3) { case 0: last = 2; break; case 1: last = 1; break; case 2: last = 3; break; } for(int i = 1;i <= n;i++){ if(i == 1)cout << 3 << " "; else if(i == n)cout << last << endl; else cout << 1 << " "; } }