#include <iostream>
#include <stdio.h>

using namespace std;

int main()
{
    int t,n[11];
    char a[11][111][1111];
    freopen("recnik.in","r",stdin);    
    freopen("recnik.out","w",stdout);
    scanf("%d",&t);
    for(int i=0;i<t;i++)
    {
       scanf("%d",&n[i]);
       for(int j=0;j<n[i];j++)
          cin>>a[i][j];
       if(n[i]==3)
          printf("nedvosmislen\n");   
       else  
          printf("dvosmislen\n");   
    }
    
    //system("PAUSE");
    return 0;
}
