#include <bits/stdc++.h>

using namespace std;

int a[10];

void quick_sort(int s[], int l, int r)
{
    if (l < r)
    {
        int i = l;
        int j = r;
        int x = s[l];
        while (i < j)
        {
            while (i < j && a[j] >= x)
            {
                j--;
            }
            if (i < j)
            {
                s[i++] = s[j];
            }
            while (i < j && a[i] < x)
            {
                i++;
            }
            if (i < j)
            {
                s[j--] = s[i];
            }
        }
        s[i] = x;
        quick_sort(s, l, i - 1);
        quick_sort(s, i + 1, r);
    }
}

int main()
{
    int index = 0;
    int num;
    while (1)
    {
        cin >> num;
        if (num == 0)
        {
            break;
        }
        a[index++] = num;
    }
    quick_sort(a, 0, index - 1);
    for (int i = 0; i < index; i++)
    {
        cout << a[i] << " ";
    }
    return 0;
}
