By Neilor Tonin, URI Brazil
Now that Mangojata solved some problems using getline, she is able to take a step forward. She is about to make a new program to help her sister, Overlaine. Overlaine is a seller of shoes and by a neglect, mixed all shoes of each box. Now she wants to inform any number N and count how many shoes of this size (N) exists inside a specific box. The problem is that Overlaine have no any idea how many shoes are in each box. The only thing we know is that each footwear may be numbered 20-44, and may be male or female.
The input contains several test cases and ends with EOF (End of File). Each test case is composed by two lines. The first line contains a number N (20 ≤ N ≤ 44) of a shoe informed by Oveline. The second line contains the number of each pair that are inside the box, followed by M or N, indicating if this shoes are Masculine or Feminine.
For each test case print four lines, like given example. In the first line you must print the message “Caso n:”, where n is the number of the test case. In the second line you must print the message “Pares Iguais:” followed by how many pairs of shoes have the same size of that wich Overlaine wants to find. Follow two lines with the respective among of Feminine (F) and Masculine (M) shoes, with corresponding message.
Print a blank line between the outputs for two consecutive test cases.
|Sample Input||Sample Output|