semeru/Code-Code-CloneDetection-POJ104 huggingface dataset:
int main()
{
    int N,b,e,h;
    int sz[1000];
    int a[1000];
    b=0;
    e=0;
    h=0;
    scanf("%d",&N);
    for(int i=0;i<N;i++)
    {
            scanf("%d",&sz[i]);
            if(sz[i]%2!=0)
            {
                    a[b]=sz[i];
                    b++;
            }
    }
    for(int k=0;k<b;k++)
    {
            for(int g=0;g<b;g++)
            {
                    if(a[g]>a[g+1])
                    {
                                   h=a[g+1];
                                   a[g+1]=a[g];
                                   a[g]=h;
                    }
            }
     }
                    
    for(int x=1;x<=b;x++)
    {
            
            if(x<b)
            printf("%d,",a[x]);
            else
            printf("%d",a[x]);
            e++;
            
     }
return 0;
}
int main()
{
    int n,i,num,counter=0,j;
	int a[500];
	cin>>n;
	for(i=1,counter=0;i<=n;i++,counter++)
	{
		cin>>num;
		if(num%2!=0)
			a[counter]=num;
		else
			counter--;
	}
    for(i=1;i<counter;i++)
	{
		for(j=counter-1;j>=i;j--)
		{
			if(a[j]<a[j-1])
			{
				num=a[j];
				a[j]=a[j-1];
				a[j-1]=num;
			}
		}
	}
    for(i=0;i<counter;i++)
	{
		if(i==0)
			cout<<a[i];
		else
			cout<<","<<a[i];
	}
	return 0;
}
int main(){
	int sz[500],i,n,m,max,e,js[500],j;
	scanf("%d",&n);
	for(i=0,j=0;i<=n-1;i++){
		scanf("%d",&sz[i]);
		if(sz[i]%2==1){
			js[j]=sz[i];
			j++;
	}
	}
	max=0;
	for(m=1;m<=j;m++){
	  for(i=0;i<=(j-m);i++){
	      if(js[i]>js[max]){
			  max=i;
		  }
	  }
		  e=js[j-m];
		  js[j-m]=js[max];
		  js[max]=e;
           if(max==j-m){
                    max=j-m-1;
	  }
         }
	for(i=0;i<j-1;i++){
		printf("%d,",js[i]);
	}
	if(i==j-1){
		printf("%d",js[i]);
	}
	return 0;
}
int main(){
    int n,i,k,f,g;
    scanf("%d",&n);
    int A[n],B[n];
    i=0,k=0;
    while(i<n){
        scanf("%d",&A[i]);
        if(A[i]%2!=0){
            B[k]=A[i];
            k++;
        }
        i++;
    }
    i=0;
    f=0;
    while(f<k){
        i=0;
        while(i<k-f-1){
            if(B[i]>B[i+1]){
                g=B[i+1];
                B[i+1]=B[i];
                B[i]=g;
            }
            i++;
        }
        f++;
    }
    i=0;
    while(i<k-1){
       printf("%d,",B[i]);
       i++;
    }
    printf("%d",B[k-1]);
    return 0;
}
int main()
{
int N;
int sz[500];
scanf("%d",&N);
int i,s=0;
for(i=0;i<N;i++)
{
   scanf("%d",&sz[i]);
}
int jsz[500];
int j=0;
for(i=0;i<N;i++)
{
  if(sz[i]%2!=0)
  s++;
}
for(i=0;i<N;i++)
{
  if(sz[i]%2!=0)
  {
    jsz[j]=sz[i];
    j++;
  }
}
int e,f;
for(f=1;f<=s;f++)
{
  for(i=0;i<s-f;i++)
  {
if(jsz[i]>jsz[i+1])
   {
   e=jsz[i+1];
   jsz[i+1]=jsz[i];
   jsz[i]=e;
   }
   }
}
printf("%d",jsz[0]);
for(i=1;i<s;i++)
{
   printf(",%d",jsz[i]);
}
return 0;
}
int main()
{
	int n , x = 0 ;  // x???????
	cin >> n ;
	int a[n] , k = -1 ;
	for( int i = 0 ; i < n ; i ++ )    // ????????????
	{
		cin >> x ;
		if( x % 2 == 1 )
		{
			k ++ ;
			a[k] = x ;
		}
	}
	int t = 0 ;  // t ?????????
	for( int i = 0 ; i <= k ; i ++ )   // ???????????????
		for( int j = 0 ; j < k - i ; j ++ )
		{
			if( a[j] > a[j+1] )
			{
				t = a[j] ;
				a[j] = a[j+1] ;
				a[j+1] = t ;
			}
		}
	cout << a[0] ;      //??????????a[0]??
	for( int i = 1 ; i <= k ; i ++ )
		cout << "," << a[i] ;
	cout << endl ;  //endl???
    return 0 ;
}
int main()
{
int n,i,j,a,b,c,m[500];
scanf("%d",&n);
for(i=0,j=0;i<n;i++)
{
scanf("%d",&a);
if(a%2!=0)
{
m[j]=a;
j++;
}
}
for(b=j-1;b>0;b--)
{
for(i=0;i<b;i++)
{
if(m[b]<m[i])
{
c=m[b];
m[b]=m[i];
m[i]=c;
}
}
}
printf("%d",m[0]);
for(i=1;i<j;i++)
printf(",%d",m[i]);
return 0;
}
int main ()
{
    int a[1000],n;               //?? 
    int b[1000],m=0;
    int f;
    cin >>n;                     //?? ???? 
    for (int i=1;i<=n;i++)
    {
        cin >>a[i];
        if (a[i]%2==1)
        {
           m++;
           b[m]=a[i];
        }
    }
    for (int i=1;i<=1000;i++)    //?? 
    {
        for (int j=1;j<m;j++)
        {
            if (b[j]>b[j+1])
            {
               f=b[j];
               b[j]=b[j+1];
               b[j+1]=f;
            }
        }
    }
    for (int i=1;i<=m;i++)       //?? 
    {
        cout <<b[i];
        if (i==m)
        break;
        cout <<",";
    }
    return 0;
}
int main(){
	int n,i,j=0,an[500],bn[500],max,l,out;
	char x;
	x=',';
	scanf("%d",&n);
	for(i=0;i<n;i++)
		scanf("%d",&bn[i]);
	for(i=0;i<n;i++){
		if(bn[i]%2==1){
			an[j]=bn[i];
			j++;
		}
	}
	l=j;
    for(i=l-1;i>=0;i--){
		for(j=0;j<i;j++){
			if(an[j]>=an[j+1]){
				max=an[j];
				an[j]=an[j+1];
				an[j+1]=max;
			}
		}
	}
	printf("%d",an[0]);
    out=an[0];
	for(i=0;i<l;i++){
		if(an[i]!=out){
			printf("%c%d",x,an[i]);
			out=an[i];
		}
	}
	return 0;
}
int main(){
int N,a[max],b[max];
int m=0;
int i,j;
scanf("%d",&N);
for(i=0;i<N;i++){
	scanf("%d",&a[i]);
	if(a[i]%2!=0){
		b[m]=a[i];
		m++;
	}
}
int e;
for(int k=1;k<=m;k++){
	for(i=0;i<m-k;i++){
		if(b[i]>b[i+1]){
			e=b[i+1];
			b[i+1]=b[i];
			b[i]=e;
		}
	}
}
for(j=0;j<m;j++){
	if(j==0){
		printf("%d",b[j]);
	}else{
		printf(",%d",b[j]);
	}
}
return 0;
}
int main(){
	int n,k,e;
	int m=0;
    int sc[N];
	int js[N];
    scanf("%d",&n);
    for(int i=0;i<n;i++){
     scanf("%d ",&sc[i]);
	}
    for(int k=0;k<n;k++){
		if(sc[k]%2!=0){
			js[m]=sc[k];
			m++;
			}
     }
    m--;
    for (int d=0;d<m;d++){
		for(int b=0;b<m-d;b++){
	     if(js[b]>js[b+1]){
	             e=js[b+1];
	             js[b+1]=js[b];
	             js[b]=e;
		 }
		}
	}
      for(int u=0;u<m;u++){
              printf("%d,",js[u]);
	  }
	  printf("%d",js[m]);
   return 0;
}
int main()
{
	int N;
	cin>>N;
	int a[500],i;
	for(i=0;i<N;i++)
	{
		cin>>a[i];
	}
	int d,p=0;//d???
	int b[500];//??????
	for(i=0;i<N;i++)
	{
		d=a[i]%2;
		if(d==1)b[p++]=a[i];//??????
	}
	int m,n,x;
	for(m=0;m<p-1;m++)//????
	{
		for(n=0;n<p-1-m;n++)
		{
			if(b[n]>b[n+1])
			{x=b[n];
			 b[n]=b[n+1];
			 b[n+1]=x;
			}
		}
	}
	for(n=0;n<p-1;n++)
	{
		cout<<b[n]<<",";//??
	}cout<<b[p-1];
	getchar();
	getchar();
	return 0;
}
int main()
{
	int N,a[500],b[500],i,j,k,temp,m,n,s;
	scanf("%d\n",&N);
	for(i=0;i<N;i++)
	{
		if(i==0)
			scanf("%d",&a[i]);
		else
			scanf(" %d",&a[i]);
	}
	for(j=0,k=0;j<N;j++)
	{
		if(a[j]%2==1)
		{
			b[k]=a[j];
			k++;
		}
	}
	for(m=1,temp=0;m<k-1;m++)
	{
		for(n=0;n<k-m;n++)
		{
			if(b[n]>b[n+1])
			{
				temp=b[n+1];
				b[n+1]=b[n];
				b[n]=temp;
			}
		}
	}
	for(s=0;s<k;s++)
	{
		if(s==0)
			printf("%d",b[s]);
		else
			printf(",%d",b[s]);
	}
	return 0;
}
int main(void)
{
	int N,a[500],b[500];
	int i,j,j1,t;
	scanf("%d",&N);
	for(i=0;i<N;i++)
		scanf("%d",&a[i]);
	for(i=0,j=0;i<N;i++)
	{
		if(a[i]%2)
		{
			b[j]=a[i];
			j++;
		}
	}
	for(i=0;i<j-1;i++)
		for(j1=0;j1<j-i-1;j1++)
			if(b[j1]>b[j1+1])
				t=b[j1],b[j1]=b[j1+1],b[j1+1]=t;
	for(i=0;i<j;i++)
	{
		printf("%d",b[i]);
	    if(i!=j-1)
			putchar(',');
	}
	putchar('\n');
	return 0;
}
int main (){
	int N;
	scanf("%d",&N);
	int sz[500];
	for(int i=0;i<N;i++){
		scanf("%d",&sz[i]);
	}
	int e;
	int j;
	for(int p=1;p<=N;p++){
	   for(j=0;j<N-p;j++){
	    	if(sz[j]>sz[j+1]){
		    	e=sz[j+1];
			    sz[j+1]=sz[j];
			    sz[j]=e;
			}
	   }
	}
	int js[500];
	int t=0;  
	j=0;
	while(j<N){
		if(sz[j]%2!=0){
			js[t]=sz[j];
		    t++;
		}
		j++;
	}
	for(int q=0;q<t;q++){
		if(q<t-1){
			printf("%d,",js[q]);
		}else{
		    printf("%d",js[q]);
		}
	}
	return 0;
}
int main(){
	int n,i,j,k,x;
	scanf("%d",&n);
	k=1;
	int * a;
	int * b;
	a=(int*)malloc(sizeof(int)*n);
	b=(int*)malloc(sizeof(int)*n);
	for(i=1;i<=n;i++){
		scanf("%d ",&(a[i]));
	}
	for(i=1;i<=n;i++){
		if(a[i]%2!=0){
			b[k]=a[i];
			k++;
		}
	}
	for(i=1;i<=k;i++){
		x=b[i];
		for(j=i-1;j>=0&&b[j]>x;j--)
			b[j+1]=b[j];
		b[j+1]=x;
	}
	for(i=2;i<k;i++){
		printf("%d,",b[i]);
	}
	printf("%d",b[k]);
	free(a);
	free(b);
	return 0;
}
int main(){
	int N,a[500],i,u=0,b[500],j,m=0;
	scanf("%d",&N);
	
	for(i=0;i<N;i++){
		scanf("%d ",&(a[i]));
	}
	
 	for(i=0;i<N;i++){
		if(a[i]%2!=0){
		b[u]=a[i];
        u++;
        }
	}
   
 
    for(i=u-1;i>0;i--){
     for(j=0;j<u-1;j++){
                      if(b[j]>b[j+1]){
                                      m=b[j];
                                      b[j]=b[j+1];
                                      b[j+1]=m;
                                      }
                                      }
                                      }
                                      
     for(i=0;i<u-1;i++){
         printf("%d,",b[i]);
     }
     if(i=u-1){
     printf("%d",b[i]);
                    }   
                     
                            return 0;
                            }
