BETA

Difficulty Level:

Basic

Total Submissions: 892 Accuracy:

21.86%

[Remove common characters and concatenate]
     

Two strings are given. Modify 1st string such that all the common characters of the 2nd strings have to be removed and the uncommon characters of the 2nd string have to be concatenated with uncommon characters of the 1st string.

Note: If the modified string is empty then print '-1'.

Input:
The first line consists of an integer T i.e number of test cases. The first line of each test case consists of an string s1.The next line consists of an string s2

Output:
Print the required output.

Constraints: 
1<=T<=100
1<=|Length of Strings|<=100

Example:
Input:

2
aacdb
gafd
abcs
cxzca

Output:
cbgf
bsxz

** For More Input/Output Examples Use 'Expected Output' option **

Contributor: Saksham Ashtputre

Set Default Code

					   
It is recommended to 'Compile & Test' your code before clicking 'Submit'!

Compilation/Execution Result:

Need help with your code? Please use ide.geeksforgeeks.org, generate link and share the link here.