fix for I/O printing the same char multiple times (due to generating multiple successors even for normal execution)