#![allow(unused_imports)] use itertools::*; use proconio::{input, marker::*}; fn main() { input! { n: usize, } for i in 0..n { println!( "{}", (0..=i) .map(|j| if (i + j) % 3 == 0 { 2 } else { 1 }) .join(" ") ) } }