#include <iostream>
#include<cstdio>
using namespace std;
//合并排序
const int maxn=1000;
int a[maxn];
void MergeSort(int left,int right)
{
if(left<right)
{
int mid=(left+right)/2;
MergeSort(left,mid);
MergeSort(mid+1,right);
//对序列进行合并
//Merge(left,mid,right);
int *tmp=new int[right-left+1];
int i=left,j=mid+1,k=0;
while(i<=mid&&j<=right)
{
if(a[j]>a[i]) tmp[k++]=a[i++];
else tmp[k++]=a[j++];
}
while(i<=mid)
tmp[k++]=a[i++];
while(j<=right)
tmp[k++]=a[j++];
for(int i=0,j=left;j<=right;j++)
a[j]=tmp[i++];
}
}
/*void Merge(int left,int mid,int riht)
{
int *tmp=new int[right-left+1];
int i=left,j=mid+1,k=0;
while(i<=mid&&j<=right)
{
if(a[j]>a[i]) tmp[k++]=a[i++];
else tmp[k++]=a[j++];
}
while(i<=mid)
tmp[k++]=a[i++];
while(j<=right)
tmp[k++]=a[j++];
for(int i=0,j=left;j<=right;j++)
a[j]=tmp[i++];
}*/
int main()
{
int n;
while(scanf("%d",&n)!=EOF&&n)
{
for(int i=0;i<n;i++)
scanf("%d",&a[i]);
MergeSort(0,n-1);
for(int i=0;i<n;i++)
printf("%d,a[i]);
printf("\n");
}
return 0;
}