int main()
{
	int n,x = 0;
	cin >> n;
	int a[501];
	int b[501];
	for(int i = 1; i <= n; i++)
		cin >> a[i];
	for(int j = 1,k = 0; j <= n; j++)
	{
		if(a[j] % 2 != 0)
		{
			k++;
			b[k] = a[j];
			x++;
		}
	}
	for(int m = 1; m <= x;m++)
         {
		for(int h = 1; h <= x - m; h++)
		{
			int temp;
		         if(b[h] > b[h + 1])
			{	
			    temp = b[h];
			    b[h] = b[h + 1];
			    b[h + 1] = temp;
			}
		}
	}
	int sign = 0;
	for(int h = 1;h <= x; h++)
	{
		if(sign == 0)
		{
			cout << b[h];
			sign++;
		}
		else
		    cout << "," << b[h];
	}
	return 0;
}
/*
 * ct.c
 *
 *  Created on: 2011-11-24
 *      Author: lin
 */

int mysort(void *a, void *b)
{
	return *(int *)a - *(int *)b;
}

int main()
{
	int in[100];
	int num;
	int tmp;
	scanf("%d", &num);
	int count = 0;
	while(num--)
	{
		scanf("%d",&tmp);
		if(tmp % 2)
		{
			in[count] = tmp;
			++count;
		}
	}
	qsort(in,count,sizeof(int),mysort);
	for(tmp = 0; tmp < count - 1; ++tmp)
	{
		printf("%d,", in[tmp]);
	} 	
	printf("%d", in[count - 1]);
	return 0;

}
int main()

