X marks the Spot
Time limit1sMemory limit1024 MB
For each string pair, find the position of x or X in S and output the letter at that position in T, uppercased, concatenated in order.
- Level
Easy2 of 10
- Topics
- String, Implementation
- Solved
- No attempts yet
Problem
Hyby, who loves puzzles, decided to set another puzzle problem this year, as he did last year.
This time the topic is Indirect Indexing, and the rules are as follows.
- You are given pairs of strings . For each pair, the length of equals the length of .
- Let be the position where the letter
xorXappears in . This position is always unique. - Read the -th letter of . However, lowercase letters must be converted to uppercase.
- For example, if is
Indexingand isIndirect, the letter read isR.
Input
The first line contains the number of string pairs . ()
From the second line onward, line contains the pair of strings and , separated by a space. The total length of all input strings does not exceed , and every string consists only of English letters (uppercase or lowercase) and digits.
Output
Print the letters read for the string pairs, in order, concatenated on a single line.