semeru/Code-Code-CloneDetection-POJ104 huggingface dataset:
//******************************************
//???????????
//??????
//?????2010.11.19
//??????????????
//******************************************
int main ()
{
	int a[500];//????????
	int N, i, j, temp, m, n;//???????????i,j?m, n,????temp
	cin >> N;
	for (i = 0; i < N; i++)
		cin >> a[i];//????
	for (i = 0; i < N -1; i++)
		for (j = 0;j < N - i- 1;j++)
			if (a[j] > a[j+1])
			{
				temp = a[j];
				a[j] = a[j+1];
				a[j+1] = temp;
			}//??????????
	for (m = 0; m < N; m++)
	{
		if ( (a[m] % 2 ) != 0)
		{
			cout << a[m];
			break;
		}//?????????
	}
	for (n = m + 1; n < N; n++)
	{
		if ( (a[n] % 2 )!= 0)
			cout << "," << a[n];
	}//???????????
	cout << endl;
	return 0;
}
int main(){
    int n,i,j,k,e;
    
    int a[500],b[500];
    scanf("%d",&n);
    for(i=0;i<n;i++)
    {
                    scanf("%d",&a[i]);
    }
    j=0;
    for(i=0;i<n;i++)
    {
                    if(!(a[i]%2==0))
                    {
                                 b[j]=a[i];
                                 j++;
                    }
    }   
    
    for(i=0;i<j;i++)
    {
                    for(k=i;k<j;k++)
                    {
                                    if(b[k]<b[i])
                                    {
                                                 e=b[k];
                                                 b[k]=b[i];
                                                 b[i]=e;
                                    }
                    }
    }
    printf("%d",b[0]);
    for(i=1;i<j;i++)
    {
                    printf(",%d",b[i]);
    }
    
    return 0;
}
int main()
{
	int N;
	int a[500],b[500];
	cin>>N;//??????N
	for(int i=0;i<N;i++)
		cin>>a[i];//?N??????a[500]
	int t=0;
	for(int j=0;j<N;j++)
	{
		if(a[j]%2!=0)
		{
			t++;
			b[t]=a[j];
			
		}
	}//?????????b[500]?
	int p,q,w;
	for(q=1;q<t-1;q++)
	{
		for(p=1;p<t+1-q;p++)
		{
			if(b[p]>b[p+1])
			{
				w=b[p];
				b[p]=b[p+1];
				b[p+1]=w;
			}
		}
	}//?????????????
	for(int l=1;l<t;l++)
		cout<<b[l]<<",";
	cout<<b[t];//????
	return 0;
}
int main()
{ 
    int sz[500];
	int N,i,j,k,m,n;
	int 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!=0){
		a=a+1;
	}
	}
		for(j=N-1;j>=0;j--){
			for(k=0;k<j;k++){
				if(sz[k]>sz[k+1]){
		int t;
		t=sz[k+1];
		sz[k+1]=sz[k];
		sz[k]=t;
				}
		}
	}
	m=0;
	for(n=0;n<N;n++){
		if(sz[n] % 2 != 0 )
		{
			m++;
			if( m < a )
			   printf("%d,",sz[n]);
			else
			{
				printf("%d",sz[n]);
				break;
			}
		}
	}
	
	return 0;
}
int main()
{
    int N=0,i=0,k=0,j=0;//N?????N  k????? i j??????? 
    cin>>N;
    int s[N];
     for(i=0;i<=N-1;i++)
     {
     cin>>s[i];                   
     }
     for(i=0;i<=N-1;i++)
     {
       if(s[i]%2!=0)
       {s[k]=s[i];k++;}
                      
     }
        for(i=0;i<=k;i++)
        {
             for(j=i;j<=k-i-1;j++)
             {
                 if(s[j-1]>s[j])
                 {
                 s[j-1]=s[j-1]^s[j];
                 s[j]=s[j]^s[j-1];
                 s[j-1]=s[j-1]^s[j];              
                 }                   
             }                   
        }
for(i=0;i<=k-1;i++)
{
if(i==0)
cout<<s[i];
if(i!=0)
cout<<","<<s[i];                   
}
   
return 0;    
}
int main(){
	int s,i,sz[100],n,e,z,k,l;
	scanf("%d",&n);
    for(l=0;l<n;l++){
	   scanf("%d",&sz[l]);
      if(sz[l]%2==0){
		   sz[l]=0;
	}}
	
	for(s=1;s<=n;s++){
	  for( i = 0; i < n - s; i++){
		  if(sz[i] > sz[i+1]){
					e = sz[i+1];
					sz[i+1] = sz[i];
					sz[i] = e;
			}
	}}
     for(z=0;z<n-1;z++){
		 if(sz[z]!=0){
		 printf("%d,",sz[z]);
	 }}printf("%d",sz[n-1]);
     return 0;
	}
