#C14578. Even Index Extraction

    ID: 44242 Type: Default 1000ms 256MiB

Even Index Extraction

Even Index Extraction

You are given a list of integers. Your task is to extract those integers that are at even index positions (i.e. indices where \(i \mod 2 = 0\)) from the list. The list is 0-indexed, meaning the first element is at index 0.

For example, given the list [10, 20, 30, 40, 50, 60], the numbers at even indices are [10, 30, 50].

You need to implement a solution that reads the input from standard input and outputs the result to standard output.

inputFormat

The first line contains an integer \(n\) that represents the number of elements in the list. The second line contains \(n\) integers separated by spaces.

outputFormat

Print the integers from the original list that are at even indices (0-indexed) on a single line, separated by a single space. If the resulting list is empty, print nothing.

## sample
6
10 20 30 40 50 60
10 30 50