#include<stdio.h>
#include<string.h>
#define M 20000000
#define L 14
int find(char str[L]);
int getChar(char ch);
long long getKey(char str[L]);
int insert(char str[L]);
   
char H[M][L]; 
 
int getChar(char ch){
  if ( ch == 'A') return 1;
  else if ( ch == 'C') return 2;
  else if ( ch == 'G') return 3;
  else return 4;
}
 
/* convert a string into an integer value */
long long getKey(char str[]){
  long long sum = 0, p = 1, i;
  for ( i = 0; i < strlen(str); i++ ){
    sum += p*(getChar(str[i]));
    p *= 5;
  }
  return sum;
}
 
 
int find(char str[L]){
  if(H[getKey(str)][0]=='\0')return 0;
  else return 1;
 
}
 