#C9072. Baby Name Generation
Baby Name Generation
Baby Name Generation
In this problem, you are given two strings representing the names of two parents. According to an age-old tradition, a baby’s name is formed by combining all the letters from both parents and then sorting them in lexicographical order. Formally, if the parents’ names are given by (s_1) and (s_2), the baby’s name is the string obtained by sorting the multiset ({s_1 \cup s_2}) in ascending order. Note that if a letter appears more than once in the combined string, it is kept in the result. For example, given the names "amy" and "john", the baby’s name will be "ahjmnoy". Your task is to implement this procedure for multiple test cases.
inputFormat
The input begins with a single integer (T) ((1 \le T \le 10^4)) on the first line, denoting the number of test cases. For each test case, there are two subsequent lines: the first line contains the first parent's name (a string of lowercase English letters, possibly empty), and the second line contains the second parent's name (also a string of lowercase English letters, possibly empty).
outputFormat
For each test case, output a single line containing the baby’s name, which is the sorted combination of all letters from both parent's names.## sample
2
amy
john
bob
alice
ahjmnoy
abbceilo
</p>