Hide

Problem E
Drunk Texting

Languages da de en
/problems/drunktexting/file/statement/en/img-0001.png

Among the many negative effects of alcohol is my inclination to text my ex when I’m drunk. I have the urge to express my feelings, but I also need plausible deniability in case my embarrassing overtures are rebuffed.

Assume the drunk text is “xoxo”, for “hugs and kisses”. I will hide that potentially regrettable text using the perfectly innocuous text “xerox”. I can do this by sending the message “xeroxo”, which contains the amorous “xoxo” but can also be rationalised as just “xerox with some extra letters.” The message must be as short as possible—I want to spend money on beverages, not phone bills—so “xeroxoxo” is no good.

Input

There are two lines of input: the drunk text and the innocuous text. Each line consists of at least $1$ and at most $1000$ characters from the English alphabet, digits, space, exclamation point, question mark, full stop, comma, and apostrophe; all characters are inside the ASCII range $20$$122$.

Output

Write the message as a single line of output. The message must contain both the drunk and the innocuous texts as subsequences. (In other words, each text can appear by deleting some characters from the message.) The message has to be as short as possible. If more than one valid answer exists, any will do.

Sample Input 1 Sample Output 1
I miss you so much!!!!
The miso soup is excellent!
TheI miso s youp iso exmucellenth!!!!
Sample Input 2 Sample Output 2
xoxo
xerox
xeroxo
Sample Input 3 Sample Output 3
y u ghosting me?
your host doesn't respond
yo ur ghost doesin'tg rmespond?
Sample Input 4 Sample Output 4
c u l8r tonight?
I'll read 1984 tonight, I think.
I'llc readu 19l84r tonight, I think.?
Sample Input 5 Sample Output 5
Hi
Hi
Hi
Sample Input 6 Sample Output 6
xo
hi
xhoi
Sample Input 7 Sample Output 7
Vi har kabelsamarbejde med USAs efterretningstjeneste
ikea har salat og efterret men ingen tjenere
Vikea har skabelsatmarbejde ogmed USAs efterret men ingen stjenerste