Result

AC

Code [DL]

$'d'
 \-(!i!)(i)(i)#

$'g'
 \-2mc2c(!e!)(!d!)(!c!)(d)-#

$'z'
 \-(!c!)0(c)p(c)z1sc(!c!)(!d!)(c)-#

$'i'
 \-2mc2c(!e!)1a{z}p(e)p-#

$'p'
 \-(!d!)--(d)o1s{d}0g\ /-(!c!)#
        /             v
        |             |
        \-------------/

$'f'
 \-(!c!)(!d!)(c)(d){g}(d){p}(d){d}9q-#

$'main'
 \-[0000000000]{d}p-\
                    |
/-----0(!c!)-\      |
|          #  >e----/
|/a1----\ /  /     \
|        v   |     |
|        |   |     |
\-(c){f}-/   \-i{i}/

stdin

4792541694049965216351684264614137894217996337800286861357576447764665306888219294000575112389061451

stdout

0000000011111111111122222222333333344444444444445555555556666666666666667777777778888888889999999999

stderr

strace