int main()
{
    int n,i,k,j,l,t,tem;
    int a[500],b[500];
    scanf("%d\n",&n);
    for(i=0;i<n;i++)
    {
		scanf("%d",&a[i]);
		scanf(" ");
	}
	for(j=0,i=0;i<n;i++)
	{
		l=a[i]%2;
		if(l!=0&&a[i]!=0)
		{
			b[j]=a[i];
		    j++;
		}
	}
	for(k=0;k<j;k++)
	{
		for(t=0;t<j-k;t++)
		{
			if(b[t]>b[t+1])
			{
				tem=b[t];
				b[t]=b[t+1];
				b[t+1]=tem;
			}
		}
	}
	for(i=1;i<=j;i++)
	{
		printf("%d",b[i]);
		if(i<=j-1)
		printf(",");
	}
}
void sort(int a[],int n)
{
	int i,j,k;
	for(i=0;i<n;i++){
		for(j=0;j<n-i-1;j++){
			if(a[j]>a[j+1]){
				k=a[j];
				a[j]=a[j+1];
				a[j+1]=k;
			}
                }
        }
}
int main()
{
int i,n,j,m;
int sz[500],js[500];
scanf("%d",&n);
for(i=0;i<n;i++){
	scanf("%d",&sz[i]);}
for(i=0,j=0;i<n;i++){
	if(sz[i]%2!=0){
	js[j]=sz[i];
	j++;
	}
}
for(i=n-1;;i--){
	if(sz[i]%2!=0){
	m=sz[i];
	break;
	}
}
for(i=0,j=1;;i++){
	if(js[i]!=m){
	j++;}
	else{break;}
}
sort(js,j);
for(i=0;i<j-1;i++){
	printf("%d,",js[i]);}
printf("%d",js[j-1]);
return 0;
}
int main()
{
	int N,s=0,x;
	cin>>N;
	int a[N],b[N];
	for(int i=0;i<N;i++)
		cin>>a[i];
	for(int i=0;i<N;i++)
		{
		if(a[i]%2)
			{
			s=s+1;
			b[s]=a[i];
			}


		}
	for(int i=1;i<s;i++)
		for(int j=1;j<=s-i;j++)
		{
			if(b[j]>b[j+1])
			{
				x=b[j];
				b[j]=b[j+1];
				b[j+1]=x;
			}
		}
	for(int i=1;i<=s;i++)
	{
		if(i-1)
			cout<<",";
		cout<<b[i];
	}

	return 0;
}
int main()//???
{
	int N,a ,b[501],c[501],j=0,i;//????
	cin>>N;//??N
	for( i=1;i<=N;i++)//????
	{
		cin>>b[i];
	}
	for( i=1;i<=N;i++)//??????
	{
		if(b[i]%2!=0)
		{
			j++;
			c[j]=b[i];
		}

	}
	int t=0;
	for( i=1;i<=j;i++)//????
		for(int m=1;m<=j-1;m++)
		{
			if(c[m]>c[m+1])
			{
				t=c[m];
				c[m]=c[m+1];
				c[m+1]=t;
			}
		}
		for( i=1;i<=j;i++)//??
		{
			if(i==1)
			    cout<<c[1];
			else
				cout<<","<<c[i];
		}
		return 0;//??
}
int main()
{
	int n,i,e,j;
	int k=0;
	scanf("%d",&n);
	int *sz=(int*)malloc(sizeof(int)*n);
	int sf[500];
	for(i=0;i<n;i++)
	{
		scanf("%d",&sz[i]);
	}
	for(i=0;i<n;i++)
	{
		if(sz[i]%2!=0)
		{
			sf[k]=sz[i];
			k++;
		}
	}
	for(j=1;j<k;j++)
	{
		for(i=0;i<k-j;i++)
		{
			if(sf[i]<sf[i+1])
			{
				e=sf[i];
				sf[i]=sf[i+1];
				sf[i+1]=e;
			}
		}
	}
	for(i=k-1;i>=0;i--)
	{
		if(i>0)
		{
			printf("%d,",sf[i]);
		}
		if(i==0)
		{
			printf("%d",sf[i]);
		}
	}
	return 0;
}
int main()
{
int n,k,i,m,c;
int num[500];
int nu[500];
scanf("%d",&n);
for(i=0;i<n;i++){
	scanf("%d",&num[i]);
}
k=0;
i=0;
while(i<n){
	if(num[i]%2!=0){
		nu[k]=num[i];
		k++;
	}
	i++;
}
k=k-1;
for(i=0;i<=k;i++){
	for(m=0;m<=k-i;m++){
		if(nu[m]>=nu[k-i]){
			c=nu[m];
			nu[m]=nu[k-i];
            nu[k-i]=c;
		}
	}
}
for(i=k;i>0;i--){
	printf("%d,",nu[k-i]);
}
printf("%d",nu[k]);
	return 0;
}
/*
 * s.cpp
 *
 *  Created on: 2013-11-3
 *      Author: shu
 */
