while True:
try:
n = input().strip()
m = input().strip()
d = 0
for i in n:
if i in m:
d += 1
if d == len(n):
print('true')
else:
print('false')
except:
break