public static void main(String[] args)throws IOException{
		int input_lines,size = 0;
		commands cache_call;
		String[] input = new String[3];
		String key,value;
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		input_lines = Integer.parseInt(br.readLine());
		while(input_lines > 0){
			input = br.readLine().split(" ");
			cache_call = commands.valueOf(input[0]);
			switch(cache_call){
			case BOUND: 	size = Integer.parseInt(input[1]);
							bound();
							break;
			case SET:		key = input[1];
							value = input[2];
							if(key.length() < 11 || value.length() < 11)
								set(key,value,size);
							break;
			case GET:		key = input[1];
							get(key);
							break;
			case PEEK:		key = input[1];
							peek(key);
							break;
			case DUMP:		display();
							break;
			}
			input_lines--;
		}
	}