for x in zip(*[sorted(x,key=`x`.find)[1:]+['|']for x in zip(*open('/dev/fd/0'))]):print`x`[2:-5:5]