eolymp
bolt
Try our new interface for solving problems
Problems

Book 1

Book 1

Implement a structure Book.

struct Book
{
  int  book_id;
  char title[50];
  char author[50];
  char subject[50];
};

Input

The first line contains the number of records n (n100). n records follow, each field is specified on a separate line. Then follows the number of queries q (q100). Each request contains book_id of the book.

Output

For each query print the title and the author of the book as shown in the example. If no such book exists, print "Book not found".

Time limit 1 second
Memory limit 128 MiB
Input example #1
4

234 
C_Programming
Nuha Ali
C Programming Tutorial

12
Telecom Billing
Zara Ali
Telecom Billing Tutorial

7865
Effective Java
Joshua Bloch
Java Programming

4321
Design Patterns
Elisabeth Freeman
Java Programming

3
12
13
4321
Output example #1
Telecom Billing by Zara Ali
Book not found
Design Patterns by Elisabeth Freeman
Author Mykhailo Medvediev