{
	int n,i,j;
	int a[500]={0};
	int b[500]={0};
	void bubble(int a[],int n);
	
	scanf("%d",&n);

	for(i=0;i<n;i++)
	{
		scanf("%d",&a[i]);
	}

	bubble(a,n);
	

	for(i=0,j=0;i<n;i++)
	{
		if(a[i]%2!=0)
		{
			b[j]=a[i];
			j++;
		}
	}
    for(i=0;i<j-1;i++)
	{
	  printf("%d,",b[i]);
	}
	printf("%d",b[j-1]);

	return 0;

}


void bubble(int a[500],int n)//n?????????
{
	int i,temp,j;
	for(j=1;j<n;j++)//???size-1?n-1???????10??????9???
	{
		for(i=0;i<n-j;i++)//?????9-j???
		{
			if(a[i]>a[i+1])//?????????????????
			{
				temp=a[i];
				a[i]=a[i+1];
				a[i+1]=temp;
			}
		}
	}
}
/*
 * ????jishuxulie.cpp
 * ??????
 * ?????2012 11 10
 * ?????????
 */



int main(){
    int n,i,a,j,k,p;
    k=0;
    cin >>n;               //??????n
    int m[n];              //????
    for(i=0;i<n;i++)
    	cin>>m[i];         //??
    for(i=0,p=0;i<n;p++,i++){
    	if (m[p]%2==0){
    		for(j=p;j<n-k;j++)
    			m[j]=m[j+1];
    		p--;
    		k++;           //????
    	}
    }
    for(j=0;j<(n-k);j++)
    	for(i=0;i<(n-k-1-j);i++){
    		if(m[i]>m[i+1]){
    			a=m[i];
    			m[i]=m[i+1];
    			m[i+1]=a;  //??
    		}
    	}
    for (i=0;i<(n-k);i++){
    	if(i==(n-k-1)) cout<<m[i];
    	else cout<<m[i]<<",";   //??
    }
return 0;
}
int main ()
{
	int n,i,j,e,m=0;
	int a[501];
	scanf ("%d\n",&n);
	for (i=0;i<n;i++)
	{
		scanf ("%d",&a[i]);
	}
	for (i=1;i<=n;i++)
	{
		for (j=0;j<n-i;j++)
		{
			if (a[j]>a[j+1])
			{
				e=a[j+1];
				a[j+1]=a[j];
				a[j]=e;
			}
		}
	}
	for (j=0;j<n;j++)
	{
		if (a[j]%2!=0)
		{
		 if (m==0)
		 {
			 printf ("%d",a[j]);
		 }
		 else 
		 {
			 printf (",%d",a[j]);
		 }
		 m++;
		}
	}
			
	
	
	return 0;
}
void paixu(int n,int A[]);
int main(){
	int n=0,i,N;
	int a[500];
	int A[500];
	scanf("%d",&N);
	for(i=0;i<N;i++){
		scanf("%d",&a[i]);
		if(a[i]%2!=0){
			A[n]=a[i];
			n++;
		}
	}
	paixu(n,A);
	for(i=0;i<n-1;i++){
		printf("%d,",A[i]);
	}
	printf("%d",A[n-1]);
	return 0;
}
void paixu(int n,int A[]){
	int i,t,j;
	for(i=0;i<n;i++){
		for(j=n-1;j>=i;j--){
			if(A[j]<A[j-1]){
				t=A[j-1];
				A[j-1]=A[j];
				A[j]=t;
			}
		}
	}
}
/*
 * xiao1.cpp
 *
 *  Created on: 2010-12-24
 *      Author: l
 */

