John and Brus have an interest in team sports tournaments.
They are currently investigating a basketball tournament.
Basketball is a team sport in which two teams of five players try to score points against one another by placing a ball through a ten foot high hoop.
Basketball is one of the most popular and widely viewed sports in the world.
There are n teams in the tournament. Each pair of teams plays exactly two games against each other. In the first of these games, one of the teams is the host, and in the second, the other team is the host. Each game results in one team winning. There are no draws. After the tournament is over, the team with the highest total number of wins is crowned the winner.
The tournament is currently in progress and the current results are described in the String table.
For each pair of distinct indices, i and j, the j-th character of the i-th element of table is the result of the game where team i hosted team j.
The result is 'W' if team i won, 'L' if team i lost, and '?' if the game hasn't been played yet.
Assuming that every possible outcome is possible for the games that haven't been played yet, return the minimal number of total wins the tournament winner can have at the end of the tournament.