407065: GYM102697 036 Speed Limits
Memory Limit:256 MB
Time Limit:1 S
Judge Style:Text Compare
Creator:
Submit:0
Solved:0
Description
036. Speed Limitstime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard output
You are going on a long road trip, and want to know what the maximum speed limit is in each state that you are traveling through.
InputThe first line of input contains a positive integer S, indicating the number of states that are in the database. The next S lines each contain a string representing the name of the state, a space, and an integer representing the maximum speed limit in that state. Names of states will not contain spaces. The next line of input contains a positive integer T indicating the number of test cases that follow. Each test case will consist of a state name.
OutputFor each of the T test cases, output a single integer: the maximum speed limit in the given state, from the database.
ExampleInput6 NewYork 65 Texas 85 Pennsylvania 70 Massachussets 65 Washington 75 Hawaii 60 5 NewYork Pennsylvania NewYork Texas HawaiiOutput
65 70 65 85 60