#include <bits/stdc++.h>
using namespace std;
long long a[50],i,n;
int main()
{
cin>>n;
for (i=1; i<=n; i++) cin>>a[i];
for (i=1; i<=n; i++)
if (a[i]%2==0) cout<<a[i]<<" ";
return 0;
}
uses crt;
var A : array [1 .. 50] of integer;
i, n : integer;
begin
clrscr;
write('Nhap so phan tu : '); readln(n);
write('Nhap day gom ', n ,' so : ');
for i := 1 to n do read(A[i]);
write('Cac gia tri chan : ');
for i := 1 to n do
if A[i] mod 2 = 0 then write(A[i], ' ');
readln
end.