Hide

Problem G
Class Field Trip

Instructors ann and ben firmly believe that everything should be alphabetical, especially names. (They also don’t believe in capital letters!) They take alphabetical order to such an extreme that they even order the letters of their names when listed together. For example, the last time they co-taught they listed the instructors as abennn! They are taking their classes on a class field trip, so they need to merge their lists of students. Fortunately, they each have their student lists in order, so merging the lists should be quick. If ann has john and amy in her class and ben has jack and jill in his class, their two lists would be ahjmnoy and acijjkll. The field trip list would be aachijjjkllmnoy.

Given ann’s and ben’s lists, produce the field trip list.

Input

Input consists of exactly two lines. Each line contains a string of from $1$ to $100$ lower case letters. These are ann’s and ben’s lists.

Output

Output a single string of lower case letters, which represents the merging of ann’s and ben’s lists.

Sample Input 1 Sample Output 1
ahjmnoy
acijjkll
aachijjjkllmnoy

Please log in to submit a solution to this problem

Log in