Пахненко Иван 516 PokeMon 7042
Георгий Попандопуло, 520 группа PokeMon 7715
t1"""t
20 / Misdreavus
3Svjatoslav Devjatkov / 3
42 / Yamask
5Vsevid Mladenov / 1
61 / Keldeo
70 / Keldeo
81 / Misdreavus
92 / Scatterbug
100 / Crawdaunt
112 / Keldeo
121 / Vanillite
13Svjatoslav Devjatkov / 0
142 / Gardevoir
15Neljub Mstislavin / 2
162 / Crawdaunt
170 / Yamask
183 / Reshiram
19"""
20card_name = {}1card_name = {}
21people_card = {}2people_card = {}
223
23def check_int(s):4def check_int(s):
24    try:5    try:
25        int(s)6        int(s)
26        return True7        return True
27    except:8    except:
28        return False9        return False
29while True:10while True:
30    cur_str = input().split(' / ')11    cur_str = input().split(' / ')
31    if cur_str == ['']:12    if cur_str == ['']:
32        break13        break
33    if check_int(cur_str[0]):14    if check_int(cur_str[0]):
34        cur_str[0] = int(cur_str[0])15        cur_str[0] = int(cur_str[0])
35        if cur_str[0] not in card_name:16        if cur_str[0] not in card_name:
36            card_name[cur_str[0]] = set()17            card_name[cur_str[0]] = set()
37        card_name[cur_str[0]].add(cur_str[1])18        card_name[cur_str[0]].add(cur_str[1])
38    else:19    else:
39        cur_str[1] = int(cur_str[1])20        cur_str[1] = int(cur_str[1])
40        if cur_str[0] not in people_card:21        if cur_str[0] not in people_card:
41            people_card[cur_str[0]] = set()22            people_card[cur_str[0]] = set()
42        people_card[cur_str[0]].add(cur_str[1])23        people_card[cur_str[0]].add(cur_str[1])
43people_count = {}24people_count = {}
44max_count = 025max_count = 0
45for i in people_card.keys():26for i in people_card.keys():
46    cur_set = set()27    cur_set = set()
47    for j in people_card[i]:28    for j in people_card[i]:
48        cur_set.update(card_name[j])29        cur_set.update(card_name[j])
49    temp = len(cur_set)30    temp = len(cur_set)
50    people_count[i] = temp31    people_count[i] = temp
51    if temp > max_count:32    if temp > max_count:
52        max_count = temp33        max_count = temp
53for i in sorted(people_count):34for i in sorted(people_count):
54    if people_count[i] == max_count:35    if people_count[i] == max_count:
55        print(i)36        print(i)
Legends
Colors
 Added 
Changed
Deleted
Links
(f)irst change
(n)ext change
(t)op