#include <iostream>
using namespace std;
int main ( )
{
 long long  x , y , z;
 cin >> x >> y >>z;
 if (x > y > z)
   
   {
     cout << z << "\n" << y << "\n" << x << "\n" << "\n" << x << "\n" << y  << "\n" <<z;  
   } 
 
  else if (x > z > y)
   
   {
     cout << y << "\n" << z << "\n" << x << "\n" << "\n" << x << "\n" << y  << "\n" <<z;  
   }   
    else if (y > z > x)
   
   {
     cout <<  x << "\n" << z << "\n" << y << "\n" << "\n" << x  << "\n" << y << "\n" <<z;  
   }   
else if (y > x > z)
   
   {
     cout << z << "\n" << x << "\n" << y << "\n" << "\n" << "\n" << x  << "\n" << y << "\n" <<z;  
   }   
 
else if (z > y > x)
   
   {
     cout << x << "\n " << y  << "\n"<< z << "\n" << "\n" << x << "\n" << y << "\n" <<z;  
   }   
 
else if (z > x > y)
   
   {
     cout << y << "\n" << x  << "\n" << z << "\n" << "\n" << x << "\n" << y << "\n" <<z;  
   }   
 
}