T^T学长考四级

TimeLimit:1000MS  MemoryLimit:256MB
64-bit integer IO format:%I64d
未提交 | 登录后收藏
Problem Description

大家都知道,咱们的T^T学长要毕业了,可是,他有一个很大的遗憾,一个是大学期间没泡到妹子(真是个悲伤的故事),另外一个呢,就是英语四级老是考不过。所以呢,我们的T^T学长就决定在毕业之前一定要把四级过了去。

可是,他很懒,信誓旦旦的说着要过四级,但是还是裸考了。。。(肯定又过不了)

我们都知道,英语四级的选择题都是4个选项的。

所以,在考四级之前,他想到了一个主意,偷偷告诉你他的主意:

  1. 如果其中有一个选项比其他每个选项的一半短,或者其中有一个选项比其他每个选项的两倍长,那么T^T学长就觉得这个选项很不错。

  2. 如果T^T学长只发现其中一个选项很不错的话,那么他就会选择这个选项;否则的话,他也就没办法了,也就只能选C了。

现在,给你一个含有四个选项的选择题,你能预测一下T^T学长会选哪个吗?

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).

SampleInput 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
SampleOutput 1
D
SampleInput 2
A.ab
B.abcde
C.ab
D.abc
SampleOutput 2
C
SampleInput 3
A.c
B.cc
C.c
D.c
SampleOutput 3
B
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.

Submit
题目统计信息详细
总AC数33
通过人数29
尝试人数34
总提交量79
AC率36.71%
AC该题后可以添加标签
贴完标签可以获得20ACB。
并且可以获得本题所有提交代码查看权限。
点击标题可以显示标签。
如果你还没认真思考过这题,请不要查看标签
如果您已经通过了该题,请务为该题贴上标签

T^T Online Judge

[BUG反馈] [FAQ] [闽ICP备17026590号-1]
当前版本:3.24 系统时间: