The first line of the input gives the number of test cases T.Then T test cases follow.
The first line of each test case contains an integer N,indicating the number of players.
Then follows N lines,i-th line contains an integer x and a string S,indicating the i-th players tell you,"Player x is a S."
limits:
$ 1 \leq T \leq 10 $
$ 1 \leq N \leq 100,000 $
$ 1 \leq x \leq N $
$ S \in $ {"villager"."werewolf"}