403966: GYM101375 G MaratonIME does a competition

Memory Limit:256 MB Time Limit:2 S
Judge Style:Text Compare Creator:
Submit:0 Solved:0

Description

G. MaratonIME does a competitiontime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard output

It's January and MaratonIME is attending to an ACM-ICPC Summer School in Campinas. Renzo, THE POWERFUL, went to visit his students and, as usual, brought chocolates from Peru. However, after a couple of parties, MaratonIME is growing a lot and Renzo doesn't have enough chocolates for everyone.

There is enough chocolate for of the students. So, Renzo will reward the best contestants. As a great coach, Renzo wants MaratonIME to work as a team, so he divided the students in 4 teams, , , and . The team which solves more problems wins. If two teams manage to solve the same amount of problems, Renzo rewards the team with smaller lexicographical name (if and draw, gets the chocolates).

In order to assign participants to teams, Renzo found out the amount n of contestants and gave each one of them a different integer from 1 to n. Having numbered the students, Renzo decided that the one with number 1 would go to team , the one with number 2 would go to team and so on. Formally:

  • The contestant with number 1 is on team
  • If 1 < i + 1 ≤ n and contestant i is on , then contestant i + 1 is on team
  • If 1 < i + 1 ≤ n and contestant i is on , then contestant i + 1 is on team
  • If 1 < i + 1 ≤ n and contestant i is on , then contestant i + 1 is on team
  • If 1 < i + 1 ≤ n and contestant i is on , then contestant i + 1 is on team

    There are many students and Renzo is busy thinking about the next contest he's creating, so you were chosen to determine which team wins the big prize! You are given a vector a of size n where, for each index 1 ≤ i ≤ n, ai is the amount of problems solved by contestant i during the contest. The amount of problems solved by a team is the sum of the problems solved by it's contestants.

Input

The first line of input has an integer 4 ≤ n ≤ 105. The second line, n integers 0 ≤ ai ≤ 104.

Output

You should print one line with name of the team that gets the chocolates: , , or .

ExampleInput
4
1 2 3 4
Output
D

加入题单

算法标签: