#include <iostream.h>
#include <set>

// duh - there is a generic template function called less
// which has been implemented in C++ specifically because
// you can't pass any symbol with '<' in it to a template
// The less function template is no more than:
//
// template <class C> bool less(C a, C b) { return a < b; }
//
// so it will work automatically for any class that has
// the < operator defined for it - this includes int, char
// and of course any class you declare that overloads
// the < operator.

typedef set<int, less<int> > intset;
typedef intset::iterator itor;

main()

{
  int i;
  intset s;

  cin >> i;
  while (cin) {
    s.insert(i);
    cin >> i;
  }

  for (itor is=s.begin(); is != s.end() ; is++)
    cout << *is << " ";

  cout << endl;
}



