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' X}}[gx4Fq)tmyMT]b)Pds6;o;(qJlP{cZ3vpZ<uYcDPqGrsedE33c<8+]amq?,S}j+CB;^g11?FpPH&+hi8+6)g=ks+d1juv3gR(3^&/EhFC!j/|*dA7f|C(}p9SU5t,WY9K)DEz%P,exlo9wb?L?9 "
def decode ( s : str , c : str ) -> int :
n = 0
k = len ( c )
for t in reversed ( s ):
n *= k
n += c . index ( t )
return n
img = decode ( raw , chars )
h = img & 0xFFFF
img >>= 16
w = img & 0xFFFF
img >>= 16
img >>= 1
for y in range ( h ):
for x in range ( w ):
img >>= 1
k = ( img & 1 ) * 255
set_pixel ( x , y ,( k , k , k ))
input ()