[JET] Fortress

Can someone help with overflow?
I have working script for my local machine, but in jet machine it prints some strange characters in the middle of execution and then fails, can’t understand why.

EDIT: proper tty is critical. You can find methods by “upgrading tty” search. Look for stty method.