#include <set>
#include <cstdio>

using namespace std;

struct cmp {
  int sign;
  bool operator () ( int i, int j )  {
    return i * sign < j * sign;
  }
};

int main() {
  set <int, cmp> s(cmp {-1});

  for (int i = 1; i <= 10; i++)
    s.insert(i);
  for (set <int, cmp>::iterator it = s.begin(); it != s.end(); it++)
    printf("%d ", *it);
  return 0;
}