問題一覧 > 通常問題

No.548 国士無双

レベル : / 実行時間制限 : 1ケース 2.000秒 / メモリ制限 : 512 MB / 標準ジャッジ問題
タグ : (AC するまで非表示) / 解いたユーザー数 378
作問者 : butsurizuki / テスター : ixmel
お気に入りにしたユーザー ProblemId : 1642 / 自分の提出
問題文最終更新日: 2019-04-10 02:21:41
Kokushi Musou
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. Show the original
yukicoder contest 170 (順位表) の他の問題:

Problem Statement

You are given a string $S$ of length 13 consisting of the 13 kinds of lowercase letters abcdefghijklm, each appearing 0 or more times.
Determine whether, by adding one character to $S$, it can be made to contain exactly two of one of the letters in abcdefghijklm and exactly one of each of the other letters.

Input

$S$

$S$ is given on one line.

Output

If the condition can be satisfied, output the character to add (there may be multiple possibilities. In that case, output them in lexicographical order, separated by newlines.); otherwise, output Impossible on one line.
Print a newline at the end.

Sample

Sample 1
Input
abcdfghijklmm
Output
e

Sample 2
Input
abcdefgmmmmmm
Output
Impossible

Sample 3
Input
cbmlieadfghjk
Output
a
b
c
d
e
f
g
h
i
j
k
l
m

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