#include<iostream>
#include<conio.h>
using namespace std;
class SecondGreaterClass
{
	private :
		double g1, g2;
		int i;
	public :
		double x;
		SecondGreaterClass() //constructor
		{
			g1 = 0;
			g2 = 0;
		}
		void Process()
		{
			for(i = 0; i < 30; i++)
			{
				cin >> x;
				if(x >= g1)
				{
					g2 = g1;
					g1 = x;
				}
				else
					if(x >= g2)
						g2 = x;
			}
		}
		double GetSecond()
		{
			return g2;
		}	
};

int main()
{
	SecondGreaterClass A;
	cout << "Tedade 30 Moadel ra be tartib vared konid : ";
	A.Process();
	cout << "Dovvomin Moadel = " << A.GetSecond() << endl;
}

