gets stdin n gets stdin s set i $n while \$i {puts [regsub -all . $s \\0[string repe [expr 1<$i&$i<$n?{ }:{\\0}] [expr $n-2]]\\0] incr i -1}