| llilyshkall HalfMore 1033 | Александр Цехмистер, 527 группа HalfMore 735 | ||||
|---|---|---|---|---|---|
| n | 1 | name_type = eval(input()) | n | 1 | object = eval(input()) |
| 2 | count_type = 1 | 2 | count = 1 | ||
| 3 | while (line := input()) != '': | 3 | while (el := input()) != '': | ||
| 4 | tmp_type = eval(line) | 4 | el = eval(el) | ||
| 5 | if tmp_type == name_type: | 5 | if el == object: | ||
| 6 | count_type += 1 | 6 | count += 1 | ||
| 7 | else: | 7 | else: | ||
| t | 8 | count_type -= 1 | t | 8 | count -= 1 |
| 9 | if count_type < 0: | 9 | if count == 0: | ||
| 10 | name_type = tmp_type | 10 | object = el | ||
| 11 | count_type = 1 | 11 | count = 1 | ||
| 12 | print(name_type) | 12 | print(object) | ||
| Legends | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|
|
| |||||||||