(loop(setq m(#0=format()"~14@{~80@T|~}"t)x 0 y 0)(doseq(c(read-line))(setf(elt m(+(*(if(eq c #\()(1-(incf y))(decf y))81)x))c)(incf x))(#0#t"~{~&~A~}"(regexp:regexp-split" *|"m)))