#include<stdio.h>
int main()
{
int a[10]={9,6,8,7,0,3,2,4,5,1};
int i=0,j=9;
int tmp;
while(i!=j)
{
while(j>i && a[j]%2==0)
j--;
while(j>i && a[i]%2==1)
i++;
tmp=a[j];
a[j]=a[i];
a[i]=tmp;
}
for( int k=0;k<10;k++)
printf("%d ",a[k]);
}