semeru/Code-Code-CloneDetection-POJ104 huggingface dataset:
int main(){
    int a[500];
    int i,k,e,m,n,d;
    scanf("%d",&n);
	for(i=0;i<=n-1;i=i+1)
	scanf("%d ",&a[i]);
	for( k = 1 ; k <= n ; k++){
	for( i = 0; i <n - k; i++){
			if(a[i] > a[i+1]){
					e = a[i+1];
					a[i+1] = a[i];
					a[i] = e;
			}
	}
}

	for(i=0;i<=n-1;i++){
		if(a[i]%2!=0)
			m=i;}
		for(i=0;i<=n-1;i++){
			if((a[i]%2!=0)&&(i<m))
				printf("%d,",a[i]);}
		printf("%d",a[m]);
		return 0;
}
int main()
{
    int n,a[500],b,c;
	cin>>n;
	for(int i=0;i<n;i++)
	{
		cin>>a[i];
	}
	for(int i=0;i<n-1;i++)
	{
		for (int j=i+1;j<n;j++)
		{
			if(a[i]>a[j])
			{
				b=a[i];a[i]=a[j];a[j]=b;
			}
		}
	}
         for(int i=n-1;i>=0;i--)
         {
                  if(a[i]%2!=0){c=i;break;}
         }
	for(int i=0;i<n;i++)
	{
                  if(i==c) {cout<<a[i];break;}
		if (a[i]%2!=0) cout<<a[i]<<",";
	}
	return 0;
}
int main(){
    int n,a,b;
    scanf("%d",&n);
    int sz[n];
    for(int i=0;i<n;i++){
        scanf("%d",&sz[i]);
    }
    for(int k=1;k<=n;k++){
        for(int i=0;i<n-k;i++){
            if(sz[i]>sz[i+1]){
                a=sz[i+1];
                sz[i+1]=sz[i];
                sz[i]=a;
            }
        }
    }
    for(int i=n-1;i>=0;i--){
        if(sz[i]%2!=0){
            b=i;
            break;
        }
    }
    for(int i=0;i<b;i++){
        if(sz[i]%2!=0){
            printf("%d,",sz[i]);
        }
    }
    printf("%d",sz[b]);
    return 0;
}
int max(int a[500],int m,int n)
{
    int i;
    int j=0;
	for(i=n;i<m;i++)
	{
		if(a[i]<a[n])
		{
			j=a[n];
			a[n]=a[i];
			a[i]=j;
		}
	}
	return a[500];
}
int main()
{
	int a[500];
	int b[500];
	int i,j;
	int m,n;
	scanf("%d",&m);
	for(n=0;n<m;n++)
	{
		scanf("%d",&a[n]);
	}
	i=0;
		for(j=0;j<m;j++)
		{
			if(a[j]%2==1)
			{
				b[i]=a[j];
				i++;
			}
		}
		j=0;
		n=0;
		for(j=0;j<i+1;j++)
		{
			max(b,i+1,j);
		}
		for(n=1;n<i;n++)
		{
			printf("%d",b[n]);
			printf(",");
		}
		printf("%d",b[i]);
		return 0;
}
int main()
{
int n,sz[500],js[500],a=0,m;
scanf("%d",&n);
for(int i=0;i<n;i++)
{
scanf("%d",&(sz[i]));
if(sz[i]%2!=0)
{
js[a]=sz[i];
a++;
}	
}		
    int e,k,x;
    for(int k = 1 ; k <=a ; k++){
	for(int x = 0; x< a- k; x++){
			if(js[x] > js[x+1]){
			e = js[x+1];
			js[x+1] = js[x];
			js[x] = e;
		                            }
	                              }
                                  }
for(m=0;m<a-1;m++)
{
printf("%d,",js[m]);
}
printf("%d",js[a-1]);       
return 0;
}
int main(){
    int e,n,k,i,t;
    int sz[500];
	int hz[500];
	t=-1;
    scanf("%d",&n);
	for(i=0;i<n;i++){
		scanf("%d",&hz[i]);
	}
    for(i=0;i<n;i++){
		if(hz[i]%2==1){
			t=t+1;
			sz[t]=hz[i];
		}
	}
for(k=1;k<=t+1;k++){
	for(i=0;i<t-k+1;i++){
			if(sz[i]>sz[i+1]){
					e=sz[i+1];
					sz[i+1]=sz[i];
					sz[i]=e;
			}
	}
}
    for(i=0;i<t+1;i++){
		if(i==t){
			printf("%d",sz[i]);
		}
		else {printf("%d,",sz[i]);}
	}
    return 0;
}
/*
 * OddNumbers.cpp
 *
 *  Created on: 2012-11-5
 *  Author: ??
 *  ??????????N????500???????????????????????????
 */


