Problem G
Nafnagift
Languages
en
is

A string
Input
The input consists of two lines. Each line contains a string
corresponding to the candidate names your children provided.
The length of each string is at least
Output
The output should contain a name for the cat that both children are satisfied by. Of all possible names, print the shortest. If there are more than one name of equal shortest length, print any of them.
Scoring
Group |
Points |
Constraints |
1 |
33 |
|
2 |
27 |
|
3 |
40 |
|
Sample Input 1 | Sample Output 1 |
---|---|
bjarki bergur |
bjaergurki |
Sample Input 2 | Sample Output 2 |
---|---|
kisi kisi |
kisi |
Sample Input 3 | Sample Output 3 |
---|---|
aaaaa bb |
aaaaabb |