题库练习 The Child and Homework
← 上一题 下一题 →

A9533 | The Child and Homework

时间限制1s
内存限制256MB
通过 / 提交0/0

题目描述

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?

输入格式

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 "\_".

输出格式

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

输入输出样例

输入 #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
输出 #1
D
输入 #2
A.ab
B.abcde
C.ab
D.abc
输出 #2
C
输入 #3
A.c
B.cc
C.c
D.c
输出 #3
B
C++ 编辑器
输入
输出