#include <bits/stdc++.h>

using namespace std;

bool process(string s1, string s2){
    unordered_set<char> s;

    for(int i = 0; i < s1.size(); i++){
        s.insert(s1[i]);
    }
    for(int i = 0; i < s2.size(); i++){
        if(s.find(s2[i]) != s.end())
            s.erase(s2[i]);
    }
    
    if(s.empty()){
        return true;
    }
    
    return false;
}

int main(){
    string _short = "";
    string _long = "";
    cin >> _short;
    cin >> _long;
    
    bool res = process(_short, _long);
    if(res)
        cout << "true" << endl;
    else
        cout << "false" << endl;
    
    return 0;
}