while True:
try:
a=input()
b=input()
flag=1
for i in a :
if i in b:
pass
else:
flag=0
break
if flag==1:
print('true')
else:
print('false')
except:
break