def check(str1,str2): for i in set(str1): if i not in str2: return 'false' return 'true' str1=input() str2=input() print(check(str1,str2))