a=gets.to_i a.times{|i|s=" "*k=2*a-2 s[i]=s[-i]=$_[-1] puts (s*a)[0..i-k]}