#P6402. [COCI 2014/2015 #2] UTRKA

[COCI 2014/2015 #2] UTRKA

Description

Many local and international recreational runners are eager to take part in this year’s Zagreb Marathon! This is a traditional race with a length of 42125 meters. A strange statistic is that this year, every competitor except one managed to finish the race.

Please help the organizers determine the identity of the competitor who did not finish the race, based on the list of registered competitors and the ranking list.

Input Format

The first line contains an integer nn, the number of competitors.

Each of the next nn lines contains the name of a registered competitor.

The other n1n - 1 lines contain the names of the competitors who finished the race, listed in the order in which they finished. Competitor names consist of English letters. Competitor names are not necessarily unique.

Output Format

The first and only line must contain the name of the competitor who did not finish the race.

3
leo
kiki
eden
eden
kiki

leo
5
marina
josipa
nikola
vinko
filipa
josipa
filipa
marina
nikola

vinko
4
mislav
stanko
mislav
ana
stanko
ana
mislav

mislav

Hint

Constraints

  • For 50%50\% of the testdata, 1n1031 \le n \le 10^3.
  • For 100%100\% of the testdata, 1n1051 \le n \le 10^5.

Let s|s| be the length of a competitor’s name. Then for all valid names, 1s201 \le |s| \le 20, and names consist only of lowercase letters.

Notes

Translated from COCI2014-2015 CONTEST #2 T2 UTRKA.

Translated by ChatGPT 5