As we know, a router is a network device that can connect different networks, select data transmission paths, and forward data. Xiao Qin has just learned some knowledge about routers in computer networks and wants to implement a small router himself. Of course, since implementing a complete router is too complex, Xiao Qin has lowered his standards: this small router only needs to query the next-hop address based on the destination address, without needing to handle various complex routing rules. For entries that cannot be queried, the packet is simply discarded.
Formally, given $n$ routing rules, each rule consists of two strings: the destination address and the next-hop address. Then, accept $m$ queries, where each query includes a destination address, and output the corresponding next-hop address for that destination address. If no corresponding rule exists, output NULL.
Input
The first line contains two integers, $n$ ($1 \le n \le 10^4$) and $m$ ($1 \le m \le 10^5$), representing the number of routing rules and the number of queries, respectively.
The next $n$ lines each contain two strings in the format "255.255.255.255", representing the destination address and the next-hop address. There is a space between the strings. The strings contain only digits "0" through "9" and the separator ".", and no other characters.
The next $m$ lines each contain a string in the format "255.255.255.255", representing the destination address to be queried.
Output
$m$ lines, each containing a string in the format "255.255.255.255" or "NULL", representing the next-hop address corresponding to the query.
Examples
Input 1
3 4 160.116.151.74 254.27.124.39 248.122.91.212 39.60.211.50 185.23.1.167 177.138.76.178 185.23.1.167 160.116.151.74 63.182.123.188 248.122.91.212
Output 1
177.138.76.178 254.27.124.39 NULL 39.60.211.50