14330 - Book Tracker   

Description

Manage the borrowing status of books in a library. The system will record the borrowing status of each book, including who borrowed the book and its return status. The library can only lend one book at a time, and if a book has already been borrowed, others will not be able to borrow it.

Input

Input multiple lines. Each line contains a borrowing or returning operation, formatted as 'time, name, borrow/return, book'. The operations are recorded in chronological order.

A 'borrow' operation indicates that the person has borrowed a book, while a 'return' operation indicates that the person has returned a book.

Output

Output the borrowing status of each book. ​

  • If the book is currently borrowed, output the borrower's name;
  • if the book is not currently borrowed, output 'In the Library'.

Sample Input  Download

Sample Output  Download

Tags




Discuss