int main()
{
	int n , x ;          //??????n???x
	int a[550] ;      //?????????
	int k = 0 ,temp , judge = 0 ;        //???????????????
	cin >> n ;        //??????
	for( int i = 0 ; i < n ; i++ )
	{
		cin >> x ;          //?????
		if ( x % 2 == 1 )   //?????
		{
			a[k] = x ;         //????
			k++ ;
		}
	}
	for ( int j1 = 0 ; j1 < k-2 ; j1 ++ )
	{
		for( int j = 0 ; j < k-1-j1 ; j ++ )
		{
			if ( a[j] > a[j+1])
			{
				temp = a[j+1] ;
				a[j+1] = a[j] ;
				a[j] = temp ;          //?????????
			}
		}
	}
	for( int i1 = 0 ; i1 < k ; i1++ )
	{
		if ( judge == 1 )
		{
			cout << "," << a[i1] ;             //??????
		}
		if ( judge == 0 )
		{
			cout << a[0] ;
			judge = 1 ;              //??a[0]????
		}
	}
	cout << endl ;
	return 0 ;                       //??
}
int main(){                  //???
	int n;
	cin>>n;
	int a[n];                //??????
	for(int i=0;i<n;i++)        //????
		cin>>a[i];
	for(int i=0;i<n;i++)              //????
		for(int j=0;j<n-i-1;j++)
			if(a[j]>a[j+1]){
				int t=a[j];
				a[j]=a[j+1];
				a[j+1]=t;
			}
	for(int i=0;i<n;i++)             //????????
		if(a[i]%2==1&&i==0)cout<<a[i];
		else if(a[i]%2==1&&i!=0)cout<<','<<a[i];
	return 0;
}
int main()
{
	int a[500],b[500];
	int n,i,k,t,j=0;
	int min;
	scanf("%d",&n);
	for (i=0;i<n;i++)
	{
		scanf("%d",&a[i]);
		if (a[i]%2!=0)
		{
			b[j]=a[i];
			j++;
		}
	}
	for (i=0;i<j;i++)
	{
		for (k=i;k<j;k++)
		{
			min=b[i];
			if (b[k]<min)
			{
				min=b[k];
				t=b[k];
				b[k]=b[i];
				b[i]=t;
			}
		}
	}
	for (i=0;i<j;i++)
	{
		if (i!=j-1)
		{
			printf("%d,",b[i]);
		}
		else
		{
			printf("%d",b[i]);
		}
	}
	return 0;
}
int main()
{   
	int k;
	int n;
	scanf("%d",&n);
	int flag=0;
	int sz[1000];
    int e;
	int i;
	for(i=0;i<=n-1;i++){
		scanf("%d", &sz[i]);
	   }
    for(int a=1 ; a<=n ; a++){
		for(int i=0; i<n-a; i++){
			if(sz[i]>sz[i+1]){
				e=sz[i+1];
				sz[i+1]=sz[i];
				sz[i]=e;
			}
		}
	}
	
	for(int b=0;b<=n;b++ ){
		if(sz[b]%2!=0){
			
			if(flag==1)
				printf(",%d",sz[b]);
			else
			{
				printf("%d",sz[b]);
				flag=1;
			}
		}
	}
	return 0;
}
int main()
{
	
	int n,i,j,k,a[500],sum=0,b[500];
	scanf("%d",&n);
	for(i=1;i<=n;i++)
	{
		scanf("%d",&a[i-1]);
		if ((a[i-1]%2)!=0)
			{
				sum+=1;
				b[sum-1]=a[i-1];
		}
	}
	for(j=1;j<sum;j++)
		{
			for(i=1;i<sum-j+1;i++)
		{
			if(b[i-1]>b[i])
				{
					k=b[i-1];
					b[i-1]=b[i];
					b[i]=k;
			}}
	}

	for(i=1;i<=sum;i++)
		{
			printf("%d",b[i-1]);
			if(i==sum) break;
			printf(",");
	}
		return 0;
}
int main()
{
	int n,a[501],i,b[501]={'0'},j=0,t,k;
	cin>>n;
	for(i=0;i<n;i++)
	{
		cin>>a[i];
	}
	for(i=0;i<n;i++)
	{
		if(a[i]%2==1)
		{
			b[j]=a[i];
			j++;
		}
	}
	k=j;
	for(i=0;i<k;i++)
	{
		for(j=0;j<k-i-1;j++)
		{
			if(b[j]>b[j+1])
			{
				t=b[j];
				b[j]=b[j+1];
				b[j+1]=t;
			}
		}
	}
	cout<<b[0];
	for(i=1;b[i]!=0;i++)
	{
		cout<<","<<b[i];
	}
	return 0;
}
int main ()
{
int sz[500];
int o[500];
int m,n,i,j=0,b;
scanf("%d\n",&n);
for(i=0;i<n;i++)
{scanf("%d",&sz[i]);}
m=0;
for(i=0;i<n;i++)
{
  if(sz[i]%2!=0)
  {
  o[j]=sz[i];
j=j+1;
m=m+1;
  }
}
for(j=1;j<=m;j++)
{
  for(i=0;i<m-j;i++)
  {
     if(o[i]>o[i+1])
     {
       b=o[i+1];
       o[i+1]=o[i];
       o[i]=b;
     }
   }
}
for(i=0;i<=m-1;i++)
{
if(i!=m-1) printf("%d,",o[i]);
else if(i=m-1) printf("%d",o[m-1]);}
return 0;
}
int main() {
	int N;
	scanf("%d", &N);
	int number[NUMBER];
	int odds[NUMBER];
	int i=0;
	int j=0;
	int k;
	int r;
	while(i<N){
		scanf("%d", &number[i]);
		i++;
	}
	i=0;
	while(i<N){
		if((number[i]%2)!=0){
			odds[j]=number[i];
			j++;
			i++;
		}
		else{
			i++;
		}
	}
	for(k=j-1;k>0;k--){
		for(r=0;r<k;r++){
			if(odds[r]>odds[r+1]){
				int tmp;
				tmp=odds[r+1];
				odds[r+1]=odds[r];
				odds[r]=tmp;
			}
		}
	}
	i=0;
	while(i<j){
		if(i<(j-1)){
			printf("%d,", odds[i]);
			i++;
	}
		else if(i=(j-1)){
			printf("%d", odds[i]);
			i++;
		}
	}


	
	
		return 0;
	}