int main(){
	int N;
	cin>>N;
	int i,a[N];
	for(i=0;i<N;i++)
		cin>>a[i];
	sort(a,a+N);
	for(i=0;i<N;i++){
	if(a[i]%2!=0)cout<<a[i];
	break;}
	for(i=i+1;i<N;i++)
		if(a[i]%2!=0)
			cout<<","<<a[i];
	return 0;
}
void main()
{
	int n,a[500],b[500],i,j=0,t,k;
	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=j+1;
		}
	}
	t=j;
	for(j=0;j<t-1;j++)
		for(i=0;i<t-1-j;i++)
			if(b[i]>b[i+1])
			{k=b[i];
			b[i]=b[i+1];
			b[i+1]=k;
			}
	for(j=0;j<t;j++)
	{
		if(j==0)
		printf("%d",b[j]);
		else printf(",%d",b[j]);
	}
}
/*
 * odd numbers.cpp
 *
 *  Created on: 2013-10-30
 *      Author: kongwei
 */
int main()
{
	int N;
	cin>>N;
	int array[N];           //????
	for(int i=0;i<=N-1;i++) //????
		cin>>array[i];
	int g=0;                //????????????????
	int odd[N];          //?????????????
	for(int i=0;i<=N-1;i++)
	{
		if(array[i]%2==1)
		{
			g+=1;           //??array[i]?2???????????????
			odd[g]=array[i];//??????????
		}
	}
	for(int i=1;i<=g-1;i++)     //??????????
		for(int j=1;j<=g-i;j++)
		{
			int t=0;             //??????
			if(odd[j]>odd[j+1])
			{
				t=odd[j];
				odd[j]=odd[j+1];
				odd[j+1]=t;
			}
		}
	for(int i=1;i<=g;i++)//??????????
	{
		if(i==1)
			cout<<odd[i];
		else
			cout<<","<<odd[i];//?????????
	}

	return 0;
}
/*
 * 1.cpp
 *
 *  Created on: 2012-11-3
 *      Author: AK
 */
int main(){
	int a[510];                     //????
	int n,x,i=0,j;
	cin>>n;                         //?????
	for(;n>=1;n--){
		cin>>x;
		if(x%2==1) {a[i]=x;i++;}    //??????????
	}
	for(x=1;x<=i-1;x++)             //??????????
		for(j=i-1;j>=x;j--)
		{
			if(a[j]<a[j-1]){n=a[j-1];a[j-1]=a[j];a[j]=n;}
		}
	cout<<a[0];                    //??
	for(j=1;j<=i-1;j++){
		cout<<','<<a[j];
	}
	return 0;
}
int main(){
		int n,i,j,k=0,e,a[500];
		scanf("%d",&n);
		for(i=0;i<n;i++){
			scanf("%d",&a[i]);
		}
		for(i=0;i<n;i++){
			if(a[i]%2==0){
				a[i]=0;
			}
		}
		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(i=0;i<n-1;i++){
            if(a[i]!=0){
			printf("%d,",a[i]);
			}
		}
		printf("%d",a[n-1]);
		return 0;
}
void bubble_sort(int a[],int n)
{
	int i,j,t;
	for (j=n-1;j>0;j--){
		for(i=0;i<j;i++){
			if(a[i]>a[i+1]){
				t=a[i];
				a[i]=a[i+1];
				a[i+1]=t;
			}
		}
	}
}

