The sequences iiioiooo and iiiooioo will both transform POLO into LOOP; the first of these transformations is shown below:
Operation Input Output Stack (top->)
--------- --------- --------- -------------
POLO
i OLO P
i LO PO
i O POL
o O L PO
i POO
o LO PO
o LOO P
o LOOP
The input consists of one or more lines, each of which contains two words
separated by a space. The words will consist only of uppercase letters.
For each pair of words, output all sequences that will transform the first
word into the second, in alphabetical order, as shown in the examples.
It is possible that no sequence will work, and if so none should
be output.
Input must be read from the file "prob27.in",
and output must be written to the file "prob27.out".
All output to the screen will be ignored.
<BOF> VEERS SEVER SHOE HOSE COW QUASIDEMISEMIHEMISPHERICAL FREE REEF <EOF>
VEERS -> SEVER SHOE -> HOSE iioiooio COW -> QUASIDEMISEMIHEMISPHERICAL FREE -> REEF iioiiooo iioioioo
Dr. Eric Shade