int main()
{
	int n, i, j, s, p = 0;
	cin >> n;
	int	a[n + 1];
	memset(a, 0, sizeof(a));
	for (i = 1; i <= n; i ++)
	{
		cin >> a[i];
	}
	for (i = 1; i <= n; i ++)
	{
		if (a[i] % 2 == 0)
		{continue;}		
		for (j = i; j <= n; j ++)
		{
			
			if (a[j] % 2 ==0)
			{continue;}
			if (a[i] > a[j])
			{
				s = a[i];
				a[i] = a[j];
				a[j] = s;
			}					
		}
		if (p != 0)
		{cout << ",";}
		cout << a[i];
		p ++;
	}
return 0;
}
/*
 *???: 1.cpp
 *??????
 *????: 2012-11-05
 *??: ???????N????500???????????????????????????
 */


int main ()
{
    int N = 0, num = 0, counter = 0, temp = 0;
    cin >> N;
    int a[N+1];
    for (int i = 1; i <= N; i++)
    {
        cin >> num;
        if (num % 2 != 0)
        {
            counter++;
            a[counter] = num;
        }//?????????
    }
    for (int i = 1; i <= counter; i++)
        for (int j = 1; j <= counter - i; j++)
        {
            if (a[j] > a[j+1])
            {
                temp = a[j+1];
                a[j+1] = a[j];
                a[j] = temp;
            }//????
        }
    for (int i = 1; i <= counter; i++)
    {
        if (i == 1)
            cout << a[i];//????????????
        else
            cout << "," << a[i];
    }//????
    return 0;
}
int main()
{
    int n,c,i,j,k=0,temp,m=0;
    int a[2000],b[2000];
    scanf("%d",&n);
    for(i=0;i<n;i++)
    {scanf("%d",&a[i]);}
     for(m=0;m<n;m++)
  {   if(a[m]%2==0)
     continue;
  else
 {
  b[k]=a[m];
  k++;
}
}
   for(j=k-1;j>=1;j--)
   {
                    for(c=0;c<j;c++)
                    if(b[c]>b[c+1])
                   { temp=b[c+1];
                   b[c+1]=b[c];
                    b[c]=temp;}
                    }            
               printf("%d",b[0]);
                              for(i=1;i<k;i++)
                                {       printf(",%d",b[i])  ;}
                return 0;
      }
