#B4018. Team Ranking in Professional League
Team Ranking in Professional League
Team Ranking in Professional League
In the professional league of this game, the ranking of Team A and Team B is determined by their number of wins, goal difference, and the number of draws. The ranking rules are as follows:
- A team with a higher number of wins ranks better.
- If the wins are equal, the team with a higher goal difference \( (\text{GD}) \) ranks better.
- If the goal difference is also equal, the team with a lower number of draws ranks better.
inputFormat
The input consists of two lines. The first line contains three integers representing Team A's wins, goal difference, and draws (in that order). The second line contains three integers representing Team B's wins, goal difference, and draws.
outputFormat
Output a single uppercase letter: ( \text{A} ) if Team A is ranked higher, or ( \text{B} ) if Team B is ranked higher.
sample
5 10 1
4 9 2
A