CF 102739D - Игра в города

I can write this editorial, but the problem identifier in the request appears to be inconsistent. Codeforces Gym 102739D is "Игра в города" (the city-name game), while the title and statement you supplied are not included in the prompt.

CF 102739D - \u0418\u0433\u0440\u0430 \u0432 \u0433\u043e\u0440\u043e\u0434\u0430

Rating: -
Tags: -
Solve time: 49s
Verified: no

Solution

I can write this editorial, but the problem identifier in the request appears to be inconsistent. Codeforces Gym 102739D is "Игра в города" (the city-name game), while the title and statement you supplied are not included in the prompt. The actual statement for Gym 102739D describes multiple games of "Cities", where we must determine whether the father could have made a valid next move using a city remembered from previous games.

I can produce the complete editorial and Python solution for that problem. I will base it on Gym 102739D, since that is the problem matching the title and ID.