#include <iostream>
using namespace std;
const int MAXN=10000;
const int M=9001;
int Hash[MAXN];

class AddressList{
    
public:
        AddressList()
{ memset(Hash,-1,sizeof(Hash));}
        
~AddressList(){}
        unsigned ELFHash(
const char *str){
            unsigned Key
=0,x=0;
            
while(*str)
           
{
                Key
=(Key<<4 )+(*str++); //Key值左移4位加上一个字符
                if((x=Key&0xF0000000L)!=0)//判断Key值的高4位是否不为0,因为不为0时需要下面特殊处理,否则上面一步的左移4位会把这高四位给移走,造成信息丢失
               {
                   Key
^=(x>>24);   //把刚才的高4位跟Key的低5-8位异或
                   Key&=~x;            //把高4位清0
                }

            }

            
return  (Key & 0x7FFFFFFF); //另Key值是一个非负数
         }

         
void Search(const char *str){
             
int Key=ELFHash(str);
             
int t=Key%M;
             
while(Hash[t]!=Key&&Hash[t]!=-1)
                 t
=(t+5)%M;
             
if(Hash[t]==-1)
                 Hash[t]
=Key;
             
else
                 cout
<<str<<"'s AddressList is recorded."<<endl;
          }

}
;

int main(){
    AddressList AL;
    
char str[MAXN];
    
int nCase;
    cout
<<"You want input (n?) AddressList."<<endl;
    freopen(
"in.cpp","r",stdin);
    
while(scanf("%d",&nCase)!=EOF)
        
for(gets(str);nCase>0;nCase--)
        
{
            gets(str);
            AL.Search(str);
        }

    
return 0;
}