Sample Space of a Fair Coin A coin is tossed until, for the first time, the same result appears twice in succession. Define a sample space for this experiment.
The solution in the back of the book is:
$[x_1x_2...x_n: n \ge 1, x_i \in [H, T]; x_i \ne x_{i+1}, 1 \le i \le n-2; x_{n-1}=  x_n]$
I don't have a clue how this result was achieved. Besides knowing that the sample space of a fair coin is $[H, T]$ I am completely lost. 

Its a list of the first $n$ coin flips given as $x_i$, with the restriction that the only consecutive tosses with the same outcome are $x_n$ and $x_{n-1}$.
