AlgoUniversity
  • Go Back
Discussion
Find The Extra Letter :

Author

Lokesh

Difficulty Level : Easy

Submissions : 279

Asked In : JP-Morgan

Marks :10

: 0 | : 0

Given two strings $$$A$$$ and $$$B$$$. Removing a character from string $$$B$$$ makes it a permutation of $$$A$$$. Find that character

Input

The first line contains the number of test cases $$$1\le t\le 10^4$$$

Each test contains 3 lines.

The first line of test cases contains no of characters in string $$$A$$$, $$$1\le n\le 1000$$$

The second line contains string $$$A$$$

Third line contains string $$$B$$$ (size of $$$B$$$ is $$$n+1$$$)

The Sum of all n is less than $$$10^6$$$

Output

For each test case, output the character that needs to be removed.

Example

Input
1
3
abc
abcd
Output
d

You need to login to view your submissions.

You need to login to view all submissions.

Loading...

Result : Executed

Loading...

Feel something is wrong with the test cases?

Result : Accepted

Test Cases :

You need to Log In
We're glad that you want to attempt this problem!

But to Run or Submit the Problem, you need to Log In.

Continue to Log In
Challenge Submitted!

Your challenge has been submitted successfully.

You will get a response soon via WhatsApp or Email.

Challenge
Facing issue while trying to solve the problem! Don't worry, we got you covered!

Do let us know your issue.

Looks good!
Please enter your issue / feedback.

How do we get in touch with you?
Looks good!
Please enter your phone no.
Looks good!
Please enter your email address.