proc O {B n} {set h [expr {$n/$B}];set l [expr {$n%$B}];format %c%c [expr {$h+($h==0?32:$h<10?48:55)}] [expr {$l+($l<10?48:55)}]} set B [gets stdin] for {set r 1} {$r < $B} {incr r} {for {set c 1} {$c < $B} {incr c} {;set n [expr {$r*$c}];puts -nonewline [format {% 3s} [O $B $n]];};puts ""}