#include <cstdlib>
#include <iostream>
using namespace std;
int main(int argc, char *argv[])
{
    int a=9,b=8,c=7,d=6,e=5,f=4,g=3,h=2,i=1,j=0,v;
    //cin >> a >> b >> c >> d >> e >> f >> g >> h >> i >> j;
    cout << a << " "<< b << " " << c << " " << d << " " << e << " " << f << " " << g << " " << h << " " << i << " " << j << endl;
    cout << endl;
    if ( a > b ) { v = a; a = b; b = v; }    cout << a << " "<< b << " " << c << " " << d << " " << e << " " << f << " " << g << " "  << h << " " << i << " " << j << endl;
    if ( b > c ) { v = b; b = c; c = v; }    cout << a << " "<< b << " " << c << " " << d << " " << e << " " << f << " " << g << " "  << h << " " << i << " " << j << endl;
    if ( c > d ) { v = c; c = d; d = v; }    cout << a << " "<< b << " " << c << " " << d << " " << e << " " << f << " " << g << " "  << h << " " << i << " " << j << endl;
    if ( d > e ) { v = d; d = e; e = v; }    cout << a << " "<< b << " " << c << " " << d << " " << e << " " << f << " " << g << " "  << h << " " << i << " " << j << endl;
    if ( e > f ) { v = e; e = f; f = v; }    cout << a << " "<< b << " " << c << " " << d << " " << e << " " << f << " " << g << " "  << h << " " << i << " " << j << endl;
    if ( f > g ) { v = f; f = g; g = v; }    cout << a << " "<< b << " " << c << " " << d << " " << e << " " << f << " " << g << " "  << h << " " << i << " " << j << endl;
    if ( g > h ) { v = g; g = h; h = v; }    cout << a << " "<< b << " " << c << " " << d << " " << e << " " << f << " " << g << " "  << h << " " << i << " " << j << endl;
    if ( h > i ) { v = h; h = i; i = v; }    cout << a << " "<< b << " " << c << " " << d << " " << e << " " << f << " " << g << " "  << h << " " << i << " " << j << endl;
    if ( i > j ) { v = i; i = j; j = v; }    cout << a << " "<< b << " " << c << " " << d << " " << e << " " << f << " " << g << " "  << h << " " << i << " " << j << endl;
    cout << endl;

    if ( a > b ) { v = a; a = b; b = v; }    cout << a << " "<< b << " " << c << " " << d << " " << e << " " << f << " " << g << " "  << h << " " << i << " " << j << endl;
    if ( b > c ) { v = b; b = c; c = v; }    cout << a << " "<< b << " " << c << " " << d << " " << e << " " << f << " " << g << " "  << h << " " << i << " " << j << endl;
    if ( c > d ) { v = c; c = d; d = v; }    cout << a << " "<< b << " " << c << " " << d << " " << e << " " << f << " " << g << " "  << h << " " << i << " " << j << endl;
    if ( d > e ) { v = d; d = e; e = v; }    cout << a << " "<< b << " " << c << " " << d << " " << e << " " << f << " " << g << " "  << h << " " << i << " " << j << endl;
    if ( e > f ) { v = e; e = f; f = v; }    cout << a << " "<< b << " " << c << " " << d << " " << e << " " << f << " " << g << " "  << h << " " << i << " " << j << endl;
    if ( f > g ) { v = f; f = g; g = v; }    cout << a << " "<< b << " " << c << " " << d << " " << e << " " << f << " " << g << " "  << h << " " << i << " " << j << endl;
    if ( g > h ) { v = g; g = h; h = v; }    cout << a << " "<< b << " " << c << " " << d << " " << e << " " << f << " " << g << " "  << h << " " << i << " " << j << endl;
    if ( h > i ) { v = h; h = i; i = v; }    cout << a << " "<< b << " " << c << " " << d << " " << e << " " << f << " " << g << " "  << h << " " << i << " " << j << endl;
    cout << endl;

    if ( a > b ) { v = a; a = b; b = v; }    cout << a << " "<< b << " " << c << " " << d << " " << e << " " << f << " " << g << " "  << h << " " << i << " " << j << endl;
    if ( b > c ) { v = b; b = c; c = v; }    cout << a << " "<< b << " " << c << " " << d << " " << e << " " << f << " " << g << " "  << h << " " << i << " " << j << endl;
    if ( c > d ) { v = c; c = d; d = v; }    cout << a << " "<< b << " " << c << " " << d << " " << e << " " << f << " " << g << " "  << h << " " << i << " " << j << endl;
    if ( d > e ) { v = d; d = e; e = v; }    cout << a << " "<< b << " " << c << " " << d << " " << e << " " << f << " " << g << " "  << h << " " << i << " " << j << endl;
    if ( e > f ) { v = e; e = f; f = v; }    cout << a << " "<< b << " " << c << " " << d << " " << e << " " << f << " " << g << " "  << h << " " << i << " " << j << endl;
    if ( f > g ) { v = f; f = g; g = v; }    cout << a << " "<< b << " " << c << " " << d << " " << e << " " << f << " " << g << " "  << h << " " << i << " " << j << endl;
    if ( g > h ) { v = g; g = h; h = v; }    cout << a << " "<< b << " " << c << " " << d << " " << e << " " << f << " " << g << " "  << h << " " << i << " " << j << endl;
    cout << endl;

    if ( a > b ) { v = a; a = b; b = v; }    cout << a << " "<< b << " " << c << " " << d << " " << e << " " << f << " " << g << " "  << h << " " << i << " " << j << endl;
    if ( b > c ) { v = b; b = c; c = v; }    cout << a << " "<< b << " " << c << " " << d << " " << e << " " << f << " " << g << " "  << h << " " << i << " " << j << endl;
    if ( c > d ) { v = c; c = d; d = v; }    cout << a << " "<< b << " " << c << " " << d << " " << e << " " << f << " " << g << " "  << h << " " << i << " " << j << endl;
    if ( d > e ) { v = d; d = e; e = v; }    cout << a << " "<< b << " " << c << " " << d << " " << e << " " << f << " " << g << " "  << h << " " << i << " " << j << endl;
    if ( e > f ) { v = e; e = f; f = v; }    cout << a << " "<< b << " " << c << " " << d << " " << e << " " << f << " " << g << " "  << h << " " << i << " " << j << endl;
    if ( f > g ) { v = f; f = g; g = v; }    cout << a << " "<< b << " " << c << " " << d << " " << e << " " << f << " " << g << " "  << h << " " << i << " " << j << endl;
    cout << endl;

    if ( a > b ) { v = a; a = b; b = v; }    cout << a << " "<< b << " " << c << " " << d << " " << e << " " << f << " " << g << " "  << h << " " << i << " " << j << endl;
    if ( b > c ) { v = b; b = c; c = v; }    cout << a << " "<< b << " " << c << " " << d << " " << e << " " << f << " " << g << " "  << h << " " << i << " " << j << endl;
    if ( c > d ) { v = c; c = d; d = v; }    cout << a << " "<< b << " " << c << " " << d << " " << e << " " << f << " " << g << " "  << h << " " << i << " " << j << endl;
    if ( d > e ) { v = d; d = e; e = v; }    cout << a << " "<< b << " " << c << " " << d << " " << e << " " << f << " " << g << " "  << h << " " << i << " " << j << endl;
    if ( e > f ) { v = e; e = f; f = v; }    cout << a << " "<< b << " " << c << " " << d << " " << e << " " << f << " " << g << " "  << h << " " << i << " " << j << endl;
    cout << endl;

    if ( a > b ) { v = a; a = b; b = v; }    cout << a << " "<< b << " " << c << " " << d << " " << e << " " << f << " " << g << " "  << h << " " << i << " " << j << endl;
    if ( b > c ) { v = b; b = c; c = v; }    cout << a << " "<< b << " " << c << " " << d << " " << e << " " << f << " " << g << " "  << h << " " << i << " " << j << endl;
    if ( c > d ) { v = c; c = d; d = v; }    cout << a << " "<< b << " " << c << " " << d << " " << e << " " << f << " " << g << " "  << h << " " << i << " " << j << endl;
    if ( d > e ) { v = d; d = e; e = v; }    cout << a << " "<< b << " " << c << " " << d << " " << e << " " << f << " " << g << " "  << h << " " << i << " " << j << endl;
    cout << endl;

    if ( a > b ) { v = a; a = b; b = v; }    cout << a << " "<< b << " " << c << " " << d << " " << e << " " << f << " " << g << " "  << h << " " << i << " " << j << endl;
    if ( b > c ) { v = b; b = c; c = v; }    cout << a << " "<< b << " " << c << " " << d << " " << e << " " << f << " " << g << " "  << h << " " << i << " " << j << endl;
    if ( c > d ) { v = c; c = d; d = v; }    cout << a << " "<< b << " " << c << " " << d << " " << e << " " << f << " " << g << " "  << h << " " << i << " " << j << endl;
    cout << endl;

    if ( a > b ) { v = a; a = b; b = v; }    cout << a << " "<< b << " " << c << " " << d << " " << e << " " << f << " " << g << " "  << h << " " << i << " " << j << endl;
    if ( b > c ) { v = b; b = c; c = v; }    cout << a << " "<< b << " " << c << " " << d << " " << e << " " << f << " " << g << " "  << h << " " << i << " " << j << endl;
    cout << endl;

    if ( a > b ) { v = a; a = b; b = v; }    cout << a << " "<< b << " " << c << " " << d << " " << e << " " << f << " " << g << " "  << h << " " << i << " " << j << endl;
    cout << endl;

     
    system("PAUSE");
    return EXIT_SUCCESS;
}