int main(){
	int n;
	cin>>n;
	int a[n];
int j;
for(j=0;j<n;j++)
	cin>>a[j];

	int i,k,s;
	for(i=0;i<n;i++)
		for(j=i+1;j<n;j++)
		if(a[i]>a[j])
		{
			s=a[i];
			a[i]=a[j];
			a[j]=s;
		}
	for(k=0;k<i;k++)
		if((a[k]%2)==1)
		{
	cout<<a[k];
	break;
		}
	for(i=k+1;i<n;i++)
		if((a[i]%2)==1)
			cout<<','<<a[i];
	cout<<endl;

	return 0;
}
int main(){
    int N,a[500],t,i,b[500],p;
    scanf("%d",&N);
    for(i=0;i<N;i++){
    scanf("%d ",&a[i]);
}
for(i=0;i<N;i++){
if(a[i]%2==1){
b[i]=a[i];}
else{b[i]=0;}}
for(i=0;i<N;i++){
for(p=0;p<N-i;p++){
if(b[p]>b[p+1]){
t=b[p+1];
b[p+1]=b[p];
b[p]=t;}}}
for(i=0;i<N;i++){
if(b[i]>0){
printf("%d,",b[i]);}}
printf("%d",b[N]);
return 0;
}
int main()
{
    int n,a,b,j,r,i;
    int sz[500];
    a=0;
    int num[500];
    scanf("%d\n",&n);
    for(i=0;i<n;i++){
        scanf(" %d ",&sz[i]);
        if(sz[i]%2!=0){
            num[a]=sz[i];
            a++;
        }
    }
    for(j=a;j>0;j--){
        for(r=0;r<j;r++){
            if(num[r]>num[r+1]){
                int tmp;
                tmp=num[r+1];
                num[r+1]=num[r];
                num[r]=tmp;
            }
        }
    }
    printf("%d",num[1]);
        for(int i=2;i<a+1;i++){
            printf(",%d",num[i]);
        }
    return 0;
}
int main()
{
	int N, i, temp, m = 0, p, j;
	int a[500] = {0}, b[500] = {0};
	cin >> N;
	for (i = 0; i < N; i++)
	{
		cin >> a[i];
		if (a[i] % 2 != 0) {b[m] = a[i]; m = m + 1;}
	}
	for (i = 0; i < m-1; i++)
	{
		p = i;
		for (j = i + 1; j < m; j++)
			if (b[p] > b[j]) 
			{

				temp = b[p];
				b[p] = b[j];
				b[j] = temp;
			}
	}
	cout << b[0];
	for (i = 1; i < m; i++)
		cout << ',' << b[i];
	return 0;
}
/*
 * 11.161.cpp
 *
 *  Created on: 2012-11-4
 *      Author: ???
 */
