You and your friend play the following game with a fair coin: You both get to select distinct sequences of length of heads and tails. A fair coin is then repeatedly flipped until one of the two sequences you or your friend selected appears in two consecutive flips. The person whose sequence appears first is the winner. For example, if you choose and your friend chose , would end the game in flips. You get to decide whether to choose your sequence first or second. The person who chooses second gets to hear the sequence the first person selected. Assume optimal play from both players.
Report the value of , where if you should select first, if you should select second, and if it doesn't matter which order you select in, and is the probability of you winning under the optimal strategy.