#include <iostream>
#include <cstring>
using namespace std;
bool isCharacter(char c1[], char c2[]) {
int n = strlen(c1);
int m = strlen(c2);
for (int i = 0; i < n; ++i) {
if ('A' <= c1[i] && 'Z' >= c1[i]) {
return true;
}
}
for (int i = 0; i < m; ++i) {
if ('A' <= c2[i] && 'Z' >= c2[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;
if (n == 0 || m == 0) {
return 0;
}
for (int i = 0; i <= n - m; ++i) {
found = true;
if (isCharacter(whereToSearch, whatINeed)) {
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;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8Y3N0cmluZz4KdXNpbmcgbmFtZXNwYWNlIHN0ZDsKCmJvb2wgaXNDaGFyYWN0ZXIoY2hhciBjMVtdLCBjaGFyIGMyW10pIHsKCWludCBuID0gc3RybGVuKGMxKTsKCWludCBtID0gc3RybGVuKGMyKTsKCWZvciAoaW50IGkgPSAwOyBpIDwgbjsgKytpKSB7CgkJaWYgKCdBJyA8PSBjMVtpXSAmJiAnWicgPj0gYzFbaV0pIHsKCQkJcmV0dXJuIHRydWU7CgkJfQoJfQoJZm9yIChpbnQgaSA9IDA7IGkgPCBtOyArK2kpIHsKCQlpZiAoJ0EnIDw9IGMyW2ldICYmICdaJyA+PSBjMltpXSkgewoJCQlyZXR1cm4gdHJ1ZTsKCQl9Cgl9CglyZXR1cm4gZmFsc2U7Cn0KCmludCBtYWluKCkgewogICAgY2hhciB3aGVyZVRvU2VhcmNoWzEwMF0sIHdoYXRJTmVlZFsxMDBdOwogICAgY2luLmdldGxpbmUod2hlcmVUb1NlYXJjaCwgMTAwKTsKICAgIGNpbi5nZXRsaW5lKHdoYXRJTmVlZCwgMTAwKTsKICAgIGludCBuID0gc3RybGVuKHdoZXJlVG9TZWFyY2gpOwogICAgaW50IG0gPSBzdHJsZW4od2hhdElOZWVkKTsKICAgIGJvb2wgZm91bmQgPSBmYWxzZTsKICAgIGlmIChuID09IDAgfHwgbSA9PSAwKSB7CiAgICAJcmV0dXJuIDA7CiAgICB9CiAgICBmb3IgKGludCBpID0gMDsgaSA8PSBuIC0gbTsgKytpKSB7CiAgICAgICAgZm91bmQgPSB0cnVlOwogICAgICAgIGlmIChpc0NoYXJhY3Rlcih3aGVyZVRvU2VhcmNoLCB3aGF0SU5lZWQpKSB7CiAgICAgICAgCXJldHVybiAwOwogICAgCX0KICAgICAgICBmb3IgKGludCBqID0gMDsgaiA8IG07ICsraikgewogICAgICAgICAgICBpZiAod2hlcmVUb1NlYXJjaFtpICsgal0gIT0gd2hhdElOZWVkW2pdKSB7CiAgICAgICAgICAgICAgICBmb3VuZCA9IGZhbHNlOwogICAgICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgaWYgKGZvdW5kKSB7CiAgICAgICAgICAgIGNvdXQgPDwgIkRBIjsKICAgICAgICAgICAgcmV0dXJuIDA7CiAgICAgICAgfQogICAgfQogICAgY291dCA8PCAiTlUiOwogICAgcmV0dXJuIDA7Cn0=