int main()
{
	int n,i;
	int a[MAX];
	scanf("%d",&n);
	for(i=0;i<n;i++){
		scanf("%d",&a[i]);
	}
	bubble_sort(a,n);
	int p=0;
	for(i=0;i<n;i++){
		if(a[i]%2!=0){
			if(p==0){
				printf("%d",a[i]);
				p=1;
			}
			else{
				printf(",%d",a[i]);
			}
		}
	}
	return 0;
}
int main()
{
	int n,a[500],i,j,b[500];
	cin >>n;
	for(i=0;i<n;i++)
		cin >>a[i];
	j=0;
	for(i=0;i<n;i++)
	{
		if(a[i]%2!=0)
		{
			b[j]=a[i];
			j=j+1;
		}
	}
	n=j;
	for(i=0;i<n;i++)
		for(j=0;j<n-i-1;j++)
		{
			if(b[j]>b[j+1])
			{
				a[0]=b[j];
				b[j]=b[j+1];
				b[j+1]=a[0];
			}
		}
	for(j=0;j<n;j++)
	{
		if(j==0)
			cout<<b[j];
		else
			cout<<","<<b[j];
	}
	return 0;
}
int main()

{
	int a[500],b[500],i,k,e,N;

	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(k=1;k<=N;k++)
	{	
	   for(i=0;i<N-1;i++)
	   {
	    	if(b[i]>=b[i+1])
			{
		    	e=b[i+1];
			    b[i+1]=b[i];
			    b[i]=e;
			}
	   }
	}
	for(i=0;i<N;i++)
	{
		if(b[i]!=0&&i!=N-1)
		{
			printf("%d,",b[i]);
		}
		if(b[i]!=0&&i==N-1)
		{
			printf("%d",b[N-1]);
		}
	}


	return 0;
}
void bubble(int a[],int n)
{
	int tmp, i, j;
	for (i = n - 1; i >= 0;i--)
	for (j = 0; j < i; j++)
	if (a[j] > a[j + 1])
	{
		tmp = a[j];
		a[j] = a[j + 1];
		a[j + 1] = tmp;
	}
}
int main()
{
	int n, a[500],i,b[500],j=0;
	scanf("%d", &n);
	for (i = 0; i <= n - 1; i++)
	{
		scanf("%d", &a[i]);
		if (a[i] % 2 != 0){ b[j] = a[i]; j += 1; }
	}
	bubble(b, j);
	printf("%d", b[0]);
	for (i = 1; i < j; i++)
	{
		printf(",%d", b[i]);
	}
	printf("\n");
	return 0;
}
int main(){
	int m,n,i,j,k,q;
	int a[10000],b[10000];
	scanf("%d",&n);
	for(i=0;i<n;i++)
		scanf("%d",&a[i]);
	j=0;k=0;
	scanf("%d",&k);
	for(i=0;i<n;i++){
		if(a[i]%2==1){
			b[j]=a[i];
			k++;
			j++;
		}
	}
			
	
	for(i=0;i<k;i++){
for(j=0;j<k-1;j++){
			if(b[j]>b[j+1]){
				q=b[j];
				b[j]=b[j+1];
				b[j+1]=q;
			}
		}
	}
	for(i=0;i<k-1;i++){
		printf("%d",b[i]);
		printf(",");
	}
printf("%d\n",b[k-1]);
return 0;
}
int main(int argc, char* argv[])
{
	int a[1000];
	int s[1000];
	int n,k=0,i;
	scanf("%d",&n);
	for(i=0;i<n;i++){
		scanf("%d",&(a[i]));
	}
     for(i=0;i<n;i++){
		 if(a[i]%2!=0){
			 s[k]=a[i];
			 k++;
		 }
	 }
	for(int m=1;m<=k;m++){
		for(int i=0;i<k-m;i++){
			if(s[i]>s[i+1]){
				int t=s[i+1];
				s[i+1]=s[i];
				s[i]=t;
			}
		}
	}
	for(i=0;i<k;i++){
		if(i==0){
		printf("%d",s[i]);
		}
		else 
			printf(",%d",s[i]);
	}
	return 0;
}
int main (){
int n,a[500],b[500],t=0,q=0,e,i,k;
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[t]=a[i];
		t++;
	}
}

for (k=1;k<=t;k++){
	q=0;
	for (i=0;i<=t-k;i++){
		if (b[i]>b[q]){
			q=i;
		}
	}
	e=b[q];
	b[q]=b[t-k];
	b[t-k]=e;
}
printf("%d",b[0]);
for (k=1;k<=t-1;k++){
	printf(",%d",b[k]);
}
	

	return 0;
}
int main ()
{
  int n,m,i,j,k,g,t,v=0;
  int a[555],b[555];
  scanf("%d",&n);
  for(i=0;i<n;i++)
  {
  scanf("%d",&a[i]);
  if(a[i]%2!=0)
   b[i]=a[i];
  else 
   b[i]=0;
  }
  for(j=0;j<n;j++)
  {t=0;
  for(k=n-1;k>j;k--)
  {
  if(b[k]>b[k-1])
  { t=b[k-1];
  b[k-1]=b[k];
  b[k]=t;}
  }

  }
 for(g=n;g>=0;g--)
 {
 if(b[g]>0)
 {if(v==1)
 { printf(",");}
   printf("%d",b[g]);v=1;
 
 }
 }
 return 0;
 }
