#K376. Tournament Winner

    ID: 26012 Type: Default 1000ms 256MiB

Tournament Winner

Tournament Winner

This problem simulates a knockout tournament where in each round the number of participants is reduced. The number of participants in each round is calculated using the formula \(\lceil n/2 \rceil\) (which in integer arithmetic can be computed as \((n+1)//2\)). The process continues until a single participant remains.

The overall winner is determined by simply taking the lexicographically smallest name among all participants.

Your task is to compute the number of rounds required for the tournament to conclude and the name of the tournament winner.

inputFormat

The input is given via stdin in the following format:

  1. The first line contains an integer \(n\) representing the number of participants.
  2. The second line contains \(n\) space-separated strings representing the names of the participants.

outputFormat

Output the number of rounds needed in the tournament on the first line, and the lexicographically smallest name (the tournament winner) on the second line. The output should be printed to stdout.

## sample
4
alice bob charlie david
2

alice

</p>