https://practice.geeksforgeeks.org/problems/game-with-string/0