Search engine
A search engine is designed to quickly locate words within a large text. In this task, you need to implement a variant of a search engine that identifies the line numbers in a given text where all words from a specified set appear.
Input
The first line of the input file contains a sequence of words. The subsequent lines of the file contain the text. A word is composed of characters from the Latin alphabet. Words are separated by non-Latin alphabet characters or line breaks.
Uppercase and lowercase Latin letters are treated as equivalent. The sequence contains no more than 10 words. Each word is at least 1 character long and no more than 30 characters. The text contains no more than 250 lines and no more than 10000 different words. Lines consist of characters with codes ranging from 32 to 255, inclusive. The file size does not exceed 3 MB.
Output
In the output file, print the line numbers of the text that meet the task's condition, in ascending order.