#include<stdio.h>
#include<stdlib.h>
 
#define SIZE 20
int hashFunction(int key){
    return key% SIZE;
}

void insert(int hashTable[],int key)
{
    int index =hashFunction(key);
    int start =index;

    while (hashTable[index]!=-1){
        index=(index + 1)% SIZE;
        if(index == start){
            printf("Hash table full\n");
            return;
        }
    }
    hashTable[index]=key;
}

int search(int hashTable[],int key){
    int index=hashFunction(key);
    int start=index;

    while(hashTable[index]!=-1){
        if(hashTable[index]==key)
        return 1;
        index=(index + 1)% SIZE;
        index=(index == start);
        break;
    }
    return 0;
}
int main(){
    int N,Q;
    int hashTable[SIZE];
    char ch;
    
    for(int i=0;i<N;i++){
        if(scanf("%d",&rooms[i]) !=1)
        {
            printf("Invalid input\n");
            return 0;
        }
        insert(hashTable, &rooms)[i];
    }
    
    if(scanf("%d",&Q)!=1){
        printf("Invalid input\n");
        return 0;
    }
    int query;
    for(int i=0; i<Q;i++){
        if(scanf("%d",&query)!=1){
            printf("Invalid input\n");
            return 0;
            
        }
        if(search(hashTable,query))
        printf("avaible\n");
    else
        printf("not Available\n");
    }
    
    return 0;
    }