Synonymous Words Number System (SWNS) uses the lines of $N$ characters consisting of '0' and '1' ($2 \le N \le 10000$). There is only one operation with words within the number system -- it's called synonymization. Synonymization is reversing the character order in any substring containing even number of '1' symbols.

If we can create one word from the another one, by carrying out not more than $16 \cdot N$ synonymization, then such words are called synonyms.

It is necessary to determine whether the given words are synonymous, and, if so, find out the right sequence of synonymizations.

