pattern = [[1,1,1,1,1,1,1],
[1,0,0,1,0,0,1],
[1,0,0,1,0,0,1],
[1,1,1,1,1,1,1],
[1,0,0,1,0,0,1],
[1,0,0,1,0,0,1],
[1,1,1,1,1,1,1]]
s = input()
for r in pattern:
print(*[[' ',s][e] for e in r])