int main()
{
	int N,i,e;
	int m=1;
	int xh[100000];
	scanf("%d\n",&N);
	for(i=1;i<=N;i++){
		scanf("%d",&xh[i]);
	}
	int ch[5000];
	for(i=1;i<=N;i++){
		if(xh[i]%2==1){
			ch[m]=xh[i];
			m++;
		}
	}
	for(int k=1;k<=m-1;k++){
		for(i=k;i<=m-1;i++){
			if(ch[i+1]>ch[k]){
				e=ch[k];
				ch[k]=ch[i+1];
				ch[i+1]=e;
		}
		}
	}
	for(i=m-1;i>=2;i--){
	printf("%d,",ch[i]);
	}
printf("%d",ch[1]);
	return 0;
}
int main(){
    int i,k,e,n,m,a[MAX],b[MAX];
    scanf("%d\n",&n);
    for(i=0;i<n;i++){
        scanf("%d",&a[i]);
    }
    m=0;
    for(i=0;i<n;i++){
        if((a[i])%2!=0){b[m]=a[i];m++;}
        else{b[m]=b[m];}
    }
    m=m-1;
    for(k=1;k<=m+1;k++){
    for(i=0;i<m+1-k;i++){
        if(b[i]>b[i+1]){
            e=b[i+1];
            b[i+1]=b[i];
            b[i]=e;
        }
    }
    }for(i=0;i<m;i=i+1){
    printf("%d,",b[i]);
}printf("%d",b[m]);
}
int main()
{
	int i,j,N,a[500]={0},mid,m;
	scanf("%d\n",&N);
	for(i=0;i<N;i++)
		scanf("%d",&a[i]);
	for(j=1;j<N;j++){
		for(i=0;i<N-j;i++){
			if(a[i]>a[i+1]){
				mid=a[i+1];
				a[i+1]=a[i];
				a[i]=mid;
			}
		}
	}
	for(i=0;i<N;i++){
		if(a[i]%2!=0){
			printf("%d",a[i]);
			m=i;
			break;}
		else continue;
	}
	for(i=m+1;i<N;i++){
		if(a[i]%2!=0){
			printf(",%d",a[i]);}
		else continue;
	}
	return 0;
}
int main()
{
	int maxlndex,e,i,k,n,t=0;
	int sz[500];
    scanf("%d",&n);
	for(i=0;i<n;i++)
	{
		scanf("%d",&sz[i]);
	}
    for(k=1;k<n+1; k++){
	maxlndex=0;
	for(i=0;i<n-k+1;i++)
	{
        if(sz[i]>sz[maxlndex])
		{
			maxlndex=i;
		}
	}

	if(maxlndex!=n-k)
	{
		e=sz[maxlndex];
		sz[maxlndex]=sz[n-k];
		sz[n-k]=e;
	}
	}
	for(i=0;i<n;i++)
	{
		if(sz[i]%2!=0)
		{
			t=i;
		}
	}
	for(i=0;i<n;i++)
	{
		if(sz[i]%2!=0)
		{if(i!=t)
		{printf("%d,",sz[i]);
		}else		{
			printf("%d",sz[i]);
		}
		}
	}
	return 0;
}
/*
hw.cpp
????yang?
?????????
???11.3
*/
int main()
{
	int n,a[500],s=0,x;
	cin>>n;
	for(int i=1;i<=n;i++)
	{
		cin>>x;
		if(x%2==1)
		{
			a[s]=x;
			s++;
		}
	}//???????????????a[]????s??
	for(int i=0;i<s-1;i++)
	{
		for(int j=i+1;j<s;j++)
		{
			if(i<j&&a[i]>a[j])
			{
				int swi=a[i];
				a[i]=a[j];
				a[j]=swi;
			}
		}
	}//?a[]??
	cout<<a[0];
	for(int i=1;i<s;i++)
	{
		cout<<","<<a[i];
	}//?????
	return 0;
}
int main()
{
	int i,n,a[500],b[500],k=0,j,t;
	scanf("%d",&n);
	for(i=0;i<n;i++)
	{
		scanf("%d",&a[i]);
		if(a[i]%2==1)
		{
			b[k]=a[i];
			k++;
		}
	}
	for(i=0;i<k-1;i++)
		for(j=0;j<k-1;j++)
		{
			if(b[j]>b[j+1])
			{
				t=b[j];
				b[j]=b[j+1];
				b[j+1]=t;
			}
		}
	for(i=0;;i++)
	{
		printf("%d",b[i]);
		if(i<k-1)
			printf(",");
		else
			break;
	}
	return 0;
}
int main()
{
	int a[501]={0},m,j,n,i,t,b[501]={0};
	scanf("%d",&n);
	for(i=0,j=0;i<n;i++)
	{  scanf("%d",&a[i]);
	   if(a[i]%2!=0) 
	   {
	   b[j]=a[i];}
	   if(b[j]!=0) 
	   {j=j+1;}
	   
		}
	for(i=0;i<j;i++)
	{ for(m=0;(m+1)<j-i;m++)
	  { if(b[m]>b[m+1]) 
	     { t=b[m];
	       b[m]=b[m+1];
	       b[m+1]=t;
	       
				}
			}
		}
		printf("%d",b[0]);
		for(i=1;i<j;i++)
		{printf(",%d",b[i]);}
	return(0);
 
}
// ?????? ???1000010500 
// ?????? 

