Draw a tree diagram to get started.
You could also fill in a table for all possible outputs for, say,
the first 5 letters produced to get a feel for the problem and
which sequences will win first.
You can also read http://plus.maths.org/issue55/features/nishiyama/
which has answers to the required computations.