A, B = input(), input()
print(''.join(str(int(a) & int(b)) for a, b in zip(A, B)))
print(''.join(str(int(a) or int(b)) for a, b in zip(A, B)))
print(''.join(str(int(a) ^ int(b)) for a, b in zip(A, B)))
print(''.join(str(int(not int(a))) for a in A))
print(''.join(str(int(not int(b))) for b in B))