gets'' B=*$< puts$_.map{|$_|B.map{|b|split.map{|n|b.split.map{|m|'%5d'.%n.to_i*m.to_i}}*''}}