#include <iostream.h>
#include <stdio.h>
#include <string.h>

int main()
{
    char t1[100],t2[100],*t3,*t4;
    int rozm;
    gets(t1);
    gets(t2);
    if(strcmp(t1,t2)==-1) t4 = t1;
    else if(strcmp(t1,t2)==1) t4 = t2;
    rozm=strlen(t4);
    t3 = new char[rozm+1];
    strcpy(t3,t4);
    cout << t3;
    delete []t3;
    system("PAUSE");
    return 0;
}
