Codeforces Round 926 (Div. 2) D. Sasha and a Walk in the City Hints: Sasha and a Walk in the City Code : Sasha and a Walk in the City