#include <iostream>
#include <cstring>
using namespace std;
bool isCharacter(char c[]) {
int n = strlen(c);
for (int i = 0; i < n; ++i) {
if ('A' <= c[i] && 'Z' >= c[i]) {
return true;
}
}
return false;
}
int main() {
char whereToSearch[100], whatINeed[100];
cin.getline(whereToSearch, 100);
cin.getline(whatINeed, 100);
int n = strlen(whereToSearch);
int m = strlen(whatINeed);
bool found = false;
for (int i = 0; i <= n - m; ++i) {
found = true;
if (isCharacter(whereToSearch)) {
return 0;
}
for (int j = 0; j < m; ++j) {
if (whereToSearch[i + j] != whatINeed[j]) {
found = false;
break;
}
}
if (found) {
cout << "DA";
return 0;
}
}
cout << "NU";
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8Y3N0cmluZz4KdXNpbmcgbmFtZXNwYWNlIHN0ZDsKCmJvb2wgaXNDaGFyYWN0ZXIoY2hhciBjW10pIHsKCWludCBuID0gc3RybGVuKGMpOwoJZm9yIChpbnQgaSA9IDA7IGkgPCBuOyArK2kpIHsKCQlpZiAoJ0EnIDw9IGNbaV0gJiYgJ1onID49IGNbaV0pIHsKCQkJcmV0dXJuIHRydWU7CgkJfQoJfQoJcmV0dXJuIGZhbHNlOwp9CgppbnQgbWFpbigpIHsKICAgIGNoYXIgd2hlcmVUb1NlYXJjaFsxMDBdLCB3aGF0SU5lZWRbMTAwXTsKICAgIGNpbi5nZXRsaW5lKHdoZXJlVG9TZWFyY2gsIDEwMCk7CiAgICBjaW4uZ2V0bGluZSh3aGF0SU5lZWQsIDEwMCk7CiAgICBpbnQgbiA9IHN0cmxlbih3aGVyZVRvU2VhcmNoKTsKICAgIGludCBtID0gc3RybGVuKHdoYXRJTmVlZCk7CiAgICBib29sIGZvdW5kID0gZmFsc2U7CiAgICBmb3IgKGludCBpID0gMDsgaSA8PSBuIC0gbTsgKytpKSB7CiAgICAgICAgZm91bmQgPSB0cnVlOwogICAgICAgIGlmIChpc0NoYXJhY3Rlcih3aGVyZVRvU2VhcmNoKSkgewog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