int main()
{
    int n,i,k=0,c,d;
    scanf("%d\n",&n);
    int a[n],b[n];
    
    scanf("%d",&a[0]);
    for(i=1;i<n;i++)
    scanf(" %d",&a[i]);
    for(i=0;i<n;i++)
    {
                    if(a[i]%2!=0)
                    {b[k]=a[i];
                    k++;}
                    } 
     for(c=k-1;c>0;c--)
    { for(d=0;d<c;d++)
      { if(b[d]>b[d+1])
        {i=b[d+1];
        b[d+1]=b[d];
        b[d]=i;}
    }
}
printf("%d",b[0]);
for(d=1;d<k;d++)
printf(",%d",b[d]);



return 0;
}
int main()
{
    int num[500];
    int i, j, n, a, temp, m = 0;
    cin >> n;
    for ( i = 1; i <= n; i++ )
    {
        cin >> a;
        if ( a % 2 == 1 )
        {
             m = m + 1;
             num[m] = a;
        }
    }
    for ( i = 1; i < m; i++ )
        for ( j = i + 1; j <= m; j++ )
            if ( num[i] > num[j] )
            {
                 temp = num[i];
                 num[i] = num[j];
                 num[j] = temp;
            }
    cout << num[1];
    for ( i = 2; i <= m; i++ )
        cout << "," << num[i];
    return 0;
}
//============================================================================
// Name        : 1.cpp
// Author      : 
// Version     :
// Copyright   : Your copyright notice
// Description : Hello World in C++, Ansi-style
//============================================================================


int main() {
	int n;
	cin>>n;
	int a[n];                 
	for(int i=0;i<n;i++)
		cin>>a[i];
	int b[n];
	int m=0;
	for(int i=0;i<n;i++)     //?a[n]?????????b[n]
	{
		if(a[i]%2==1)
		{
			b[m]=a[i];
			m++;
		}
	}
	sort(b,b+m);              //?b[n]?????
	cout<<b[0];
	for(int i=1;i<m;i++)      //??b[n]
		cout<<","<<b[i];
	return 0;
}
int main()
{
	int n,i,x,t=0;
	int a[1000]={0};
	scanf("%d",&n);
	for(i=1;i<=n;i++)
	   {scanf("%d",&x);
	    a[x]++;
	   }
	for(i=1;i<=1000;i++)
		if(a[i]!=0&&i%2!=0&&t==0){t++;printf("%d",i);}
		else if(a[i]!=0&&i%2!=0)printf(",%d",i);
	//getchar();
	//getchar();
    return 0;
}
int main(){
	int sz[500];
	int i,n,j,a=0;
    scanf("%d",&n);
	for(i=0;i<n;i++){
		scanf("%d", &(sz[i]));
	}
	for(i=0;i<n;i++){
		if(sz[i]%2==1)
		if(a<sz[i])
			a=sz[i];
	}
	for(j=1;j<a;j+=2){
		for(i=0;i<n;i++){
			if(j==sz[i])
				printf("%d,",j);
		}
    }
	printf("%d",a);
	return 0;
}
int main()
{
	int N,i,k,j=0,m,t,l;
	int a[500];//????
	int b[500];//????
	cin>>N;
	for(i=0;i<N;i++)
	{
		cin>>a[i];
        if(a[i]%2==1)//??
		{
			b[j++]=a[i];
		}
	}
	for(m=0;m<j-1;m++)//????
	{
		for(k=0;k<j-1-m;k++)
		{
			if(b[k]>b[k+1])
			{
				t=b[k];
				b[k]=b[k+1];
				b[k+1]=t;
			}
		}
	}
			for(l=0;l<j-1;l++)
			{
				cout<<b[l]<<",";//??
			}
			cout<<b[j-1]<<endl;
	getchar();
	getchar();
	return 0;
}
//???2010?11?6?
//???1000010586_???
//?????????

