#include<fstream> using namespace std; ifstream fin("date.in"); ofstream fout("date.out"); int n,t[100],g[100]; void citire() { fin>>n; for(int i=1;i<=n;i++) { fin>>t[i]; if(t[i]) { g[i]++; g[t[i]]++; } } } int main() { citire(); int ok=1; for(int i=1;i<=n;i++) if(g[i]>2) ok=0; if(ok) fout<<"da"; else fout<<"nu"; return 0; }