#P11295. Dragonfly Prey Diversity

    ID: 13371 Type: Default 1000ms 256MiB

Dragonfly Prey Diversity

Dragonfly Prey Diversity

In this problem, you are given information about several dragonflies and the insects they prey upon during their flights. For each dragonfly, you are to determine the number of distinct insect species it has captured. In other words, for each dragonfly's list of captured insects, count how many unique insect types exist.

The input begins with an integer n representing the number of dragonflies. For each dragonfly, the first number is k, denoting the number of captured insects, followed by k strings that represent the insect species. Your task is to output, for each dragonfly, the count of unique insect names.

Note: Two insects are considered of the same species if the strings are exactly equal.

inputFormat

The input starts with a single integer n (1 ≤ n ≤ 100) — the number of dragonflies. For each dragonfly, there is a line starting with an integer k (1 ≤ k ≤ 100) representing the number of captured insects, followed by k space-separated strings denoting the names of the insects.

outputFormat

For each dragonfly, output a single line containing an integer — the number of distinct insect species captured by that dragonfly.

sample

1
5 apple apple banana banana apple
2

</p>