#include <iostream>
#include <cstring>
using namespace std;
int main()
{
char a[31],b[31],aux[31];
int ok=1;
cin>>a>>b;
for(int i=0;i<strlen(a);i++)
if(strchr(b,a[i])==0) ok=0;
else
{
strcpy(aux,strchr(b,a[i])+1);
strcpy(b,aux);
}
if(ok) cout<<"DA";
else cout<<"NU";
return 0;
}
|