int main()
{
	int N , m = 0 , i , j , k , num , t , l;
	int a[10000];
	cin >> N;
	for ( i = 0 ; i <= N - 1 ; i++ )
	{
		cin >> num;
		if ( num % 2 == 1 )
		{
			a[m] = num;
			m++;
		}
	}
	for ( j = 0 ; j <= m - 1 ; j++ )
	{
		for ( k = j + 1 ; k <= m - 1 ; k++ )
		{
			if ( a[j] > a[k] )
			{
				t = a[j]; a[j] = a[k] ; a[k] = t;
			}
			else continue;
		}
	}
	cout << a[0];
	for ( l = 1 ; l <= m - 1 ; l++)
	{
		cout << "," << a[l];
	}
	return 0;
}
int main()
{
	int m,n,i,a[1000],t,count=0;
	scanf("%d",&n);
	for(i=1;i<=n;i++)
	{
		scanf("%d",&t);
		if(t%2==1)
		{
			a[count]=t;
			count++;
		}
	}
	m=count;
	while(count>=2)
	{
		for(i=1;i<=count-1;i++)
		{
			if(a[i-1]>a[i])
			{
				t=a[i-1];
				a[i-1]=a[i];
				a[i]=t;
			}
		}
		count--;
	}
	printf("%d",a[0]);
	for(i=1;i<=m-1;i++)
	{
		printf(",%d",a[i]);
	}
	return 0;
}
int main(){
    int N=0;
    scanf("%d",&N);
    int i=0;
    int zhengzhengshu[501]={0};
    for(i=0;i<N;i++){
        scanf("%d",&zhengzhengshu[i]);
    }
    int jishu[500]={0};
    int j=0,p=0;
    for(j=0,p=0;j<N;j++){
        if(zhengzhengshu[j]%2==1){
            jishu[p]=zhengzhengshu[j];
            p++;
        }
    }
    int temp=0;
    int q=0;
    for(q=0;q<p;q++){
        for(int m=q;m<p;m++){
            if(jishu[q]>jishu[m]){
                temp=jishu[q];
                jishu[q]=jishu[m];
                jishu[m]=temp;
            }
        }
    }
    for(int b=0;b<p-1;b++){
        printf("%d,",jishu[b]);
    }
    int b=p-1;
    printf("%d",jishu[b]);
    return 0;
}
int main()
{
	int a [ 500 ], b [ 500 ];
	int i, j = 0, k, l, temp, n, p;
	cin >> n;
	for ( i = 0; i < n; i ++ )
	{
		cin >> l;
		a [ i ] = l;
		if ( a [ i ] % 2 != 0 )
		{
			b [ j ] = a [ i ];
			j ++;
		}
	}
	for ( p = 0; p < j - 1; p ++ )
	for ( k = 0; k < j - 1 - p; k ++ )
	{
		if ( b [ k ] > b [ k + 1 ] )
		{
			temp = b [ k ]; b [ k ] = b [ k + 1 ]; b [ k + 1 ] = temp; 
		}
	}
	cout << b[0];
	for ( p = 1; p < j; p ++ )
	{
		cout << "," << b[p];
	}
	return 0;
}
//
//  main.cpp
//  11.5homework
//  ??????
//  Created by ??? on 11/5/12.
//  Copyright (c) 2012 airjcy. All rights reserved.
//



void ySwap(int a[],int i,int j)
{
    int t = a[i];
    a[i] = a[j];
    a[j] = t;
}

void yQsort(int a[],int left,int right)
{
    if (left > right) {
        return;
    }
    int key = a[left];
    int i = left;
    int j = right;
    while (i < j) {
        while (i < j && a[j] >= key) {
            j --;
        }
        ySwap(a, i, j);
        while (i < j && a[i] <= key) {
            i ++;
        }
        ySwap(a, i, j);
    }
    yQsort(a, left, i - 1);
    yQsort(a, i + 1, right);
}


