#include<math.h>
main
(){char*m
="12345678",b
[9999];int p
,i
,n
,q
,c
,l
=strlen(m
),r
=1,d
,f
=0;float o
,s
;for(;!f
;r
++){f
=0;q
=r
*r
;c
=r
/4;o
=6.3,s
=o
/99.
;memset(b
,0,q
);for(i
=0;i
<l
;i
++){p
=1;f
=0;while(p
&&o
>0){d
=(c
-1+(int)(sin(o
)*c
))*r
+c
-1+(int)(cos(o
)*c
);f
+=p
=b
[d
];if(!p
)b
[d
]=m
[i
];o
-=s
;}}if(f
){for(n
=p
=0;n
<q
;n
++){p
+=c
=b
[n
];putchar(c
?c
:32);if(n
%r
==r
-1){if(!p
)n
=q
;putchar(10);p
=0;}}}}}
I2luY2x1ZGU8bWF0aC5oPgptYWluKCl7Y2hhciptPSIxMjM0NTY3OCIsYls5OTk5XTtpbnQgcCxpLG4scSxjLGw9c3RybGVuKG0pLHI9MSxkLGY9MDtmbG9hdCBvLHM7Zm9yKDshZjtyKyspe2Y9MDtxPXIqcjtjPXIvNDtvPTYuMyxzPW8vOTkuO21lbXNldChiLDAscSk7Zm9yKGk9MDtpPGw7aSsrKXtwPTE7Zj0wO3doaWxlKHAmJm8+MCl7ZD0oYy0xKyhpbnQpKHNpbihvKSpjKSkqcitjLTErKGludCkoY29zKG8pKmMpO2YrPXA9YltkXTtpZighcCliW2RdPW1baV07by09czt9fWlmKGYpe2ZvcihuPXA9MDtuPHE7bisrKXtwKz1jPWJbbl07cHV0Y2hhcihjP2M6MzIpO2lmKG4lcj09ci0xKXtpZighcCluPXE7cHV0Y2hhcigxMCk7cD0wO319fX19