public static void Main()
int n = int.Parse(Console.ReadLine());
string[] firstPlayerCards = new string[n * 3];
string[] secondPlayerCards = new string[n * 3];
bool firstPlayerXCard = false;
bool secondPlayerXCard = false;
BigInteger firstPlayerScore = 0;
BigInteger firstGamesWon = 0;
BigInteger secondPlayerScore = 0;
BigInteger secondGamesWon = 0;
for (int i = 0; i < n; i++)
BigInteger firstCurrentScore = 0;
BigInteger secondCurrentScore = 0;
for (int drawFirst = 0; drawFirst < 3; drawFirst++)
firstPlayerCards[drawFirst] = Console.ReadLine();
switch (firstPlayerCards[drawFirst])
for (int drawSecond = 0; drawSecond < 3; drawSecond++)
secondPlayerCards[drawSecond] = Console.ReadLine();
switch (secondPlayerCards[drawSecond])
secondCurrentScore += 10;
secondCurrentScore += 11;
secondCurrentScore += 12;
secondCurrentScore += 13;
secondPlayerXCard = true;
secondPlayerScore -= 200;
if (firstPlayerXCard && !secondPlayerXCard)
Console.WriteLine("X card drawn! Player one wins the match!");
else if(secondPlayerXCard && !firstPlayerXCard)
Console.WriteLine("X card drawn! Player two wins the match!");
else if (secondPlayerXCard && firstPlayerXCard)
firstPlayerXCard = false;
secondPlayerXCard = false;
if (firstCurrentScore > secondCurrentScore)
firstPlayerScore += firstCurrentScore;
else if (secondCurrentScore > firstCurrentScore )
secondPlayerScore += secondCurrentScore;
if (firstPlayerScore > secondPlayerScore)
Console.WriteLine("First player wins!");
Console.WriteLine("Score: {0}", firstPlayerScore);
Console.WriteLine("Games won: {0}", firstGamesWon);
if (firstPlayerScore == secondPlayerScore)
Console.WriteLine("It's a tie!");
Console.WriteLine("Score: {0}", firstPlayerScore);
if (firstPlayerScore < secondPlayerScore)
Console.WriteLine("Second player wins!");
Console.WriteLine("Score: {0}", secondPlayerScore);
Console.WriteLine("Games won: {0}", secondGamesWon);