def process_book_file(filename):
    """Returns a dictionary d mapping
    book titles to tuples of book information.
    """

    book_file = open(filename, 'r')
    num_books = int(book_file.readline().strip())
    d = dict()
    for _ in range(num_books):
        title = book_file.readline().strip()
        author = book_file.readline().strip()
        year, pages, rating = book_file.readline().strip().split()
        d[title] = (author, year, pages, rating)

    book_file.close()
    return d


def books_by_author(books, author):
    pass


def best_in_year(books, year):
    pass


def main():
    my_books = process_book_file("books.txt")
    print(my_books)


if __name__ == "__main__":
    main()
