Company: Sprinkler_1oct
Difficulty: medium
String Transformation Problem Description You are given two strings S and T of the same length. Determine if it is possible to transform S into T using the following operation any number of times: Map a character from string S to a character of string T and replace all occurrences of that character in S with the mapped character. Notes: All occurrences of a character must be replaced simultaneously, preserving the order of characters. No two characters may map to the same character (the mapping must be injective), but a character may map to itself. Input The first line contains an integer N , the number of test cases. For each test case: - The first line contains string S . - The second line contains string T . Output For each test case, print true or false on its own line, indicating whether the transformation is possible. Examples Example 1 Input: 1 egg add Output: true Explanation: Map e → a and g → d . Replacing every occurrence converts egg into add . Example 2 Input: 1 foo bar Ou