#include <iostream>
#include <string>
using namespace std;
int main() {
string a, b;
while (cin >> a >> b) {
if (b.find(a) != -1) {
cout << "true" << endl;
continue;
}
int c[26];
for (int i = 0; i < 26; i++)
c[i] = 0;
for (int i = 0; i < b.length(); i++)
c[b[i] - 'a'] = 1;
bool d = true;
for (int i = 0; i < a.length(); i++)
if (c[a[i] - 'a'] != 1)
d = false;
if (d)
cout << "true" << endl;
else
cout << "false" << endl;
}
}

京公网安备 11010502036488号