# -*- coding: utf-8 -*-
"""
Created on Sun Aug  9 20:19:20 2020

@author: user
"""
a=input()
b=input()
c=input()
d=input()


print("|{:>10} {:>10}|".format(a,b))
print("|{:>10} {:>10}|".format(c,d))
print("|{:<10} {:<10}|".format(a,b))
print("|{:<10} {:<10}|".format(c,d))