#K84317. Book Availability Checker
Book Availability Checker
Book Availability Checker
You are given a list of books in a library along with the identifiers of the borrowed books. Your task is to determine, for a series of queries, whether each queried book is currently borrowed or available.
The input begins with two integers \(n\) and \(m\), where \(n\) is the total number of books and \(m\) is the number of books that are borrowed. The next line contains \(m\) space-separated integers representing the identifiers of the borrowed books. Then, an integer \(q\) is given, representing the number of queries. The final line contains \(q\) space-separated integers, each representing a book identifier to check.
For each query, output "Borrowed" if the book is currently borrowed, or "Available" otherwise. Each result should be printed on a new line.
inputFormat
The first line of the input contains two integers \(n\) and \(m\) --- the total number of books and the number of borrowed books respectively.
The second line contains \(m\) space-separated integers, which represent the identifiers of the borrowed books. If \(m = 0\), this line will be empty.
The third line contains an integer \(q\), the number of queries.
The fourth line contains \(q\) space-separated integers representing the query identifiers.
outputFormat
For each query, output a single line containing either "Borrowed" if the corresponding book is borrowed, or "Available" if the book is available.
## sample5 2
2 4
3
1 2 5
Available
Borrowed
Available
</p>