r=1...n=gets.to_i r.map{|i|puts r.map{|j|'%3s'%(i*j).to_s(n).upcase}*''}