437_A. The Child and Homework
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).

Examples

Input

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

D


Input

A.ab
B.abcde
C.ab
D.abc


Output

C


Input

A.c
B.cc
C.c
D.c


Output

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.
```python
a = input()[2:]
b = input()[2:]
c = input()[2:]
d = input()[2:]

zc = 0
z = -100

if (len(a)*2 <= len(b) and len(a)*2 <= len(c) and len(a)*2 <= len(d)) or (len(a) >= len(b)*2 and len(a) >= len(c)*2 and len(a) >= len(d)*2):
    zc += 1
    z = 'A'
if  (len(b)*2 <= len(a) and len(b)*2 <= len(c) and len(b)*2 <= len(d)) or (len(b) >= len(a)*2 and len(b) >= len(c)*2 and len(b) >= len(d)*2):
    zc += 1
    z = 'B'
if  (len(c)*2 <= len(b) and len(c)*2 <= len(a) and len(c)*2 <= len(d)) or (len(c) >= len(b)*2 and len(c) >= len(a)*2 and len(c) >= len(d)*2):
    zc += 1
    z = 'C'
if (len(d)*2 <= len(b) and len(d)*2 <= len(c) and len(d)*2 <= len(a)) or (len(d) >= len(b)*2 and len(d) >= len(c)*2 and len(d) >= len(a)*2):
    zc += 1
    z = 'D'
if zc == 1:
    print(z)
else:
    print('C')

```