https://www.acmicpc.net/problem/9375 풀이 def solve(): import sys input = sys.stdin.readline T = int(input().strip()) # 테스트 케이스 수 results = [] for _ in range(T): n = int(input().strip()) clothes = {} for _ in range(n): name, kind = input().strip().split() if kind in clothes: clothes[kind] += 1 else: ..