using System;
class Program
{
static int first, second, third;
static void getTop3(int[] arr) {
int len = arr.Length;
if (len < 3) {
return;
}
first = third = second = Int32.MinValue;
for (int i = 0; i < len; i++) {
if (arr[i] > first) {
third = second;
second = first;
first = arr[i];
}
else if (arr[i] > second) {
third = second;
second = arr[i];
}
else if (arr[i] > third)
third = arr[i];
}
}
static void Main() {
int[] arr = new int[] { 12, 98, 80, 50, 88, 35, 70, 60, 97, 85, 89 };
getTop3(arr);
Console.WriteLine(first + " " + second + " " + third);
}
}
/*
run:
98 97 89
*/