def read_file(in_file):
    """
    Read Intput File

    Args:
        in_file: input file path
    
    Returns:
        days_scan: Number of Days available for scanning
        , book_score_list: List of Book Scores
        , lib_books: List of Book Count with Library as Index
        , lib_supdays: List of Sign-up Period with Library as Index
        , lib_daily_ships: List of Number of Books available shipped daily with Library as Index
        , lib_book_lists: List of Book List with Library as Index
    """
    # Define variables
    books = 0               # = len of book_score_list
    libraries = 0           # = len of lib_* list
    days_scan = 0
    book_score_list = []    # idx is book id
    lib_books = []          # idx is library id
    lib_supdays = []        # idx is library id
    lib_daily_ships = []    # idx is library id
    lib_book_lists = []     # idx is library id

    # Read the file into variables    
    with open(in_file, 'r') as infile:
        # Process lines and save data into variables
        books, libraries, days_scan = [int(x) for x in infile.readline().strip().split(' ')]
        book_score_list = [int(x) for x in infile.readline().strip().split(' ')]
        lib_idx= 0
        while lib_idx < libraries:
            lib_book, lib_supday, lib_daily_ship = [int(x) for x in infile.readline().strip().split(' ')]
            lib_book_list = [int(x) for x in infile.readline().strip().split(' ')]
            lib_books.append(lib_book)
            lib_supdays.append(lib_supday)
            lib_daily_ships.append(lib_daily_ship)
            lib_book_lists.append(lib_book_list)
            lib_idx += 1
    
    return days_scan, book_score_list, lib_books, lib_supdays, lib_daily_ships, lib_book_lists