int main(int argc, const char * argv[])
{

    int n = 0;
    cin >> n;
    int i = 0,t = 0;
    int a[n]; //???????
    int countOfUnevens = 0;
    for (i = 0; i < n; i  ++) {
        cin >> t;
        if (t % 2 != 0) {
            a[countOfUnevens] = t;
            countOfUnevens ++;
        }
    }
    yQsort(a, 0, countOfUnevens - 1);
    for (i = 0; i < countOfUnevens - 1; i ++) {
        cout << a[i] << ",";
    }
    cout << a[i];
}
int main(){
int N;
int i=0;
int sz[500];
int js[500];
scanf("%d",&N);
for(int m=0;m<N;m++){
   scanf("%d",&(sz[m]));
   if(sz[m]%2!=0){
       js[i]=sz[m];
       i++;
   }
}
for(int n=1;n<=i;n++){
    int e;
    for(int k=0;k<i-n;k++){
    if(js[k]>js[k+1]){
        e=js[k];
        js[k]=js[k+1];
        js[k+1]=e;
    }
    }
}
for(int a=0;a<i;a++){
    if(a<i-1){printf("%d,",js[a]);}
    if(a==i-1){printf("%d",js[a]);}
}
return 0;
}
int main(){
int n,a[500],i,j,s=0,t,x=0;
cin>>n;
for(i=0;i<n;i++)
	cin>>a[i];
for(j=0;j<n;j++){
	if(s==n)
		break;
	if(s==n-1&&a[n-1]%2==0)
		break;
	for(i=s;i<n;i++)
		if(a[i]%2==1){
			a[j]=a[i];
			s=i+1;
			break;
		}
	x++;
}
for(i=0;i<x-1;i++)
	for(j=0;j<x-1-i;j++){
		if(a[j]<a[j+1]){
			t=a[j];
			a[j]=a[j+1];
			a[j+1]=t;
		}
	}
cout<<a[x-1];
for(i=x-2;i>=0;i--)
	cout<<","<<a[i];
return 0;
}
int main(){
    int n,i,k,t;
    int shuzu[500],shushu[500];
    scanf("%d",&n);
    for(i=0;i<n;i++){
                     scanf("%d",&shuzu[i]);
                     if(shuzu[i]%2!=0){
                                       shushu[i]=shuzu[i];
                                       }
                     }
    for(k=1;k<=n;k++){                                
                     for(i=0;i<n-k;i++){	                            
                                        if(shushu[i]>shushu[i+1]){             
                                                                  t=shushu[i+1]; 
                                                                  shushu[i+1]=shushu[i];
                                                                  shushu[i]=t;
                                                                  }   
                                        }   
   }
   for(i=0;i<n;i++){
                    if((shushu[i]!=0)&&(i!=n-1)){
                                     printf("%d,",shushu[i]);
                                     }
                    if(i==n-1){
                               printf("%d",shushu[i]);
                               }
                    }
   return 0;
}
int main(){
	int s[10000],st[10000];
	int N;
	scanf("%d",&N);
	int j=0;
	for(int ii=0;ii<N;ii++){
	scanf("%d",&s[ii]);
	if(s[ii]%2!=0){
	st[j]=s[ii];
	j++;
	}
	}
int e;
for(int k = 1 ; k <= j ; k++){
	for(int i = 0; i < j- k; i++){
			if(st[i] > st[i+1]){
					e = st[i+1];
					st[i+1] = st[i];
					st[i] = e;
			}
	}
}
for(int h=0;h<j-1;h++){
printf("%d,",st[h]);
}
printf("%d",st[j-1]);
return 0;
}
int main()
{
    int n,i,j=0;
    int a[500],b[500];
    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[j]=a[i];
                  j++;
    }
    }
    int k=j;
    int m,t;
    for(m=0;m<k;m++)
    scanf("%d",&b[m]);
    for(m=k-1;m>0;m--)
    {
                for(t=0;t<m;t++)
                {
                int tmp=b[t];
                if(tmp>b[t+1])
                {
                b[t]=b[t+1];
                b[t+1]=tmp;
                }
                }
                }
    for(m=0;m<k;m++)
    {
                 if(m==0)
                 printf("%d",b[0]);
                 else
                 printf(",%d",b[m]);
                 }
                 return 0;
                 }
int main()
{
	int temp,flag=0,q=0,i,j,n,a[N];
	scanf("%d",&n);
	while(n--)
	{
		scanf("%d",&temp);
		if(temp&1)
		a[q++]=temp;
	}
	for(i=q-1;i>0;i--)
	{
		for(j=0;j<i;j++)
		{
			if(a[j]>a[j+1])
			{
				temp=a[j];
				a[j]=a[j+1];
				a[j+1]=temp;
			}
		}
	}
	for(i=0;i<q;i++)
	{
		if(flag==0) flag=1;
		else printf(",");
		printf("%d",a[i]);
	}
}
//
//  main.cpp
//  hw
//
//  Created by ? ? on 12-12-13.
//  Copyright (c) 2012? ? ?. All rights reserved.
//

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

