Two Strings (Easy)#5249

Two Strings (Easy)

1 second
64 megabytes
Easy

You are given two strings, each with length not exceeding characters. We call a string good if, by concatenating it to itself enough times, the resulting string will contain both of the given strings as substrings. For example, for the strings and , the string is good — indeed, if you concatenate it to itself twice, you get , which contains both of the given strings as substrings.

Given two strings, find the shortest good string.

Input

The input file contains two strings. The strings consist of characters with ASCII codes from to . The length of each does not exceed .

Output

Print the answer to the output file. If there are multiple shortest good strings, output any of them.

Examples

Example 1

Loading
Loading