#D5452. Map: Search
Map: Search
Map: Search
For a dictionary 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 must be unique.
- insert(, ): Insert an element formed by a pair of and to . If there is an element with , replace the corresponding value with .
- get(): Print the value with the specified .
Constraints
- length of
- consits of lower-case letter
- For a get operation, the element with the specified key exists in .
Input
The input is given in the following format.
:
Each query is given by
0
or
1
where the first digits 0, 1 and 2 represent insert and get operations respectively.
Output
For each get operation, print an integer in a line.
Example
Input
7 0 blue 4 0 red 1 0 white 5 1 red 1 blue 0 black 8 1 black
Output
1 4 8
inputFormat
Input
The input is given in the following format.
:
Each query is given by
0
or
1
where the first digits 0, 1 and 2 represent insert and get operations respectively.
outputFormat
Output
For each get operation, print an integer in a line.
Example
Input
7 0 blue 4 0 red 1 0 white 5 1 red 1 blue 0 black 8 1 black
Output
1 4 8
样例
7
0 blue 4
0 red 1
0 white 5
1 red
1 blue
0 black 8
1 black
1
4
8
</p>