#include <iostream>
#include <string>
#include <unordered_set>
using namespace std;
int main(){
    string shortS,longS;
    bool res;
    while(cin >> shortS >> longS){
        unordered_set<char> set;
        for(char c:longS){
            set.insert(c);
        }
        res=true;
        for(char c:shortS){
            if(!set.count(c)){
                res=false;
                break;
            }
        }
        //boolalpha操纵符改变布尔值格式
        cout << boolalpha << res <<endl;
    }
    return 0;
}