# -- coding: utf-8 -- a = input() N = int(input()) qun = {} #每一个群里的人 for i in range(N): alls = input().split(",") qun[i] = alls people = {} #每一个人在哪些群 for i,j in qun.items(): for k in j: if k not in people: people[k] = [i] else: people[k...