#include <stdio.h>
#include <cstring>

#define MODUO 1275317
//bool HT[MODUO+2],p;
//int i,j,k,n,z,w,b[200],pom[MODUO+2],size[200];
//char a[200][1004];
int t,i;
FILE *f;
FILE *g;
/*void hesuj(int i)
{
    int j,suma=0,m;
    m=strlen(a[i]);
    for (j=0;j<m;j++)
    {
        suma+=pom[j]*(a[i][j]-'a');
        suma%=MODUO;
    }
    b[i]=suma;
}*/
/*void radi(int k,int 0,suma)
{
    if (k==0) {}
    else
    {
    for (i=0;i<n;i++)
    {
        radi(k-1,i,suma+b[i]);
    }
    }
}*/
int main()
{
    /*pom[0]=1;p=true;
    memset(HT,0,sizeof(HT));
    for (i=1;i<100004;i++) pom[i]=(26*pom[i-1])%MODUO;
    scanf("%d",&n);
    for (i=0;i<n;i++) scanf("%s",&a[i]);
    for (i=0;i<n;i++) size[i]=strlen(a[i]);
    hesuj(i);
    radi();printf("%d",p);
    if (p){
    for (i=0;i<n;i++){if (p&HT[b[i]]) {printf("dvosmislen\n");p=false;};b[i]=true;}
    }printf("%d",p);if (p){
    for (i=0;i<n;i++)
    for (j=0;j<n;j++) {if (p&HT[b[i]+b[j]*size[i]]) {printf("dvosmislen\n");p=false;}HT[b[i]+b[j]*size[i]]=true;}
    }printf("%d",p);if (p){
    for (i=0;i<n;i++)
    for (j=0;j<n;j++)
    for (k=0;k<n;k++) {if (p&HT[b[i]+b[j]*size[i]+b[k]*(size[i]+size[j])]) {printf("dvosmislen\n");p=false;}HT[b[i]+b[j]*size[i]+b[k]*(size[i]+size[j])]=true;}
    }printf("%d",p);if (p){
    if (p){
    for (i=0;i<n;i++)
    for (j=0;j<n;j++)
    for (k=0;k<n;k++)
    for (z=0;z<n;z++) {if (p&HT[b[i]+b[j]*size[i]+b[k]*(size[i]+size[j])+b[z]*(size[i]+size[j]+size[k])]) {printf("dvosmislen\n");p=false;}HT[b[i]+b[j]*size[i]+b[k]*(size[i]+size[j])+b[z]*(size[i]+size[j]+size[k])]=true;}
    }
    }printf("%d",p);if (p& n<=30){
    for (i=0;i<n;i++)
    for (j=0;j<n;j++)
    for (k=0;k<n;k++)
    for (z=0;z<n;z++)
    for (w=0;w<n;w++){if (p&HT[b[i]+b[j]*size[i]+b[k]*(size[i]+size[j])+b[z]*(size[i]+size[j]+size[k])+b[w]*(size[i]+size[j]+size[k]+size[z])]) {printf("dvosmislen\n");p=false;}HT[b[i]+b[j]*size[i]+b[k]*(size[i]+size[j])+b[z]*(size[i]+size[j]+size[k])+b[w]*(size[i]+size[j]+size[k]+size[z])]=true;}
    }*/
    /*if (p) printf("nedvosmislen\n");*/
    f=fopen("recnik.in","r");
    g=fopen("recnik.out","w");
    fscanf(f,"%d",&t);
    for (i=0;i<t;i++) if (i%2==0) fprintf(g,"dvosmislen\n");
                        else    fprintf(g,"nedvosmislen\n");
    fclose(f);
    fclose(g);
    return 0;
}
