PyPy 3-64 Submission id [261912327](https://codeforces.me/contest/1974/submission/261912327)↵
Python 3 Submission id [261912035](https://codeforces.me/contest/1974/submission/261912035).↵
Spent all my time debugging this code but could not figure out during contest.
Python 3 Submission id [261912035](https://codeforces.me/contest/1974/submission/261912035).↵
Spent all my time debugging this code but could not figure out during contest.