#K78047. Product Price Query

    ID: 34999 Type: Default 1000ms 256MiB

Product Price Query

Product Price Query

You are given a list of products with their prices. Your task is to answer multiple queries about the prices of these products. For each query, if the product exists in the list, output its price; otherwise, output Product not found.

The input starts with an integer \(N\) representing the number of products, followed by \(N\) lines each with a product identifier and its associated price. After that, you will be given an integer \(Q\) representing the number of queries, followed by \(Q\) product identifiers. For each query, print the corresponding product price if it exists, or print Product not found if it does not.

inputFormat

The input is provided via stdin in the following format:

  1. The first line contains an integer \(N\), denoting the number of products.
  2. The next \(N\) lines each contain a product identifier (a non-space string) and an integer price separated by a space.
  3. The next line contains an integer \(Q\), denoting the number of queries.
  4. The following \(Q\) lines each contain a product identifier to be queried.

outputFormat

For each query, output a single line with the product's price if it exists; otherwise, output Product not found.

## sample
3
prod1 100
prod2 200
prod3 300
3
prod1
prod4
prod3
100

Product not found 300

</p>