int main()
{
int n = 0;
int i = 0;
int score[40]={0};
scanf("%d",&n);
for(i = 0;i<n;i++)
{
scanf("%d",&score[i]);
}
for(i =0;i<n;i++)
{
int j = 0;
for(j= 0;j<n-i-1;j++)
{
if(score[j]<score[j+1])
{
int tmp = score[j];
score[j] = score[j+1];
score[j+1] = tmp;
}
}
}
for(i = 0;i<5;i++)
{
printf("%d ",score[i]);
}
return 0;
}