Result

WA

Code [DL]

$ 'j'        #(c){j}(x)-@
 --(!x!)(!c!)(c)(x)g--<
$ 'main'@       #(x)(c)-@
 |@      \-uo--
 | \{j}i- \    >#
 9  \    >u-1q/
 \-1a--e/

stdin

1006728813341561048415807180940024960419119148548198497903588415315454170681753286793458597907897641

stdout

stderr

Crash: No valid move

strace