Result

WA

Code [DL]

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

stdin

3927628527750925185137348296103500451053937482179199944265413924306165336224469455665048063519425301

stdout

stderr

Crash: No valid move

strace