The solution mirrors the character string on the left #-symbol. It reads and erases the leftmost symbol (blue states) and copies it to the front of the new string (red states).


World during program execution.
symbol is read (left) and added (right).