Problem: You are given two integers and of the same length, consisting of digits from to .
You can perform the following operation any number of times (possibly zero): swap the -th digit in and the -th digit in .
For example, if and , you can swap the -nd digits and get and .
Your task is to maximize the product of and using the aforementioned operation any number of times. If there are multiple answers, print any of them.
Input Format: The first line contains a single integer () — the number of test cases.
The first line of each test case contains a single integer ().
The second line of each test case contains a single integer ().
Additional constraint on input: the integers and consist only of digits from to .
Output Format: For each test case, print two lines — the first line should contain the number after performing the operations; similarly, the second line should contain the number after performing the operations. If there are multiple answers, print any of them.