How can i make this kind of out put

0
2 // even
1 // odd
4
3
6
5
8