int main()
{
    int n,k,odd[1000]={0},c=0;
    cin>>n;
    for (int i=0; i<n; i++) {
        int num;
        cin>>num;
        if (num%2) {
            odd[c]=num;
            c++;
        }
    }
    qsort(odd, c, sizeof(int), cmp);
    cout<<odd[0];
    for (int i=1; i<c; i++) {
        cout<<","<<odd[i];
    }
    return 0;
}
int main(){
	int (sz[500]),(odd[500]);
	int j,i,n,k,a,e,g;
	scanf("%d",&n);
a=0;
	for(i=0;i<n;i++){
		scanf("%d",&(sz[i]));
		if((sz[i])%2!=0){
			a+=1;
		}
	}
	for(k=1;k<=n;k++){
	for(i=1;i<n;i++){
		if((sz[i])%2!=0){
			g=sz[i-1];
			sz[i-1]=sz[i];
			sz[i]=g;	
			}
		}
	}

	for(k=1;k<=a;k++){
		for(i=0;i<a-1;i++){
			if(sz[i+1]<sz[i]){
				e=sz[i];
				sz[i]=sz[i+1];
				sz[i+1]=e;
			}
		}
	}

for(i=0;i<a;i++){
	if(i<a-1){
		printf("%d,",sz[i]);
	}
	else{printf("%d",sz[i]);}
	}

return 0;

}
int main()
{
	int n[500],m[500];
	int number,i,k,e,p;
	scanf("%d",&number);
	i=0;
	k=0;
	while(i<number)
	{
		scanf("%d",&n[i]);
		if(n[i]%2==1)
		{
			m[k]=n[i];
			k++;
		}
		i++;
	}
	for(i=1;i<=k;i++)
	{
		for(p=0;p<k-i;p++)
		{
			if(m[p]>m[p+1])
			{
				e=m[p+1];
				m[p+1]=m[p];
				m[p]=e;
			}
		}
	}
	for(i=1;i<=k;i++)
	{		
		if(i==1)
		{
			printf("%d",m[i-1]);
		}else
		{
			printf(",%d",m[i-1]);
		}
	}
	return 0;
}
int main()
{
	int a[500]={0},b,i,j,n;
	scanf("%d",&n);
	for(i=0;i<n;i++)
	{
		scanf("%d",&a[i]);
	}
	for(j=0;j<n;j++)
	{
		for(i=0;i<n;i++)
		{
			if(a[i]>a[i+1])
			{
				b=a[i];
				a[i]=a[i+1];
				a[i+1]=b;
			}
		}
	}
    
	for(i=0;i<n;i++)
	{
		if(a[i]%2!=0)
		{
			printf("%d",a[i]);
			break;
		}
	}
i=i+1;
	for(;i<n;i++)
	{
		if(a[i]%2!=0)printf(",%d",a[i]);
	}
	return 0;
}
int main()
{
	int n,i,j,k,oddnum=0;
	int a[MAX];
	int b[MAX];
	int term;
	scanf("%d",&n);
	for(i=0;i<n;i++)
	{
		scanf("%d",&a[i]);
		if((a[i])%2!=0)
		{
			b[i]=a[i];
			oddnum++;
		}
		else
			b[i]=0;
	}
	for(j=1;j<n;j++)
	{
		for(i=0;i<n-j;i++)
		{
			if(b[i]>b[i+1])
			{
				term=b[i];
				b[i]=b[i+1];
				b[i+1]=term;
			}
		}
	}
	printf("%d",b[n-oddnum]);
	for(k=n-oddnum+1;k<n;k++)
		printf(",%d",b[k]);
	return 0;
}
int main()
{
    int n,a[500],i,j=0,m,b[500],t;
	scanf("%d",&n);
	for(i=0;i<n;i++)
	{
		scanf("%d",&a[i]);
		if(a[i]%2!=0)
		{
             b[j]=a[i];
			 j++;
		}
	}
	m=j+1;
    for(j=1;j<m;j++)
		for(i=0;i<m-j;i++)
			if(b[i]>b[i+1])
			{
				t=b[i];
				b[i]=b[i+1];
				b[i+1]=t;
			}
    printf("%d",b[1]);
    for(j=2;j<m;j++)
	    printf(",%d",b[j]);
	return 0;
}
int main(){
int n,sz[N],an[X],j=0,i=0,m=0,a=0,b=0;
scanf("%d",&n);
for(i=0;i<n;i++){
scanf("%d",&(sz[i]));
}
for(m=0;m<n;m++){
if(sz[m]%2==0)
continue;
else{
an[j]=sz[m];
j=j+1;
}
}
for(int k=1;k<=j;k++){
int e;
for(int a=0;a<j-k;a++){
if(an[a]>an[a+1]){
e=an[a+1];
an[a+1]=an[a];
an[a]=e;
}
}
}
for(b=0;b<j-1;b++){
printf("%d,",an[b]);
}
printf("%d",an[j-1]);
return 0;
}
int main(){
	int N, sz[MAX], odd[MAX];
	scanf("%d", &N);
	for(int i = 0; i < N; i++){
		scanf("%d", &sz[i]);
	}
	int remainder, k = 0;
	for(int j = 0; j < N; j++){
		remainder = sz[j] % 2;
		if(remainder != 0){
			odd[k] = sz[j];
			k++;
		}
	}
//find the odd numbers
	int t;
	for(int p = 1; p < k; p++){
		for(int q = 0; q < k-p; q++){
			if( odd[q] > odd[q+1] ){
				t = odd[q];
				odd[q] = odd[q+1];
				odd[q+1] = t;
			}
		}
	}
//arrange the numbers from small to large
	for(int m = 0; m < k; m++){
		if(m == k-1){
			printf("%d", odd[m]);
		}else{
			printf("%d,", odd[m]);
		}
	}
	return 0;
}
/*
 * 1.cpp
 *
 *  Created on: 2010-12-24
 *      Author: 10265
 */
