Problem A - Dice ---------------- The people of ACMamia have a tradition of rolling a six-sided die to determine who will choose where to dine that evening. One person rolls the die, the other calls "odd" or "even". If the caller guesses correctly, then he or she gets to choose the restaurant; otherwise, the person throwing does. Hopefully, it is obvious that "odd" wins when 1, 3 or 5 is rolled, and "even" with 2, 4 or 6! ACMamians also have a tradition of repeating the same call (either "odd" or "even") several times in succession. Your task is to check the recorded rolls and determine how many times each person wins. Input ----- Input for this problem consists of a sequence of one or more scenarios. Each scenario contains 3 lines. - The first line contains, in order, the names of two people, and one of the words "odd" or "even" (in lowercase), separated by a space. The first named person will always throw, and the second named person will always call either "odd" or "even", as indicated. In ACMamia, a name is a non-empty sequence of up to 20 (inclusive) letters (any of which may be uppercase or lowercase). - The second line will be an integer, N, 1 <= N <= 255, representing the number of die throws. - The third line contains N integers, each between 1 and 6 (inclusive), separated by single spaces, representing die throws. The input will be terminated by a line consisting of three hash signs (#). This line should not be processed. Output ------ Output will be a sequence of lines, one for each input scenario. Each line will contain in order the following items, separated by single spaces: the name of the first person (exactly as it appears in the input), the number of times the first person won, the name of the second person (exactly as it appears in the input), and the number of times the second person won. Sample Input ------------ Bill Susan even 8 1 6 5 3 4 2 5 5 Sarah Tony odd 15 2 4 5 4 3 6 1 2 5 4 3 1 2 5 6 ### Output for Sample Input ----------------------- Bill 5 Susan 3 Sarah 8 Tony 7