#include <bits/stdc++.h>
using namespace std;

int main(){
    string s1,s2;
    
    while(getline(cin, s1)&&getline(cin, s2)){
        string s="true";
        for(int i=0;i<s1.size();++i){
            if(count(s2.begin(),s2.end(), s1[i])==0){
                s="false";
                break;
            }
        }
        cout<<s<<endl;
    }
    return 0;
}