Remove common characters and concatenate

3

2 votes
Easy
Problem

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

Time Limit: 5
Memory Limit: 256
Source Limit:
Editor Image

?