int main()
{
	int a[500],b[500];//????????
	int i,k=0,j,m,n,t,c,d;
	cin >>n;
	for(i=0;i<n;i++)
		cin >> a[i];
	for(j=0;j<n;j++)//?a????????b????
	{
		if(a[j]%2==1)
		{
			b[k]=a[j];
			k++;
		}
	}
	for(m=0;m<k-1;m++)//?b?????
		for(c=0;c<k-m-1;c++)
		{
			if(b[c]>b[c+1])
			{
				t=b[c];
				b[c]=b[c+1];
				b[c+1]=t;
			}
		}
	for(d=0;d<k-1;d++)//????

		cout << b[d]<<"," ;

		cout <<b[k-1];

}
int main(){
	int N,sz[500];
	scanf("%d",&N);
	int i,j,e,d;
	d=0;
	for(i=0;i<N;i++){
		scanf("%d",&sz[i]);
	}
	for(j=1;j<=N;j++){
		for(i=0;i<N-j;i++){
			if(sz[i]>sz[i+1]){
				e=sz[i];
				sz[i]=sz[i+1];
				sz[i+1]=e;
			}
		}
	}
	for(i=0;i<N;i++){
		if(sz[i]%2!=0){
			d=i;
			break;
		}
	}
	printf("%d",sz[d]);
	for(i=d+1;i<N;i++){
		if(sz[i]%2!=0){
			printf(",%d",sz[i]);
		}
	}
	return 0;
}
/*
 * jishudanzeng.cpp
 *  Created on: 2012-11-8
 *      Author:??? 1200012899
 */
int main ()
{
	int N;
	cin>>N;//??????????
	int i,a[1000],j,temp,k=0;
	for(i=0;i<N;i++)
	{
		cin>>a[i];//????????
	}
	for(i=0;i<N;i++)
	{
		for(j=0;j<N-i;j++)
			if(a[j]>a[j+1])
			{
				temp=a[j];a[j]=a[j+1];a[j+1]=temp;//???????????a??????????
			}
	}
	for(i=0;i<N;i++)
	{
		if(a[i]%2==1)
		{
			k=k+1;
			if(k!=1)
				cout<<",";//??????
			cout<<a[i];//???????
		}
    }
	return 0;
}
int main(){
	int n;	//??????
	cin>>n;
	int num,i,j;	//num?????i?j?????
	const int t=n;
	int jishu[t];	//????????
	for(i=1,j=0;i<=n;i++){	//????????
		cin>>num;
		if(num%2==1){
			jishu[j]=num;
			j++;
		}
	}
	for(i=j-2;i>0;i--)		//???????????
		for(int k=0;k<=i;k++){
			if(jishu[k]>jishu[k+1]){
				int temp=jishu[k+1];
				jishu[k+1]=jishu[k];
				jishu[k]=temp;
			}
		}
	for(i=0;i<j;i++){		//??
		cout<<jishu[i];
		if(!(i==j-1))
			cout<<',';
	}
	return 0;
}
int main(){
	int N,i,e,h,j,k,m;
	h=0;
	scanf("%d",&N);
	int sz[501],js[501];
	for(i=0;i<N;i++)
	{
		scanf("%d",&sz[i]);
		if(sz[i]%2==1)
		{
			js[h]=sz[i];
			h++;
		};
	}
//printf("%d",h);
    for(e=1;e<=h;e++)
	{
        for(m=0;m<h-1;m++)
		{
			if(js[m]>js[m+1]){
				j=js[m+1];
				js[m+1]=js[m];
				js[m]=j;
			};
		};
	};
	for(k=0;k<h-1;k++){
		printf("%d,",js[k]);
	};
	printf("%d",js[k]);
	return 0;
}
int main(){
 int a[500];
 int b[500];
 int n,i,p=0,r;
    scanf("%d",&n);
    for(i=0;i<n;i++)
	{
       scanf("%d",&a[i]);
       if(a[i]%2==1){
         b[i]=a[i];
	   }else{
	     b[i]=0;
	   }
	}
   for(i=0;i<n;i++)
   {
     if(b[i]>p){
      p=b[i];
	 }
   }
  for(r=1;r<=p-2;r+=2)
  {
    for(i=0;i<n;i++){
     if(b[i]==r){
      printf("%d,",b[i]);
	 }
	}
  } 
  printf("%d",p);
 return 0;
}
int main(){
	int a[500],b[500];
	int n,i,k=0;
	cin>>n;
	for(i=0;i<n;i++)
		cin>>a[i];

	for(i=0;i<n;i++)
		if(a[i]%2==1){       //?????????b
			b[k]=a[i];
			k=k+1;
		}
		int m,t;
			for( i=0;i<k;i++){
										m=i;
										for (int j=i+1;j<k;j++) if(b[j]<b[m]) m=j;//????
										t=b[i];b[i]=b[m];b[m]=t;}
			for(i=0;i<k;i++){
				if(i>0)
					cout<<",";
			     cout<<b[i];                    //????????
			}
			return 0;



	}