int main()
{
	int n;
	int xulie[501],jishu[501];
	int i,j,k=0;
	cin>>n;
   for(i=0;i<n;i++){
	cin>>xulie[i];
	if(xulie[i]%2==1){
	jishu[k]=xulie[i];
	k++;
	}
   }
	for(i=0;i<k-1;i++){
		for(j=0;j<k-1-i;j++){
			if(jishu[j]>jishu[j+1]){
				int temp=jishu[j];
				jishu[j]=jishu[j+1];
				jishu[j+1]=temp;
			}
		}
	}
	for(i=0;i<k-1;i++)
		cout<<jishu[i]<<",";
	cout<<jishu[k-1]<<endl;
	return 0;
   }
int main(){int sz[4000],az[4000];
int i=0,n,m,h=1,t=0;
scanf("%d",&n);
for(i=0;i<n;i++){scanf("%d",&az[i]);
if((az[i])%2!=0){sz[t]=az[i];t++;}}
for(h=1;h<t;h++){
	i=0;
for(i=0;i<t-h;i++){if(sz[i]>sz[i+1]){m=sz[i+1];
sz[i+1]=sz[i];
sz[i]=m;}}}
i=1;	
	for(i=0;i<t-1;i++){printf("%d,",sz[i]);}printf("%d",sz[t-1]);
	return 0;}
int main()
{
	int n;
	scanf("%d",&n);
          int sz[500];
	for(int i=0;i<n;i++)
          {
	      scanf("%d",&sz[i]);
	}
	int j=0,odd[500];
	for(int i=0;i<n;i++)
          {
	      if(sz[i]%2==1)
                {
		  odd[j]=sz[i];
		  j++;
	      }
	}
          int e;
	for(int k=0;k<j-1;k++)
          {
	      for(int i=0;i<j-k-1;i++)
                {
		  if(odd[i]>odd[i+1])
                     {
			e=odd[i];
			odd[i]=odd[i+1];
			odd[i+1]=e;
		  }
	      }
	}
	for(int i=0;i<j-1;i++)
          {
	      printf("%d,",odd[i]);
	}
	printf("%d",odd[j-1]);
return 0;
}
int main()
{
    int n,a[500],b[500];
    int i,j=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[j]=a[i];
                                   j++;
                                   }
                     }
    sort(b,b+j);
    for(i=0;i<j-1;i++)
    printf("%d,",b[i]);
    printf("%d",b[j-1]);
                     
}
//****************************************************** 
/* ? ? ?   ???????
/* ? ?      ????                           
/* ? ? ? ??2010 ? 11  ? 7   ?     
/* ? ? ? ??????????
/* ? ?      ?1000012752        
*******************************************************/ 
int main()
{
	int n,k;
	int *a;
	scanf("%d",&n);
	a=(int *)malloc(n*sizeof(int));	
    for(k=0 ; k<n ; k++)
	     cin >> a[k];
    
	
	int i,j,temp;
    for(i=0 ; i<n-1 ; i++)									//???n-1?
	{
		for(j=0 ; j<n-1-i ; j++)                             //????????????????????
              if (a[j] > a[j+ 1])							//????a[j],a[j+1]???????????
			  { 
				  temp = a[j] ; 
			      a[j] = a[j+1];
				  a[j+1] = temp;
			  }
    }
	int t=0;	  
	for(i=0 ; i<n ; i++) 
	{
		if(a[i]%2==0)
		continue;
		if(t!=0)
		cout<<",";
		cout<<a[i];
	    t=1;
	}
    return 0;
}