int main()
{
    int i,j,temp,a[500],N,m;
    cin >> N;
    for (i = 0;i < N;i ++)              // ???? 
        cin >> a[i];
    for (i = 0,j = 0,m = N;j < N;j++)   // ???? 
        if (a[j] % 2 != 0)
            a[i ++] = a[j];
        else
            m --;
    for (i = 0;i < m - 1;i ++)          // ????? 
        for (j = 0;j < m - i - 1;j ++) 
            if (a[j] > a[j + 1])
            {
                 temp = a[j];
                 a[j] = a[j + 1];
                 a[j + 1] = temp;
            }
    cout << a[0];                       // ????? 
    for (i = 1;i < m;i ++)
        cout << ',' << a[i];
    return 0;
}
int main()
{
  int e;
 int k=0;
 int n;
 int b[500];
 int a[500];
 scanf("%d",&n);
 for(int i=0;i<n;i++){
     scanf(" %d",&a[i]);
 }
  for(int i=0;i<n;i++){
     if(a[i]%2!=0){
       b[k]=a[i];
       k++;
     }
  }
  for(int c=1;c<=k;c++){
     for(int g=0;g<k-c;g++){
        if(b[g]>b[g+1]){
           e=b[g+1];
           b[g+1]=b[g];
           b[g]=e;
        }
     }
  }
  printf("%d",b[0]);
for(int g=1;g<k;g++){
  printf(",%d",b[g]);
}
return 0;
}
int main()
{
    int n,t,num=-1,a[500];
    scanf("%d",&n);
    for (int i=1;i<=n;i++)
    {
        scanf("%d",&t);
        if (t%2==1){num++;a[num]=t;}// choose odd number 
    }
    sort(a,a+num+1);//sort the numbers
    printf("%d",a[0]);
    for (int i=1;i<=num;i++) printf(",%d",a[i]);// print 

    return 0;
}
int main(){
int sz[500];
int e,k,i,m,n,x,a,sum=0;
scanf("%d",&m);
for(n=1;n<=m;n++){
	scanf("%d",&a);
	if(a%2!=0){
		sum+=1;
		sz[sum-1]=a;
	}
}
for(k =1;k<=sum;k++){
	for(i=0;i<sum-k;i++){
			if(sz[i]>sz[i+1]){
					e=sz[i+1];
					sz[i+1]=sz[i];
					sz[i]=e;
			}
	}
}
for(x=1;x<=sum-1;x++){
	printf("%d,",sz[x-1]);
}
printf("%d",sz[sum-1]);
    return 0;
}
int main()
{
    int n,i,j,t,s=0;
    int a[1000];
    scanf("%d",&n);
    for(i=0;i<n;i++){
                     scanf("%d",&t);
                     if(t%2==1){
                                a[s]=t;
                                s++;
                                }
                     }
    for(i=1;i<s;i++){
                       for(j=0;j<s-i;j++){
                                          if(a[j]>a[j+1]){
                                                        int t=a[j];
                                                        a[j]=a[j+1];
                                                        a[j+1]=t;
                                                        }
                                                        }
                                                        }
    for(i=0;i<s-1;i++)
    printf("%d,",a[i]);
    printf("%d",a[s-1]); 
    return 0;
    }
