#K61762. Filter Numbers Greater or Equal to Threshold

    ID: 31382 Type: Default 1000ms 256MiB

Filter Numbers Greater or Equal to Threshold

Filter Numbers Greater or Equal to Threshold

You are given a list of integers and an integer threshold T. Your task is to output a new list that contains only the elements from the input list that satisfy the condition \(a_i \ge T\) while preserving the order of appearance.

The input will be provided via standard input. The expected output is printed to standard output. If no numbers satisfy the condition, print an empty line.

Example:

Input:
6
1 2 5 6 3 8
5

Output: 5 6 8

</p>

inputFormat

The input consists of three parts provided via standard input in the following order:

  1. An integer n on the first line indicating the number of elements in the list.
  2. A line containing n space-separated integers representing the list. If n is 0, this line may be empty.
  3. An integer T on the last line representing the threshold.

It is guaranteed that the values will be in valid integer format.

outputFormat

Output the filtered list in a single line, with the numbers separated by a single space. If there are no elements that meet the requirement, output an empty line.

## sample
6
1 2 5 6 3 8
5
5 6 8