#!ruby -n j=chomp.size puts$l=$l?($_*9).chars.zip($l.chars*9).join[0,j>8?j*2-1:$l.size*2]:$_