module Main; // import BinaryHeap; // import BoolArray; // import CPLib.Arithmetic; // import CPLib.Bipartite; // import CPLib.Bits; // import CPLib.Convolution; // import CPLib.DSegtree; // import CPLib.Graph; import CPLib.IO; // import CPLib.LDSegtree; // import CPLib.LSegtree; // import CPLib.MaxFlow; // import CPLib.Memoize; // import CPLib.MinCostFlow; // import CPLib.Misc; // import CPLib.Monoid; // import CPLib.Segtree; // import CPLib.String; // import CPLib.Trait; // import CPLib.TwoSat; // import CPLib.UnionFind; // import CPLib.ZP; // import HashMap; // import HashSet; // import Math; main : IO () = ( let n = *read_i; let ans = fill(n, fill(n, 0)); let ans = range(0, n).fold(ans, |i, ans| range(0, n).fold(ans, |j, ans| let v = if i + j == n - 1 { if i % 2 == 0 { 1 } else { 2 } } else if i + j < n - 1 { 0 } else { 2 }; let ans = ans[i][j].iset(v); ans ) ); range(0, n).fold_m((), |j, _| let ans = ans.@(j); let ans = ans.to_iter.joined_with(""); "{}".printfln((ans,)) );; pure() );