// BrainSteel
// C, 150 bytes
t
;f
(char*c
){char l
=strlen(c
)+1,o
[l
*l
],*A
=o
,m
=0;for(t
=1;t
<l
*l
;t
++)o
[t
-1]=t
%l
?32:10;for(t
=-1;*c
;c
++)A
++[l
*(*c
-41?++t
>m
?m
=t
:t
:t
--)]=*c
;A
[m
*l
]=0;puts(o
);}
// Test Program:
#include "stdio.h"
#include "string.h"
int main(){
char buf[100];
int q = 0;
while (!q) {
f(buf);
printf("\n--------------------\n"); }
else q = 1;
}
return 0;
}
Ly8gQnJhaW5TdGVlbAovLyBDLCAxNTAgYnl0ZXMKdDtmKGNoYXIqYyl7Y2hhciBsPXN0cmxlbihjKSsxLG9bbCpsXSwqQT1vLG09MDtmb3IodD0xO3Q8bCpsO3QrKylvW3QtMV09dCVsPzMyOjEwO2Zvcih0PS0xOypjO2MrKylBKytbbCooKmMtNDE/Kyt0Pm0/bT10OnQ6dC0tKV09KmM7QVttKmxdPTA7cHV0cyhvKTt9CgovLyBUZXN0IFByb2dyYW06CiNpbmNsdWRlICJzdGRpby5oIgojaW5jbHVkZSAic3RyaW5nLmgiCgppbnQgbWFpbigpewogICAgY2hhciBidWZbMTAwXTsKICAgIGludCBxID0gMDsKICAgIHdoaWxlICghcSkgewogICAgICAgIHNjYW5mKCIgJTk5cyIsIGJ1Zik7CiAgICAgICAgaWYgKHN0cmNtcChidWYsICJxdWl0IikpIHsKICAgICAgICAgICAgcHJpbnRmKCIlc1xuXG4iLCBidWYpOwogICAgICAgICAgICBmKGJ1Zik7CiAgICAgICAgICAgIHByaW50ZigiXG4tLS0tLS0tLS0tLS0tLS0tLS0tLVxuIik7CiAgICAgICAgfQogICAgICAgIGVsc2UgcSA9IDE7CiAgICB9CiAgICAKICAgIHJldHVybiAwOwp9Cg==