All problems

Overlaying Two Distributions

mediumPythonMatplotlibHistogram

Ashgrove Analytics ran the same recipe past two taste panels, A and B, and each taster left a score. The two sets of scores are drawn as see-through bands on one picture so their shapes can be compared side by side, but the write-up needs a verdict in a single letter. The panels were not recruited to the same size, so the larger panel is not automatically the better-scoring one.

Task: Print A or B, whichever panel has the higher average score. If the two averages come out exactly equal, print B.

Input

Four lines. The first holds an integer n, the size of panel A. The second holds n scores separated by single spaces. The third holds an integer m, the size of panel B. The fourth holds m scores separated by single spaces. Scores may have decimals.

Output

One line holding a single capital letter, A or B.

Example:

Input:
3
10 20 30
3
50 60 70

Output:
B

Sign in to solve this problem

Reading problems is free for everyone — solving them (Run, Submit, and tracking what you've solved) needs an account.

Sign in

Discussion

Sign in to join the discussion — reading is open to everyone.

Loading comments…