#include <stdio.h>
int main () 
{
    long long int a, b, c, aa, bb, cc, x, y, z;
    scanf("%lld %lld %lld", &a, &b, &c);
    aa=a;bb=b;
    while(aa==bb){
    aa/=10;
    bb/=10;}
    if(aa>bb){
    x=a;
    y=b;}
    else{
    x=b;
    y=a;}
    bb=b;cc=c;
    while(bb==cc){
    bb/=10;
    cc/=10;}
    if(cc>bb){
    z=b;
    y=c;}
    else{
    z=c;}
    printf("%lld%lld%lld", x, y, z);
    return 0;
}