[tourist reference](https://codeforces.com/contest/1988/submission/270682239)
tourist reference