int main (){
	
	int n,i,a[500],b[500],j=0,l,k;
	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++;
		}
	}
	for(i=0;i<j;i++)
	{
        for(l=i;l<j;l++)
		{
            if(b[l]<=b[i])
			{
                 k=b[i];
				 b[i]=b[l];
				 b[l]=k;
			}
		}
	}
	for(i=0;i<j;i++)
	{
		if(i!=j-1)
		{
		    printf("%d,",b[i]);
		}
		else
		{
			printf("%d\n",b[i]);
		}
	}
	




	return 0;
}
int main()
{
	int a[100],b[100];//a???????b???????
	int n;//n??a?????
	int count=0,temp;//count??b??????temp?????????
	cin >> n;
	for(int i=0;i<n;i++)
	{
		cin >> a[i];
		if(a[i]%2)
			b[count++]=a[i];//???a?????b
	}
	for(int i=0;i<count;i++)//?b?????
		for(int j=count-1;j>i;j--)
			if(b[j-1]>b[j])
			{
				temp=b[j-1];
				b[j-1]=b[j];
				b[j]=temp;
			}
	for(int i=0;i<count;i++){//????????????????','
		if(i)
			cout << ',';
		cout<<b[i];
	}
	cout << endl;
	return 0;
}
/*
 *???? increasingodd.cpp
 *??????
 *????: 2012-11-10
 *?????????????
 */
