while True:
try: a,b=str(input()),str(input()) if len(a) > len(b): a,b = b,a flag='true' for i in a: if i not in b: flag='false' print(flag) except: break
while True:
try: a,b=str(input()),str(input()) if len(a) > len(b): a,b = b,a flag='true' for i in a: if i not in b: flag='false' print(flag) except: break