{"raw_statement":[{"iden":"statement","content":"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.\n\nThere 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).\n\nIn 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: \n\nThere 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. \n\nThe first line of input has an integer 4 ≤ n ≤ 105. The second line, n integers 0 ≤ ai ≤ 104.\n\nYou should print one line with name of the team that gets the chocolates: , ,  or .\n\n"},{"iden":"input","content":"The first line of input has an integer 4 ≤ n ≤ 105. The second line, n integers 0 ≤ ai ≤ 104."},{"iden":"output","content":"You should print one line with name of the team that gets the chocolates: , ,  or ."}],"translated_statement":null,"sample_group":[],"show_order":[],"formal_statement":"**Definitions**  \nLet $ n \\in \\mathbb{Z} $, $ 4 \\leq n \\leq 10^5 $, be the number of contestants.  \nLet $ A = (a_1, a_2, \\dots, a_n) $ be a sequence of non-negative integers, where $ a_i $ is the number of problems solved by contestant $ i $.  \n\nContestants are assigned to teams cyclically:  \n- Contestant $ i $ is assigned to team $ T(i) $, where:  \n  $$\n  T(i) = \n  \\begin{cases}\n  \\texttt{A} & \\text{if } i \\equiv 1 \\pmod{4} \\\\\n  \\texttt{B} & \\text{if } i \\equiv 2 \\pmod{4} \\\\\n  \\texttt{C} & \\text{if } i \\equiv 3 \\pmod{4} \\\\\n  \\texttt{D} & \\text{if } i \\equiv 0 \\pmod{4}\n  \\end{cases}\n  $$\n\nLet $ S_X = \\sum_{i: T(i) = X} a_i $ denote the total problems solved by team $ X \\in \\{\\texttt{A}, \\texttt{B}, \\texttt{C}, \\texttt{D}\\} $.\n\n**Constraints**  \n$ 0 \\leq a_i \\leq 10^4 $ for all $ i \\in \\{1, \\dots, n\\} $\n\n**Objective**  \nFind the team $ X \\in \\{\\texttt{A}, \\texttt{B}, \\texttt{C}, \\texttt{D}\\} $ with maximum $ S_X $.  \nIn case of a tie in $ S_X $, choose the team with lexicographically smallest name.","simple_statement":"You are given n contestants numbered 1 to n, divided into 4 teams in order:  \n- Contestant 1 → Team A  \n- Contestant 2 → Team B  \n- Contestant 3 → Team C  \n- Contestant 4 → Team D  \n- Contestant 5 → Team A  \n- ... and so on (cycling every 4)\n\nYou are given an array a of length n, where a[i] is the number of problems solved by contestant i+1.\n\nCalculate the total problems solved by each team.  \nThe team with the highest total wins.  \nIf there’s a tie, the team with the lexicographically smallest name wins (A < B < C < D).\n\nPrint the name of the winning team: A, B, C, or D.","has_page_source":false}