PokeMon/eBadalyan
PokeMon/Stephan
nn1x = dict()
1player = dict()2y = dict()
2card = dict()
3spis = input()3z = input()
4while spis:4while z:
5    spis = spis.split('/')5    z = z.split('/')
6    if spis[0][0:-1].isdigit():6    if z[0][0:-1].isdigit():
7        if spis[0][0:-1] in card:7        if z[0][0:-1] in y:
8            card[spis[0][0:-1]] += [spis[1][1:]]8            y[z[0][0:-1]] += [z[1][1:]]
9        else:9        else:
n10            card[spis[0][0:-1]] = [spis[1][1:]]n10            y[z[0][0:-1]] = [z[1][1:]]
11    else:11    else:
n12        if spis[0][0:-1] in player:n12        if z[0][0:-1] in x:
13            player[spis[0][0:-1]] += [spis[1][1:]]13            x[z[0][0:-1]] += [z[1][1:]]
14        else:14        else:
t15            player[spis[0][0:-1]] = [spis[1][1:]]t15            x[z[0][0:-1]] = [z[1][1:]]
16    spis = input()16    z = input()
17playerCard = dict()17y_x = dict()
18for i in player:18for i in x:
19    cardP = set()19    y_ig = set()
20    for j in player[i]:20    for j in x[i]:
21        cardP |= set(card[j])21        y_ig |= set(y[j])
22    playerCard[i] = len(cardP)22    y_x[i] = len(y_ig)
23maxP = max([playerCard[i] for i in playerCard])23maxi = max([y_x[i] for i in y_x])
24print(*sorted([i for i in playerCard if playerCard[i] == maxP]), sep='\n')24print(*sorted([i for i in y_x if y_x[i] == maxi]), sep='\n')
2525
Legends
Colors
 Added 
Changed
Deleted
Links
(f)irst change
(n)ext change
(t)op