S = gets.chomp H = (?a .. ?z).group_by{|c| S.count(c) } puts H[1].size == 1 && H[2].size == 6 ? H[1] : :Impossible