gets 10.times{|n|puts$_=gsub(/\S+/){$&[n]?$&:' '*n}.rstrip}