gets.tr!('0-9',' 1adgjmptw').split(/1/).each{|x|putc(x[0]-1+x.size)}