#K63267. Book Recommendation System

    ID: 31716 Type: Default 1000ms 256MiB

Book Recommendation System

Book Recommendation System

You are given a list of book titles and a search query. Your task is to find all books whose titles contain the search query as a substring (case-insensitive). If one or more matches are found, output their titles in alphabetical order; if no match is found, output No match found.

The matching is case-insensitive, i.e. the query "fast" should match "Fast" or "FAST". Use the standard English alphabetical order when sorting.

Note: When presenting formulas, use LaTeX format. In this problem no formulas are required.

inputFormat

The input is read from stdin and follows the format below:

 n
 book_1
 book_2
 ...
 book_n
 query

Here, n is an integer representing the number of books. The following n lines each contain a book title (which may include spaces). The final line contains the search query string.

outputFormat

Print the matching book titles sorted in ascending alphabetical order, each on a separate line. If no book title matches the search query, print a single line with the text No match found.

## sample
4
Harry Potter and the Sorcerer's Stone
The Great Gatsby
To Kill a Mockingbird
Pride and Prejudice
Potter
Harry Potter and the Sorcerer's Stone