#include<iostream> using namespace std; int main() { char a[20], b[20], *p; cin>>a>>b; if(strlen(a)<strlen(b))p=strstr(b+strlen(b)-strlen(a),a); else p=strstr(a+strlen(a)-strlen(b),b); if(p)cout<<"da"; else cout<<"nu"; system("pause"); return 0; }