//我想采用冒泡排序升序找出前五个,然后输出就好
#include<stdio.h>
void bubblesort(int arr[], int sz) {
for (int j = 0; j < sz - 1; j++) {
for (int k = 0; k < sz - 1 - j; k++) {
if (arr[k] < arr[k + 1]) {
int t = arr[k];
arr[k] = arr[k + 1];
arr[k + 1] = t;
}
}
}
}
int main() {
int n;
scanf("%d", &n);
int arr[n];
for (int i = 0; i < n; i++) {
scanf("%d ", &arr[i]);
}
//采用冒泡排序
int sz = sizeof(arr) / sizeof(arr[0]);
bubblesort(arr, sz);
for (int k = 0; k < 5; k++) {
printf("%d ", arr[k]);
}
}