Alice and Bob are playing a game with string. Given a string S = $S_1$...$S_n$.
They choose m substrings from S, the ith substring is $S_{L_i}$...$S{R_i}$.
Alice and Bob play alternately, with Alice going first.
On a player’s turn, this player can add a character into one of those m substrings, but the character should be added in the front or in the end, and the new string should still be a substring of S.
The player unable to make a valid move loses the game. Who will be the winner if both players move optimally?