# Ces programmes sont sous licence CeCILL-B V1.

n = [False for i in range(0,10)]
n[0] = True
n[1] = True
n[2] = True
p = [False for i in range(0,10)]
p[1] = True
r = [False for i in range(0,11)]

c = False
for i in range(0,10):
  a = n[i]
  b = p[i]
  r[i] = (a and not b and not c) or (not a and b and not c) or (not a and not b and c) or (a and b and c)
  c = (a and b) or (b and c) or (a and c)
r[10] = c

print(" ",end="") 
for i in range(0,10):
  if n[9-i]:
    print("1",end="")
  else:
    print("0",end="")
print()
print(" ",end="") 
for i in range(0,10):
  if p[9-i]:
     print("1",end="")
  else:
    print("0",end="")
print()
for i in range(0,11):
  if r[10-i]:
    print("1",end="")
  else:
    print("0",end="")
print()
