why must start 1,2,2?
I wonder whether there is magical string start from 2,2,1,1,2,1,2,2...
I got your point. Actually, the magic string S is uniquely determined by only the first char S (either '1' or '2'). Either case gives a well defined problem, but they are "logically" duplicated problem, so OJ just simply picked the case S = 1 to define as magic string. The method to solve "the other" magic string will be duplicated anyway.
Hopefully, it will help.