int main() {
	int N, i, j = 0, k, x;
	int inum[510] = { 0 }, numb[255] = { 0 };//inum????????numb????
	cin >> N;
	for (i = 0; i < N; i++)
		cin >> inum[i];//???????
	for (i = 0; i < N; i++)
		if (inum[i] % 2 != 0) {
			numb[j] = inum[i];
			j = j + 1;
		} // ??????????????????
	for (i = 0; i < j - 1; i++)
		for (k = 0; k < j - 1 - i; k++)
			if (numb[k] > numb[k + 1]) {
				x = numb[k];
				numb[k] = numb[k + 1];
				numb[k + 1] = x;
			} // ??????????
	cout << numb[0];
	for (i = 1; i < j; i++)
		cout << "," << numb[i];// ??????
	return 0;
}
main()
{
    int a[500]={0},b[500]={0},n,i,e=0,j,k;
    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[e]=a[i];
            e++;
        }
    }
    for (i=0;i<e;i++)
    {
        for (j=0;j<e-1;j++)
        {
            if (b[j]>b[j+1])
            {
                k=b[j+1];
                b[j+1]=b[j];
                b[j]=k;
            }
        }
    }
    for (i=0;i<e-1;i++)
    {
        printf("%d,",b[i]);
    }
    printf("%d",b[e-1]);
}
int main()
{
	int n,i,a[1000],t,s=0,j;
	scanf("%d",&n);
	for(i=0;i<n;i++)
	{
		scanf("%d",&a[i]);
	}
	for(i=0;i<n;i++)
		for(j=i+1;j<n;j++)
		{if(a[j]<a[i]){t=a[j];a[j]=a[i];a[i]=t;}}
	for(i=0;i<n;i++)
	{
		if(a[i]%2==1)
		{
			if(s==0)
			{s=1;printf("%d",a[i]);}
			else
				printf(",%d",a[i]);
		}
	}
	return 0;
}
int main()
{
	int i, j, n, a, temp, k = 1, num[501] = {0};
	cin >> n;
	for (i = 1; i <= n; i++)
	{
		cin >> a;
		if (a % 2 == 1)
		{
			for (j = 1; j < k; j++)
			{
				if (a == num[k])
					break;
			}
			if (j == k)
			{
				num[k] = a;
				k++;
			}
		}
	}
	k -= 1;
	for (i = 0; i <= k - 1; i++)
	{
		for (j = 1; j <= k - i - 1; j++)
		{
			if(num[j] > num[j + 1])
			{
				temp = num[j + 1];
				num[j + 1] = num[j];
				num[j] = temp;
			}
		}
	}
	for (i = 1; i < k; i++)
		cout << num[i] << ",";
	cout << num[k];
	return 0;
}
int main()
{
 //k?????????,m???????????,t????????
 int N,k=0,m,t;

 //a?????????
 int a[500];

 cin>>N;
 for(int i=0;i<N;i++)
 {
  cin>>m;
  if(m%2)               //??????????
  {
   a[k]=m;
   k++;
  }
 }

 for(int i=0;i<k-1;i++)         //????
  for(int j=0;j<k-1-i;j++)
  {
   if(a[j]>a[j+1])
    {t=a[j];a[j]=a[j+1];a[j+1]=t;}
  }

 cout<<a[0];                   //??
 for(int i=1;i<k;i++)
 {cout<<','<<a[i];}
 return 0;
}
int main()
{
	int a[500],b[500],i,r=0,p,N,m=0,temp;
	scanf("%d",&N);
	for(i=0;i<N;i++)
	{
		scanf("%d",&a[i]);
		p=a[i]%2;
		if(p==1)
		{
			b[r]=a[i];
			r++;
		}
	}
	for(m=1;m<r;m++)
		for(i=0;i<r-m;i++)
		{
			if(b[i]>b[i+1])
			{
				temp=b[i];
				b[i]=b[i+1];
				b[i+1]=temp;
			}
		}
	printf("%d",b[0]);
	for(i=1;i<r;i++)
		printf(",%d",b[i]);
	printf("\n");
	return 0;
}
int main(){
    int N,k=0,i,j,m;
    int sz[500],js[500];
    scanf("%d",&N);
    for(i=0;i<N-1;i++){
       scanf("%d ",&sz[i]);
    }
    scanf("%d",&sz[N-1]);
    for(i=0;i<N;i++){
       if(sz[i]%2!=0){
           js[k]=sz[i];
           k++;
       }
    }
    for(j=0;j<k;j++){
       for(i=0;i<k-j-1;i++){
           if(js[i]>js[i+1]){
              m=js[i];
              js[i]=js[i+1];
              js[i+1]=m;
           }
       } 
    }
    for(i=0;i<k-1;i++){
        printf("%d,",js[i]);
    }
    printf("%d",js[k-1]);
    return 0;
}
int main()
{ 
  int n,i;
  int a[501];
  int b[501];
  int j=0;
  int maxIndex, e;


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

  for(int k = 1 ; k<=j; k++)
  {
     maxIndex = 0;
     for(i = 0; i <=j-k; i++)
	 {
        if(b[i] > b[maxIndex])
		{
           maxIndex = i;
		}
	 }
     if(maxIndex != j-k)
	 {
        e = b[maxIndex];
        b[maxIndex] = b[j-k];
        b[j-k] = e;
	 }
  }
  
  for(i=0;i<j-1;i++)
  {
	  printf("%d,",b[i]);
  }
  printf("%d",b[j-1]);





  return 0;
}
int main()
{
    int i,N,k,j,m,x;
    scanf("%d",&N);
    int a[N];
    k=0;
    for(i=1;i<=N;i++)
    {
                     scanf("%d",&a[i]);
    }
    for(i=1;i<=N;i++)
    {
                     if(a[i]%2!=0)
                     {
                                  k++;
                     }
    }
    int b[k];
    x=0;
    for(i=1;i<=N;i++)
    {
                     if(a[i]>x)
                     {
                               x=a[i];
                     }
    }
    for(j=1;j<=k;j++)
    {
                     b[j]=x;
    }                              
    for(i=1;i<=N;i++)
    {
                     if(a[i]%2!=0&&a[i]<b[1])
                     {
                                             b[1]=a[i];
                     }
    }
    for(j=2;j<=k;j++)
    {
                     for(i=1;i<=N;i++)
                     {
                                      if(a[i]%2!=0&&a[i]>b[j-1]&&a[i]<b[j])
                                      {
                                                                           b[j]=a[i];
                                      }
                     }
    }
    for(j=1;j<k;j++)
    {
                    printf("%d,",b[j]);
    }
    printf("%d",b[k]);
    return 0;
}
int main()
{
	int a[500]={0},b[500]={0};
	int n,i,k,j,c;
	scanf("%d",&n);
	for(i=0,k=0;i<=(n-1);i++)
	{
		scanf("%d",&a[i]);
		if(a[i]%2!=0)
		{
			b[k]=a[i];
			k++;
		}
	}
	for(i=0;i<=(k-1);i++)
	{
		for(j=0;j<=(k-1-i);j++)
		{
			if(b[j]<b[j+1])
			{
				c=b[j];
				b[j]=b[j+1];
				b[j+1]=c;
			}
		}
	}
	for(i=(k-1);i>=0;i--)
	{
		if(i==(k-1))
			printf("%d",b[i]);
		else
			printf(",%d",b[i]);
	}
}