You are given two strings a and b consisting of lowercase English letters. You want to append a string x so that ax or bx becomes a palindrome (a string that reads the same forwards and backwards). However, ax and bx must not both be palindromes at the same time; that is, exactly one of ax and bx must be a palindrome. Find the shortest string x that satisfies this condition.
The input consists of several test cases. Each test case has two lines: the first line contains the string a and the second line contains the string b. Each string consists of 0 to 1,000 lowercase English letters. The input continues until end of file (EOF).
For each test case, print on its own line the shortest string x that satisfies the condition. If several shortest strings x exist, print the lexicographically smallest one. If x is the empty string, print an empty line. If no such x exists, print "No Solution."