#include <fstream>
#include <iostream>
using namespace std;
ifstream in("numere.in");
int main()
{
int l1 = 1000000, l2 = 1000000, l3 = 1000000, n;
while (in >> n)
{
if (n < l1)
{
l3 = l2;
l2 = l1;
l1 = n;
}
else if (n < l2)
{
l3 = l2;
l2 = n;
}
else if (n < l3)
{
l3 = n;
}
}
cout << l1 << " " << l2 << " " << l3;
return 0;
}