Codeforces Round 250 (Div. 2)
A
The Child and Homework
Codeforces
1300
原题
←B →
翻译中…

Once upon a time a child got a test consisting of multiple-choice questions as homework. A multiple-choice question consists of four choices: A, B, C and D. Each choice has a description, and the child should find out the only one that is correct.

翻译中…

Fortunately the child knows how to solve such complicated test. The child will follow the algorithm:

翻译中…
  • If there is some choice whose description at least twice shorter than all other descriptions, or at least twice longer than all other descriptions, then the child thinks the choice is great.
  • If there is exactly one great choice then the child chooses it. Otherwise the child chooses C (the child think it is the luckiest choice).
翻译中…

You are given a multiple-choice questions, can you predict child's choose?

翻译中…

Input

翻译中…

The first line starts with "A." (without quotes), then followed the description of choice A. The next three lines contains the descriptions of the other choices in the same format. They are given in order: B, C, D. Please note, that the description goes after prefix "X.", so the prefix mustn't be counted in description's length.

翻译中…

Each description is non-empty and consists of at most $100$ characters. Each character can be either uppercase English letter or lowercase English letter, or "_".

翻译中…

Output

翻译中…

Print a single line with the child's choice: "A", "B", "C" or "D" (without quotes).

翻译中…

Note

翻译中…

In the first sample, the first choice has length 39, the second one has length 35, the third one has length 37, and the last one has length 15. The choice D (length 15) is twice shorter than all other choices', so it is great choice. There is no other great choices so the child will choose D.

翻译中…

In the second sample, no choice is great, so the child will choose the luckiest choice C.

翻译中…

In the third sample, the choice B (length 2) is twice longer than all other choices', so it is great choice. There is no other great choices so the child will choose B.

翻译中…

样例

Input #1
A.VFleaKing_is_the_author_of_this_problem
B.Picks_is_the_author_of_this_problem
C.Picking_is_the_author_of_this_problem
D.Ftiasch_is_cute
Output #1
D
InputCopy OutputCopy
Input #2
A.ab
B.abcde
C.ab
D.abc
Output #2
C
InputCopy OutputCopy
Input #3
A.c
B.cc
C.c
D.c
Output #3
B
InputCopy OutputCopy
题目信息
题号
437A
时间限制
1 s
内存限制
256 MB
标签
模拟

题面与样例版权归 Codeforces 及出题人所有;中文翻译由 AI 生成(CI 管线),如有出入请以原文为准。