#include <cstdio>
#include <stdlib.h>

bool compare(long long a, long long b);

using namespace std;

int main(){
  long long a;
  long long b;
  long long c;
  
  scanf("%s", &a);
  scanf("%s", &b);
  scanf("%s", &c);
  
  if(compare(a,b))
  {
    if(compare(a,c)){
      if(compare(b,c)){
        printf("%lld %lld %lld", a,b,c);
      }
      else{
        printf("%lld %lld %lld", a,c,b);
      }
    }
    else{
      printf("%lld %lld %lld", c,a,b);
    }
  }
  else{
    if(compare(b,c)){
      if(compare(a,c)){
        printf("%lld %lld %lld", b,a,c);
      }
      else{
        printf("%lld %lld %lld", b,c,a);
      }
    }
    else{
      printf("%lld %lld %lld", c,b,a);
    }
  }
  
  return 0;
}

bool compare(long long a, long long b){
  long long len1 = sizeof(a)/sizeof(long long);
  long long len2 = sizeof(b)/sizeof(long long);
  
  if(len1 == len2){
    return a > b;
  }
  else if(len1 < len2){
    a = a*(len2 - len1)*10 + a/((2*len1 - len2)*10);
    return a>b;
  }else{
    b = b*(len1 - len2)*10 + b/((2*len2-len1)*10);
    return a>b;
  }
}