#include using namespace std; using ll = long long; using Graph = vector>; int main() { long long N; cin >> N; bool fire = false; if(N % 3 == 0) { for(int i = 312456; i >= 1; i--) { if(i % 3 == 1 && (i - 1) % N == 0 && N % 3 == 0) { long long x = i; for(int j = 0; j < N - 1; j++) { cout << (x - 1) / N << " "; } cout << (x - 1) / N + 1<< endl; fire = true; break; } if(fire) break; } }else { for(int i = 312456; i >= 1; i--) { if(i % 3 == 1 && (i) % N == 0) { long long x = i; for(int j = 0; j < N - 1; j++) { cout << (x - 1) / N << " "; } cout << (x - 1) / N<< endl; fire = true; break; } if(fire) break; } } }