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
        |             |
        \-------------/

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

stdin

3837890991791191221047993721071501206611621315028709423993178565786281320818840139942434120327755665

stdout

0000000000111111111111111112222222222223333333333444444555555566666667777777777888888888999999999999

stderr

strace