Hackerrank game winner. Both players are given the same string, S.

Hackerrank game winner. The player who cannot make a move loses the game.