a=gets.chop.chars.sort;0.step(13,2){|i|a[i]!=a[i+1]&&(p a[i];exit)};p"Impossible"