#思路:遍历检查即可
a=input()
b=input()
for i in a:
    if i not in b:
        print("false")
        exit()
print("true")