import java.util.*;
public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        Set<String> v = new HashSet<>();
        while(true){
            String str = sc.nextLine();
            if(str.equals("end")) return;
            String s0 = str.split(":")[0];
            String s1 = str.split(":")[1];
            if(s0.equals("i")){
                v.add(s1);
                System.out.println("ok");
            }else if(s0.equals("s")){
                if(v.contains(s1)) System.out.println("true");
                else System.out.println("false");
            }else if(s0.equals("d")){
                v.remove(s1);
                System.out.println("ok");
            }
        }
    }
}