Binary Search Tree 1#4146

Binary Search Tree 1

1 second
128 megabytes
Very easy

Implement a balanced binary search tree.

Input

Contains a description of operations on the tree, with the total number of operations not exceeding 10^5. Each line contains one of the following operations:

  • insert — insert key into the tree. If key is already present in the tree, do nothing.

  • delete — remove key from the tree. If key is not present in the tree, do nothing.

  • exists — if key is present in the tree, output "true", otherwise "false".

All numbers are integers and do not exceed 10^9 in absolute value.

Output

Print the results of all exists operations sequentially, following the format provided in the example.

Examples

Example 1

Loading
Loading