CCCGuide

Problem J2: Vote Count

2014 · J2 · Original problem · DMOJ

Problem Description

A vote is held after singer A and singer B compete in the final round of a singing competition. Your job is to count the votes and determine the outcome.

Input Specification

The input will be two lines. The first line will contain V (1≤V≤15)V~(1 \leq V \leq 15), the total number of votes. The second line of input will be a sequence of VV characters, each of which will be AA or BB, representing the votes for a particular singer.

Output Specification

The output will be one of three possibilities:

Sample Input 1

6
ABBABB

Output for Sample Input 1

B

Sample Input 2

6
ABBABA

Output for Sample Input 2

Tie