#include<iostream>
#include<string.h>
using namespace std;
#define MAX 100
int main()
{
char a[MAX],b[MAX];
cout<<"输入两个字符串;"<<endl;
cin>>a>>b;
int i,j,insert;
insert=0;
for(i=1;i<MAX;i++)
{
if(a[i]>a[insert])
{
insert=i;
}
}
for(i=0;i<=insert;i++)
{
cout<<a[i];
}
cout<<b;
for(j=insert+1;(i<MAX)&&(a[j]!='\0');j++)
{
cout<<a[j];
}
cout<<endl;
return 0;
}