#include <stdio.h>
#include <stdint.h>
void find_top_3(uint8_t *arr, uint8_t n) {
// Your logic here
uint8_t count = 3;
// Sort in ascending order
for (int i = 0; i < n - 1; i++) {
for (int j = 0; j < n - i - 1; j++) {
// Compare adjacent elements
if (arr[j] > arr[j + 1]) {
// Swap using a temporary variable
uint8_t temp = arr[j];
arr[j] = arr[j + 1];
arr[j + 1] = temp;
}
}
}
while((n-- > 0) && (count != 0)){
printf("%d ", arr[n]);
count--;
}
}
int main() {
uint8_t n;
scanf("%hhu", &n);
uint8_t arr[100];
for (uint8_t i = 0; i < n; i++) {
scanf("%hhu", &arr[i]);
}
find_top_3(arr, n);
return 0;
}