#include <iostream>
#include <string>
using namespace std;

int main(){
    string str1;
    string str2;
    int len1,len2;
    int cnt = 0;
    cin >> str1;
    cin >> str2;
    len1 = str1.size();
    len2 = str2.size();

    if(len1 <= len2)
    {
        cnt = 0;
        for(int i = 0; i < len1; i++)
        {
            for(int j = 0; j < len2; j++)
            {
                if(str1[i] == str2[j]){
                    cnt++;
                    break;
                }
            }
        }
        if(cnt == len1){
            cout << "true";
        }
        else
        {
            cout<< "false";
        }
    }
    
}