#C14593. Filter Strings with Substring
Filter Strings with Substring
Filter Strings with Substring
You are given a target substring and a list of strings. Your task is to select and output all strings from the list that contain the target substring, ignoring case.
Formally, for each string \( s \) in the list and a given target \( T \), output \( s \) if and only if the condition \[ \text{lower}(T) \in \text{lower}(s) \] holds. This problem tests your ability to work with string filtering and case-insensitive comparison.
inputFormat
The input is provided via stdin in the following format:
- The first line contains the target substring (a string).
- The second line contains an integer \( n \) representing the number of strings in the list.
- The following \( n \) lines each contain a non-empty string.
outputFormat
Output all strings (in their original order) that contain the target substring (ignoring case), each on a separate line. If none of the strings match, output nothing.
## sampletest
0