int main(){
	int i,j,k,s,maxIndex,N,e,m;
	int sz[500];
	scanf("%d",&N);
	for(i=0;i<N;i++){
			scanf("%d",&(sz[i]));
	}
	for(k=1;k<=N;k++){
		maxIndex=0;
		for(j=0;j<=N-k;j++){
			if(sz[j]>sz[maxIndex]){
					maxIndex = j;
			}
		}
		if(maxIndex !=N-k){
		e=sz[maxIndex];
		sz[maxIndex]=sz[N-k];
		sz[N-k]=e;
		}
	}
	for(s=0;s<N;s++){
		if(sz[s]%2!=0){
			printf("%d",sz[s]);
			break;
		}
	}
	for(m=s+1;m<N;m++){
		if(sz[m]%2!=0){
			printf(",%d",sz[m]);
		}
	}
		return 0;
}
int main()
{
	int n,k=0,i,m,e,l;
	scanf("%d",&n);
	int *sz=(int*)malloc(sizeof(int)*n);
	int *zz=(int*)malloc(sizeof(int)*n);
	for(i=0;i<n;i++){
		scanf("%d",&sz[i]);
		if(sz[i]%2==1){
			zz[k]=sz[i];
			k++;}
	}
	l=k;
	for(m=1;m<=l;m++){
		for(k=0;k<l-m;k++){
			if(zz[k+1]<zz[k]){
				e=zz[k];
				zz[k]=zz[k+1];
				zz[k+1]=e;
			}
	}
}
	for(k=0;k<l-1;k++){
		printf("%d",zz[k]);
		printf(",");
	}
	printf("%d",zz[l-1]);
	free(sz);
	free(zz);
	return 0;
}
int main(int argc, char* argv[])
{
	int n,i,k,m,c;
	scanf("%d",&n);
	int a[500],b[500];
	for(i=0;i<n;i++){
		scanf("%d",&a[i]);
	}
	int j=0;
	for(i=0;i<n;i++){
		if(a[i]%2!=0&&a[i]!=0){
			b[j]=a[i];
			j++;
		}
	}
	for(k=1;k<=j;k++){
		m=0;
		for(i=0;i<=j-k;i++){
			if(b[i]>b[m]){
				m=i;
			}
		}
		if(m!=j-k){
			c=b[m];
			b[m]=b[j-k];
			b[j-k]=c;
		}
	}
    for(k=0;k<j-1;k++){
	   printf("%d,",b[k]);
    }
	printf("%d",b[j-1]);
	return 0;
}
int main()
{
	int n,i,j,t,k=0;
	int a[100],b[100];
	cin>>n;
	for(i=0;i<n;i++)
	{
		cin>>a[i];
	}
	for(j=0;j<n-1;j++)
		for(i=0;i<n-1-j;i++)
		{
			if(a[i]>a[i+1])
			{
				t=a[i];a[i]=a[i+1];a[i+1]=t;
			}
		}
		int p=0;
			for(i=0;i<n;i++)
			{
				if(a[i]%2==1)
				{
					b[p]=a[i];
					p++;
					k++;
				}
			}
			for(p=0;p<k-1;p++)
				cout<<b[p]<<",";
			cout<<b[k-1]<<endl;
		return 0;
}
int main()
{
	int i,j,k,l,m,n,p,q,r,s,temp;
	scanf("%d",&n);
	j=1;
	int a[100];
	for (i=1;i<=n;i++)
	{
		scanf("%d",&k);
		if (k%2==1)
		{
			a[j]=k;
			j++;
		}
	}
	l=j-1;
	for (i=1;i<=l;i++)
	{
		for (j=i;j<=l;j++)
		{
			if (a[i]>=a[j])
			{
				temp=a[i];
				a[i]=a[j];
				a[j]=temp;
			}
		}
	}
	printf("%d",a[1]);
	for (i=2;i<=l;i++)
	{
		printf(",%d",a[i]);
	}	
	return 0;
}
int main()
{
	int i, n, k, c[100], b;
	int j=0, s = 0;
	int a[100];
	scanf("%d", &n);
	for(i = 0; i < n; i++)
	{
		scanf("%d", &c[i]);
		if(!(c[i]%2==0))
		{
			a[s] = c[i];
			s++;
		}

	}
	for(j=0;j<=s;j++)
	{
		for (i=0;i<s-j-1;i++)
		{
			if (a[i]>a[i+1])
				b = a[i], a[i] = a[i+1], a[i+1] = b;
		}
	}
	for(i = 0; i < s; i++)
	{
		if(i != s-1)
			printf("%d,", a[i]);
		else
			printf("%d", a[i]);
	}
	return 0;
}
int main(){
    int N,m,n,i,j,tran;
    scanf("%d",&N);
    int zhengzhengshu[N];
    int jishu[N];
    for(i=0;i<N;i++){
        scanf("%d",&zhengzhengshu[i]);
    }
    for(i=0,j=1;i<N;i++){
        if(zhengzhengshu[i]%2==1){
            jishu[j]=zhengzhengshu[i];
            j=j+1;
        }
    }
    for(m=1;m<j;m++){
        for(n=m;n<j;n++){
            if(jishu[m]>jishu[n]){
                tran=jishu[m];
                jishu[m]=jishu[n];
                jishu[n]=tran;    
            }
        }
    }
    for(m=1;m<j;m++){
        printf("%d",jishu[m]);
        if(m!=j-1){
            printf(",");
        }
        
    }    
    return 0;  
}
int main()
{
	int n,i,k,t,flag=0;
	int a[505]={0};
	scanf("%d",&n);
	for(i=0;i<n;i++)
	{
		scanf("%d",&a[i]);
		if(a[i]%2==0)
		{
			a[i]=0;
		}
	}
	
	
	for(k=n-1;k>0;k--)
	{
		for(i=0;i<k;i++)
		{
			if(a[i]>a[i+1])
			{
				t=a[i];
				a[i]=a[i+1];
				a[i+1]=t;
			}
		}
	}

	
	for(i=0;i<n;i++)
	{
		if(a[i]!=0)
		{
			if(flag==0)
			{
			printf("%d",a[i]);
			flag++;
			}
			else
			{
				printf(",%d",a[i]);
			}
			
		}
	}
	return 0;
}
int main(){
  int u[500],v[500],i,n,j=0,e,m=0,k=0,w=0;
  scanf("%d",&n);
  for(i=0;i<n;i++)
  {
     scanf("%d",&u[i]);
	 if(u[i]%2!=0)
	 {
		 v[j]=u[i];
	     j++;
         w=j;
	 }
  }
  for(k=w-1;k>=0;k--)
  {
      for(i=0;i<k;i++)
	  {
		  if(v[i]>v[i+1])
		  {
            e=v[i+1];
			v[i+1]=v[i];
			v[i]=e;
		  }
	  }
  }
  for(i=0;i<w-1;i++)
  {
          printf("%d,",v[i]);
  }
  printf("%d",v[w-1]);
  return 0;
}
/*
 * pratise.cpp
 *
 *  Created on: 2013-10-29
 *      Author: dyx
 */
