"""
Even Numbers
Given a list of numbers, you want to take out all of the odd ones and leave just the even ones.



Task: 
Evaluate each number in your list to see if it is even or odd. Then, output a new list that only contains the even numbers from your original list.

Input Format: 
A string that includes all of the integer values in your list separated by spaces.

Output Format: 
A string that includes all of the even integer values from your first list separated by spaces.

Sample Input: 
8 10 19 25 5 16 12

Sample Output: 
8 10 16 12

Explanation: 
Your new list would only contain the even numbers (8, 10, 16, and 12) and would not include the odd ones (19, 25, and 5). Note, that both, input and output, are strings.
"""
#user
u = list(map(int,input().split()))
u = list(filter(lambda x: x%2 ==0,u))
u = list(map(str,u))
u = ' '.join(u)
print(u)