#K70452. Filter Strings by Minimum Length

    ID: 33311 Type: Default 1000ms 256MiB

Filter Strings by Minimum Length

Filter Strings by Minimum Length

You are given a list of strings and an integer \( n \). Your task is to filter and output only those strings which have a length greater than or equal to \( n \). The order of the strings must be preserved as in the input.

Example:

Input:
3
hello
hi
welcome
5

Output: hello welcome

</p>

If no string meets the length criterion, output nothing.

inputFormat

The input is read from standard input (stdin) in the following format:

  • The first line contains an integer \( m \), the number of strings.
  • The next \( m \) lines each contain a non-empty string.
  • The last line contains an integer \( n \), representing the minimum required length.

outputFormat

Output the strings (each on a new line) that have a length greater than or equal to \( n \), maintaining their original input order. If no string qualifies, do not output anything.

## sample
3
hello
hi
welcome
5
hello

welcome

</p>