CodeLab Academy 📞 9936 6696
← List Python · Level 7: Lists Code · 70 points ← #665 #667 →

#666. Even first, then odd

First print the even elements, then the odd ones, each in their original order. ### Input The first line has n, the second line has n integers separated by spaces. ### Output One line.

Examples

Input
8
27 5 23 4 5 26 8 22
Output
4 26 8 22 27 5 23 5
Input
8
0 29 9 13 17 15 24 10
Output
0 24 10 29 9 13 17 15

💡 You can solve it with Python, JavaScript or blocks. Read the input line by line with input(). Don't print a question (like input("Number: ")). Print exactly what the output asks for, nothing more.

🔒 You can solve the first 3 problems without an account. Sign up for free to solve this one!