int main()
{
	int n;
	cin >> n;
	int i;
	int z[n];
	int a=0;
	for(i=0;i<n;i++)
		cin >>z[i];
	sort(&z[0],&z[n]);
	for(i=0;i<n;i++)
	{
		if(z[i]%2==1)
			if(a==0)
			{
				cout << z[i];
				a++;
			}
			else
				cout << "," << z[i];

	}





}
void main()
{
	int a[500];
	int i,j,n,t,f;
	scanf("%d",&n);
	for(i=0;i<n;i++)
	{
		scanf("%d",&a[i]);
	}
	for(i=0;i<n-1;i++)
	{
		for(j=0;j<n-1-i;j++)
		{
			if(a[i+j]>a[i+j+1])
			{
				t=a[i+j];
				a[i+j]=a[i+j+1];
				a[i+j+1]=t;
			}
		}
	}
	for(i=0,f=0;i<n;i++)
	{
		if(a[i]%2!=0&&f==0)
		{
			printf("%d",a[i]);
			f=1;
		}
		else if(a[i]%2!=0&&f!=0)
		{
			printf(",%d",a[i]);
		}
	}
}
int main(){
    int n,c=0,d=0;
    scanf("%d",&n);
    int a[500],b[500]={0};
    for(int i=0;i<n;i++){
            scanf("%d",&a[i]);
            if(a[i]%2!=0) c=c+1;
            }
            b[-1]=0;
    int i=0;
            for(int j=0;j<n;j++){
                    if(a[j]%2!=0){b[i]=a[j];i=i+1;}
                    }
    for(int k=1;k<=c;k++){
    for(int i=0;i<c-k;i++){
            if(b[i]>b[i+1]){
                            d=b[i+1];
                            b[i+1]=b[i];
                            b[i]=d;
                            }
            }
            }
    for(int i=0;i<c;i++){
            if(i!=c-1)printf("%d,",b[i]);
            else printf("%d",b[i]);
            }
    return 0;        
    }
