問題一覧 > 通常問題

No.587 Seven Pairs (Chiitoitsu)

レベル : / AI推定難易度 : 167 / 実行時間制限 : 1ケース 2.000秒 / メモリ制限 : 512 MB / 標準ジャッジ問題
タグ : (AC するまで非表示) / 解いたユーザー数 384
作問者 : butsurizuki / テスター : Nafmo2
お気に入りにしたユーザー ProblemId : 1641 / 自分の提出
問題文最終更新日: 2026-06-26 22:05:27
This statement was translated by AI (claude-opus-5-5, effort medium) and may contain errors or differ in nuance from the original. The original statement takes precedence. Back to the original
yukicoder contest 176 (順位表) の他の問題:

Problem Statement

You are given a string $S$ consisting of 13 lowercase English letters.
Determine whether, by adding one character to $S$, it is possible to form 7 pairs of distinct characters (a pair means that the character appears exactly twice in the string).

Input

$S$

A string $S$ consisting of 13 lowercase English letters is given on one line.

Output

If it is possible to form 7 pairs of distinct characters, output the character to add; otherwise, output Impossible, on one line.
Print a newline at the end.

Sample

Sample 1
Input
aabbccddeefgg
Output
f

Sample 2
Input
ffeeddcccbbaa
Output
Impossible

Sample 3
Input
hsgeeappashoo
Output
g

提出するには、Twitter 、GitHub、 Googleもしくは右上の雲マークをクリックしてアカウントを作成してください。