#C4320. RSVP Summary

    ID: 47846 Type: Default 1000ms 256MiB

RSVP Summary

RSVP Summary

You are given a number of test cases for an event RSVP. For each test case, you need to count the number of 'yes', 'no', and 'maybe' responses.

The input follows this format:

  • The first line contains an integer \(T\), the number of test cases.
  • For each test case, the first line contains an integer \(N\) representing the number of responses.
  • The next \(N\) lines each contain two entries: a user ID (an integer) and a response (a string that is either "yes", "no", or "maybe").

Your task is to compute, for each test case, the counts of each type of response and print them. The output for each test case should consist of three lines in the order: count of "yes", count of "no", and count of "maybe" responses.

Mathematically, if for a test case we denote \(C_{yes}\), \(C_{no}\), and \(C_{maybe}\) as counts for the respective responses, then you need to output: \[ C_{yes}\ C_{no}\ C_{maybe} \]

inputFormat

Input is read from standard input. The first line contains an integer \(T\), the number of test cases. For each test case, the first line contains an integer \(N\), the number of responses. It is followed by \(N\) lines, each containing a user ID and a response (one of "yes", "no", or "maybe") separated by space.

outputFormat

For each test case, print three lines representing the counts of responses in the following order: "yes", "no", "maybe". Output is written to standard output.

## sample
1
3
10 yes
11 no
12 maybe
1

1 1

</p>