import java.util.*;

public class Declarative {
    public static void main(String args[]) {
        List<Integer> list = Arrays.asList(12, 3, 16, 2, 1, 9, 7, 20);
        
        list.stream()
            .filter(e -> e % 2 == 0)
            .forEach(e -> System.out.print(e + " "));
    }
}
