#D3771. Map: Delete

    ID: 3128 Type: Default 2000ms 268MiB

Map: Delete

Map: Delete

For a dictionary MM that stores elements formed by a pair of a string key and an integer value, perform a sequence of the following operations. Note that each key in MM must be unique.

  • insert(keykey, xx): Insert an element formed by a pair of keykey and xx to MM.
  • get(keykey): Print the value with the specified keykey. Print 0 if there is no such element.
  • delete(keykey): Delete the element with the specified keykey.

Constraints

  • 1q200,0001 \leq q \leq 200,000
  • 1x1,000,000,0001 \leq x \leq 1,000,000,000
  • 11 \leq length of keykey 20 \leq 20
  • keykey consits of lower case letters

Input

The input is given in the following format.

qq query1query_1 query2query_2 : queryqquery_q

Each query queryiquery_i is given by

0 keykey xx

or

1 keykey

or

2 keykey

where the first digits 0, 1 and 2 represent insert, get and delete operations respectively.

Output

For each get operation, print an integer in a line.

Example

Input

8 0 blue 4 0 red 1 0 white 5 1 red 1 blue 2 red 1 black 1 red

Output

1 4 0 0

inputFormat

Input

The input is given in the following format.

qq query1query_1 query2query_2 : queryqquery_q

Each query queryiquery_i is given by

0 keykey xx

or

1 keykey

or

2 keykey

where the first digits 0, 1 and 2 represent insert, get and delete operations respectively.

outputFormat

Output

For each get operation, print an integer in a line.

Example

Input

8 0 blue 4 0 red 1 0 white 5 1 red 1 blue 2 red 1 black 1 red

Output

1 4 0 0

样例

8
0 blue 4
0 red 1
0 white 5
1 red
1 blue
2 red
1 black
1 red
1

4 0 0

</p>