#K48937. Filter Even Numbers

    ID: 28531 Type: Default 1000ms 256MiB

Filter Even Numbers

Filter Even Numbers

You are given a list of integers. Your task is to output all the even numbers from the list while preserving their original order. An integer \( n \) is considered even if \( n \mod 2 = 0 \). If there are no even numbers, print an empty line.

inputFormat

The input consists of two lines:
1. The first line contains an integer \( n \), the number of elements in the list.
2. The second line contains \( n \) integers separated by spaces.

outputFormat

Output the even numbers from the list separated by a space. If no even numbers exist, output an empty line.

## sample
6
1 2 3 4 5 6
2 4 6