시간 제한 메모리 제한 제출 정답 맞은 사람 정답 비율
2 초 512 MB 53 34 33 70.213%

문제

현수는 열기구 여름특강의 강사다. 현수는 매우 성실해서 모든 수강생들의 열기구 비행을 기록하고있다. 매 비행 이후, 현수는 그 비행에 참석한 수강생들의 기록을 리스트에 추가한다. 리스트에는 각 수강생마다 띄웠던 기구의 인식번호만이 기록된다. 

매 시즌이 끝난 후, 현수는 얼마나 많은 종류의 열기구들을 비행해봤는지에 따른 수강생들의 숙련도를 분류해 나열하려고한다. 만약 두 수강생이 비행했던 열기구의 종류들이 같다면 두 수강생은 같은 숙련도를 가진것으로 분류된다. (이 경우, 비행을 한 횟수는 관계가 없다.)

현수는 총 9 종류의 열기구를 관리하며, 수강생들의 기록은 각 열기구의 번호들로써 이루어진다. 모든 수강생들 중 비행 횟수가 9번을 넘는 수강생은 없다. (1번 열기구를 세번 2번과 3번을 각각 한번씩 운용했던 수강생의 번호는 11123이 되겠다.) 

예를 들어, 수강생 234423과 수강생 342는 같은 숙련도를 가진 것으로 분류된다. 하지만 수강생 118821과 수강생 1189821 같은 경우는 9번 열기구 비행 유무의 차이로 다른 숙련도를 가진 것으로 분류된다.

현수의 리스트에 있는 수강생들이 총 몇개의 숙련도로 분류되는지 구하라.

입력

각 테스트케이스마다 첫 줄에는 총 수강생의 수인 정수 N(1 ≤ N ≤ 1 000) 이 주어진다.

이어지는 N줄은 열기구 비행 기록을 나타내는 각 수강생들의 번호들이 주어진다.

출력

매 테스트케이스마다 각 줄에 현수의 리스트에 있는 수강생들의 숙련도가 몇 개로 분류되어지는지 출력하라.

예제 입력 1

5
132
42
3312
43
24424
3
222
22
2

예제 출력 1

3
1
W3sicHJvYmxlbV9pZCI6IjEzOTE1IiwicHJvYmxlbV9sYW5nIjoiMCIsInRpdGxlIjoiXHVkNjA0XHVjMjE4XHVjNzU4IFx1YzVmNFx1YWUzMFx1YWQ2YyBcdWFkNTBcdWMyZTQiLCJkZXNjcmlwdGlvbiI6IjxwPlx1ZDYwN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