#include <iostream>
#include <cstring>
using namespace std;
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;
// Parcurgem toate pozițiile din whereToSearch
for (int i = 0; i <= n - m; ++i) {
found = true;
// Verificăm dacă secvența de la i este consecutivă și corespunde cu whatINeed
for (int j = 0; j < m; ++j) {
if (whereToSearch[i + j] != whatINeed[j]) {
found = false;
break;
}
}
// Dacă am găsit secvența consecutivă, afișăm DA și ieșim
if (found) {
cout << "DA";
return 0;
}
}
// Dacă nu am găsit secvența consecutivă, afișăm NU
cout << "NU";
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8Y3N0cmluZz4KdXNpbmcgbmFtZXNwYWNlIHN0ZDsKCmludCBtYWluKCkgewogICAgY2hhciB3aGVyZVRvU2VhcmNoWzEwMF0sIHdoYXRJTmVlZFsxMDBdOwogICAgY2luLmdldGxpbmUod2hlcmVUb1NlYXJjaCwgMTAwKTsKICAgIGNpbi5nZXRsaW5lKHdoYXRJTmVlZCwgMTAwKTsKCiAgICBpbnQgbiA9IHN0cmxlbih3aGVyZVRvU2VhcmNoKTsKICAgIGludCBtID0gc3RybGVuKHdoYXRJTmVlZCk7CiAgICBib29sIGZvdW5kID0gZmFsc2U7CgogICAgLy8gUGFyY3VyZ2VtIHRvYXRlIHBvemnIm2lpbGUgZGluIHdoZXJlVG9TZWFyY2gKICAgIGZvciAoaW50IGkgPSAwOyBpIDw9IG4gLSBtOyArK2kpIHsKICAgICAgICBmb3VuZCA9IHRydWU7CiAgICAgICAgLy8gVmVyaWZpY8SDbSBkYWPEgyBzZWN2ZW7Im2EgZGUgbGEgaSBlc3RlIGNvbnNlY3V0aXbEgyDImWkgY29yZXNwdW5kZSBjdSB3aGF0SU5lZWQKICAgICAgICBmb3IgKGludCBqID0gMDsgaiA8IG07ICsraikgewogICAgICAgICAgICBpZiAod2hlcmVUb1NlYXJjaFtpICsgal0gIT0gd2hhdElOZWVkW2pdKSB7CiAgICAgICAgICAgICAgICBmb3VuZCA9IGZhbHNlOwogICAgICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgLy8gRGFjxIMgYW0gZ8SDc2l0IHNlY3ZlbsibYSBjb25zZWN1dGl2xIMsIGFmaciZxINtIERBIMiZaSBpZciZaW0KICAgICAgICBpZiAoZm91bmQpIHsKICAgICAgICAgICAgY291dCA8PCAiREEiOwogICAgICAgICAgICByZXR1cm4gMDsKICAgICAgICB9CiAgICB9CgogICAgLy8gRGFjxIMgbnUgYW0gZ8SDc2l0IHNlY3ZlbsibYSBjb25zZWN1dGl2xIMsIGFmaciZxINtIE5VCiAgICBjb3V0IDw8ICJOVSI7CiAgICByZXR1cm4gMDsKfQ==