#include <iostream>
#include<string>

using namespace std;
using ll = long long int;
int main(void){
    int n;
    cin >> n;
    cout << 3 << " ";
    for(int i = 1; i < n - 1; i ++){
        cout << 1 << " ";
    }
    if (n % 3 == 0){
        cout << 3 << endl;
    }
    else if (n % 3 == 1){
        cout << 2 << endl;
    }
    else{
        cout << 1 << endl;
    }
    
    return 0;
}