a=gets.each_byte.sort puts$_ if $_.each_byte.sort==a while gets