#include #include #include #include #include using namespace std; using i32 = int; using u32 = unsigned int; using i64 = long long; using u64 = unsigned long long; #define rep(i,n) for(int i=0; i<(int)(n); i++) const i64 INF = 1001001001001001001; using Modint = atcoder::static_modint<998244353>; vector ans3 = { "012", "345", "345", "225", "141", "300" }; vector ans1 = { "1", "1", "0", "0", "0", "1" }; vector ans4 = { "4551", "3662", "6777", "3005", "3442", "0112" }; vector start1 = { "0", "1", "2", "4", "4", "4" }; vector start3 = { "058", "137", "237", "444", "535", "887" }; vector start4 = { "0998", "1886", "2445", "8884", "9775", "7665" }; vector stop4 = { "7801", "6719", "6549", "4480", "8579", "6522" }; vector stop2 = { "12", "43", "43", "00", "41", "23" }; vector mid4 = { "0562", "1713", "2743", "4400", "5751", "6623" }; int main(){ int N; cin >> N; if(N == 1){ rep(t,6) cout << ans1[t] << '\n'; } else if(N == 2){ cout << "-1\n"; } else if(N == 3){ rep(t,6) cout << ans3[t] << '\n'; } else if(N == 4){ rep(t,6) cout << ans4[t] << '\n'; } else{ vector ans(6); auto addExp = [&](vector src){ rep(t,6){ ans[t] += src[t]; } }; addExp((N-5)&2 ? stop4 : stop2); for(int t=8; t