#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;
}
}
I2luY2x1ZGUgPGlvc3RyZWFtPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwppbnQgbWFpbiAoICkKewogbG9uZyBsb25nICB4ICwgeSAsIHo7CiBjaW4gPj4geCA+PiB5ID4+ejsKIGlmICh4ID4geSA+IHopCiAgIAogICB7CiAgICAgY291dCA8PCB6IDw8ICJcbiIgPDwgeSA8PCAiXG4iIDw8IHggPDwgIlxuIiA8PCAiXG4iIDw8IHggPDwgIlxuIiA8PCB5ICA8PCAiXG4iIDw8ejsgIAogICB9IAogCiAgZWxzZSBpZiAoeCA+IHogPiB5KQogICAKICAgewogICAgIGNvdXQgPDwgeSA8PCAiXG4iIDw8IHogPDwgIlxuIiA8PCB4IDw8ICJcbiIgPDwgIlxuIiA8PCB4IDw8ICJcbiIgPDwgeSAgPDwgIlxuIiA8PHo7ICAKICAgfSAgIAogICAgZWxzZSBpZiAoeSA+IHogPiB4KQogICAKICAgewogICAgIGNvdXQgPDwgIHggPDwgIlxuIiA8PCB6IDw8ICJcbiIgPDwgeSA8PCAiXG4iIDw8ICJcbiIgPDwgeCAgPDwgIlxuIiA8PCB5IDw8ICJcbiIgPDx6OyAgCiAgIH0gIC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