s=gets.chomp cnt=Array.new(26,0) for i in 0...s.length do cnt[s[i].ord-'a'.ord]+=1 end if cnt.select{|i|i==2}.length==6 then puts (cnt.index(1)+'a'.ord).chr else puts "Impossible" end