SP16102 CARRHIM - Can you play carrom !!!

Description

Carrom board is a very popular game. There are four player in this game in dual player mode. In dual player game the team is pair with opposite side player. ![carrom](http://s10.postimg.org/l9ipohck9/carom.png "carrom") So, in picture you see the board and the player’s. Where the player A and the player C in team-1, the player B and the player D in team-2. In this game a team is play with one color pawn. So, if team-1 start playing the board they take the white pawn, and the team-2 get the black pawn for the game. If team-1 can cover all the pawn before the team-2 and the red also covered by the time then the team-1 will win. Otherwise team-2 will win if they cover their all pawn in the game. Now, There are 9 white pawn and 9 black pawn and one red pawn in the board. The game is played by different rule. In my problem of this game the rule like, The point for the one pawn is 1 and for red is 5. You can assume that which player 1st start playing the game is start with the white pawn.one team must cover red pawn and this team will get the red point.And you know the penalty rule is If one player cover one pawn of opposite team then the turn goes to the next player. Now your task is to find the winner team & points. The points count by the remaining of pawn in the board and plus the covered red pawn point by the winning team. **Input** Input consists of pairs of lines (at most 100 lines). Each pair contains 1 charecter and 3 integer.A first charecter is the player id(A , B , C or D) and three integer is W, B, R (1

Input Format

N/A

Output Format

N/A