Cities Alice has visited

Count how many different city names appear in each trip log.

Easy2Hash mapInterviewNo attempts yetTime limit1sMemory limit256 MB

Problem

Alice travels a lot for work. On each trip she visits a single city and then returns home.

Someone recently asked her how many different cities she has visited for work. Alice kept a log of every trip, so the answer is in there. Count the cities she has visited at least once.

Input

The first line contains the number of test cases TT, a positive integer at most 5050.

The first line of each test case contains the number of work trips nn that Alice has taken so far, a positive integer at most 100100. The next nn lines describe those trips: the ii-th of them contains the name of the city Alice visited on her ii-th trip.

Alice's work only sends her to cities with simple names. A city name consists of lowercase letters only, has at least one letter, contains no spaces, and is at most 2020 characters long.

Output

For each test case, print a single line with the number of distinct cities Alice has visited on her work trips.