int main()
{
	int N,a[600],b[600],i,j=1,c=1,t,d;
	scanf("%d",&N);
	for(i=1;i<=N;i++){
		scanf("%d",&a[i]);
	}
	for(i=1;i<=N;i++){
		if(a[i]%2!=0){
			b[j]=a[i];
			j=j+1;
			c=c+1;
		}
	}
	for(j=1;j<c;j++){
		for(t=1;t<c-j;t++){
			if(b[t]>b[t+1]){
			d=b[t];b[t]=b[t+1];b[t+1]=d;
			}
		}
	}
	printf("%d",b[1]);
	for(t=2;t<c;t++){
		printf(",%d",b[t]);
	}
		
	return 0;
}
int main()
{
	int a[502],b[502],N,i,j;
	scanf("%d",&N);
	for(i=1;i<=N;i++){
		scanf("%d",&a[i]);
	}
	j=1;
	for(i=1;i<=N;i++){
		if(a[i]%2!=0){
			b[j]=a[i];
			j++;
		}
	}
	N=j-1;
	for(i=1;i<=N;i++){
		for(j=1;j<N;j++){
			if(b[j]>b[j+1]){
				int temp=b[j];
				b[j]=b[j+1];
				b[j+1]=temp;
			}
		}
	}
	for(i=1;i<=N;i++){
		if(i==1) printf("%d",b[i]);
		else printf(",%d",b[i]);
	}
}
int *data;
 int InitData();
 void Sort(int a[],int n)
 {
     int i,j,k,t;
     for(i=0;i<n;i++){
         k=i;
         for(j=i+1;j<n;j++){
             if(a[j]<a[k]){
                 k=j;
             }
         }
         if(k!=i){
             t=a[k];
             a[k]=a[i];
             a[i]=t;
         }
     }
 }
 void PrintData(int a[],int n){
     int i;
     for(i=0;i<n;i++){
         if(a[i]%2==1&&i>0)
         printf(",%d",a[i]);
     }
 }
 
 int main (){
     int a[10000];
     int i,n;
     scanf("%d",&n);
     for(i=0;i<n;i++){
         scanf("%d",&(a[i]));
     }
     Sort(a,n);
     printf("%d",a[0]);
     PrintData(a,n);
     return 0;
 }
int main()
{
	int sz[501];
	int js[501];
	int n,i,k,a,b;
	k=0;
	scanf("%d",&n);
	for(i=0;i<n;i++)
	{
		scanf("%d",&(sz[i]));
	}
	for(i=0;i<n;i++)
	{
		if(sz[i]%2!=0)
		{
			k=k+1;
			js[k-1]=sz[i];
		}
	}
	for(i=1;i<k;i++)
	{
		a=js[i];
		for(b=i-1;b>=0;b--)
		{
			if(a<js[b])
			{
				js[b+1]=js[b];
				js[b]=a;
			}
			else
			{
				js[b+1]=a;
				break;
			}
		}
	}
	for(i=0;i<k-1;i++)
	{
		printf("%d,",(js[i]));
	}
		printf("%d",(js[k-1]));	
	return 0;
}
int main(){
    int N,i,n,j;
    scanf("%d",&N);
    int sz[N];
    for(i=0;i<N;i++){
    scanf("%d",&sz[i]);}
    int js[N];
    for(i=0,j=0;i<N;i++){
        if(sz[i]%2!=0){
            js[j]=sz[i];
            j++;}
        }
  for(int k=1;k<=j;k++){	
      int e;	
for(int	m=0;m<j-k;m++){	
	 	 if(js[m]> js[m+1]){	
	 	 	 	 e=js[m+1];	
	 	 	 	 js[m+1]=js[m];	
	 	 	 	js[m]=e;	
	 	 }}}
          for(i=0;i<j-1;i++){
           printf("%d,",js[i]);}   
           printf("%d",js[j-1]);
    return 0;
    }