mat = []
for i in range(5):
mat.append([])
for ii in range(5):
mat[i].append(0)
for i in range(len(mat)):
for ii in range(len(mat[i])):
if (ii+1) % 2 == 0:
mat[i][ii] = 0
else:
mat[i][ii] = 1
for i in mat:
print(*i)
mat = []
for i in range(5):
mat.append([])
for ii in range(5):
mat[i].append(0)
for i in range(len(mat)):
for ii in range(len(mat[i])):
if (ii+1) % 2 == 0:
mat[i][ii] = 0
else:
mat[i][ii] = 1
for i in mat:
print(*i)