l=raw_input().split() i=4 a="_ _|||__ _" while i:i-=1;print"||| _ _"[i::4]+a[i::4].join((["_|",w,"| ","_"][i]*33)[:len(w)]for w in l)+a[i:7:4]