#C7943. Case-Insensitive Prefix Filter
Case-Insensitive Prefix Filter
Case-Insensitive Prefix Filter
You are given an array of strings and a prefix string. Your task is to filter the array and return only those strings that start with the given prefix. The filtering should be case-insensitive.
The input will consist of an integer n representing the number of strings, followed by n lines each containing a string, and finally a line containing the prefix. Your program should output the matching strings, each on a new line, in the order they appear in the input.
Note: If no string matches the given prefix, output nothing.
Example:
Input: 5 apple apricot banana Berry apex ap</p>Output: apple apricot apex
inputFormat
The first line contains an integer n — the number of strings. The next n lines each contain one string. The last line contains the prefix string to filter by.
outputFormat
Output the strings that start with the given prefix (ignoring case). Each matching string should be printed on a separate line. If no strings match, print nothing.
## sample5
apple
apricot
banana
Berry
apex
ap
apple
apricot
apex
</p>