#include using namespace std; // #define LOCK_GETCHAR // #define USE_INT_128 // #undef DEBUG #ifdef DEBUG #include #else #define debug(...) (void(0)) #define Debug(...) (void(0)) #endif #define ENABLE_IF_INT , enable_if_t<_is_integer, int> = 0 template constexpr bool _is_integer = numeric_limits::is_integer; template <> constexpr bool _is_integer = false; template <> constexpr bool _is_integer = false; #ifdef USE_INT_128 template <> constexpr bool _is_integer<__int128> = true; template <> constexpr bool _is_integer<__uint128_t> = true; #endif #if !defined(_WIN32) && !defined(__CYGWIN__) && !defined(LOCK_GETCHAR) #define getchar getchar_unlocked #endif #define il inline #define mkp make_pair #define fi first #define se second #define ssz(x) (signed((x).size())) #define beg2ed(x) (x).begin(), (x).end() #define _loop_i_t(j, k) make_signed_t #define For(i, j, k) for (_loop_i_t(j, k) i = (j); i <= (k); ++i) #define ForDown(i, j, k) for (_loop_i_t(j, k) i = (j); i >= decltype(i)(k); --i) #define eb emplace_back #ifndef ONLINE_JUDGE #define FileIO(filename) \ freopen(filename ".in", "r", stdin); \ freopen(filename ".out", "w", stdout) #else #define FileIO(filename) void(0) #endif using ll = long long; using uint = unsigned int; using ull = unsigned long long; using db = double; using ldb = long double; using pii = pair; using pll = pair; #ifdef USE_INT_128 using lll = __int128_t; using ulll = __uint128_t; #endif // clang-format off constexpr il ll qpow(ll x, ull y, ll mod){ ll ans = 1; x %= mod; while (y) { if (y & 1) (ans *= x) %= mod; (x *= x) %= mod; y >>= 1; } return ans; } template constexpr il void cmin(T & x, const T &y){ x = min(x, y); } template constexpr il void cmax(T & x, const T &y){ x = max(x, y); } template il void read(T &x){ x = 0; int f = 1; int c = getchar(); while (!isdigit(c)) { if (c == '-') f = -1; c = getchar(); } while (isdigit(c)) { x = x * 10 + (c - '0'); c = getchar(); } x *= f; } template il void read(T &x, Args &... y){ read(x), read(y...); } // clang-format on // File head end namespace { // constexpr ll MAXN = ...; int n; void Main() { read(n); if (n == 1) { puts(R"*(1 2 2 2 1 1)*"); } else if (n == 2) { puts(R"*(10 20 21 21 10 10)*"); } else if (n == 3) { puts(R"*(012 345 345 225 141 300)*"); } else if (n == 4) { puts(R"*(4551 3662 6777 3005 3442 0112)*"); } else { cout << "512"; for (int i = 4; i + 3 <= n - 2; i += 4) cout << "3017"; if (n % 4 == 1) cout << "03\n"; else if (n % 4 == 2) cout << "336\n"; else if (n % 4 == 3) cout << "3021\n"; else cout << "66812\n"; cout << "075"; for (int i = 4; i + 3 <= n - 2; i += 4) cout << "4525"; if (n % 4 == 1) cout << "61\n"; else if (n % 4 == 2) cout << "669\n"; else if (n % 4 == 3) cout << "9564\n"; else cout << "00508\n"; cout << "071"; for (int i = 4; i + 3 <= n - 2; i += 4) cout << "4621"; if (n % 4 == 1) cout << "61\n"; else if (n % 4 == 2) cout << "881\n"; else if (n % 4 == 3) cout << "9264\n"; else cout << "33608\n"; cout << "22"; for (int i = 4; i + 3 <= n - 2; i += 4) cout << "6677"; if (n % 4 == 1) cout << "444\n"; else if (n % 4 == 2) cout << "4448\n"; else if (n % 4 == 3) cout << "44455\n"; else cout << "399155\n"; cout << "05"; for (int i = 4; i + 3 <= n - 2; i += 4) cout << "3435"; if (n % 4 == 1) cout << "331\n"; else if (n % 4 == 2) cout << "3001\n"; else if (n % 4 == 3) cout << "39362\n"; else cout << "444901\n"; cout << "17"; for (int i = 4; i + 3 <= n - 2; i += 4) cout << "0012"; if (n % 4 == 1) cout << "060\n"; else if (n % 4 == 2) cout << "0991\n"; else if (n % 4 == 3) cout << "00114\n"; else cout << "088228\n"; } } } // namespace signed main() { return Main(), 0; }