puts"#{b=chomp.gsub(/./,'\&\\\'\` ').sort b.index$_+$/} #{(b*'').scan /.$/}"while gets