main=interact(\s->do x<-lines s#zipWith(f"^V");x#f"<>"#f" "++"\n") (a:b:s)#f=a:f a b:(b:s)#f;s#_=s f[c,d]a b|c<a=' '|a<b=c|0<1=d
Note that non-ascii characters in the above source code will be escaped (such as \x9f).
download
return to the top page