#include<bits/stdc++.h>
using namespace std;
map<string, int> m;
int main()
{
	int n;
	scanf("%d",&n);
	while(n--)
	{
		int t;
		int x;
		string y;
		cin >> t >> y;
		if(t == 0)
		{
			scanf("%d",&x);
			m[y] = x;
		}
		else if(t == 1) printf("%d\n",m[y]);
	}
	return 0;
}
