Given two strings A and B. Find the characters that are not common in the two strings. 
Note :- Return the string in sorted order.
Example 1:
Input:
A = geeksforgeeks
B = geeksquiz
Output: fioqruz
Explanation: 
The characters 'f', 'i', 'o', 'q', 'r', 'u','z' 
are either present in A or B, but not in both.
Example 2:
Input:
A = characters
B = alphabets
Output: bclpr
Explanation: The characters 'b','c','l','p','r' 
are either present in A or B, but not in both.
Your Task:  
You dont need to read input or print anything. Complete the function UncommonChars() which takes strings A and B as input parameters and returns a string that contains all the uncommon characters in sorted order. If no such character exists return "-1".
Expected Time Complexity: O(M+N) where M and N are the sizes of A and B respectively.
Expected Auxiliary Space: O(M+N)  
Constraints:
1<= M,N <= 10^{4}
String may contain duplicate characters.

Difficulty: EASY
Tags: String algorithms

Data structures
Skill types: Data structures
Expected Time Complexity: O(M+N) where M and N are the sizes of A and B respectively.
Expected Auxiliary Space: O(M+N)

Starter code:
#User function Template for python3



class Solution:

    def UncommonChars(self,A, B):

        #code here

Solutions:
class Solution:

	def UncommonChars(self, A, B):
		set_a = set(A)
		set_b = set(B)
		l1 = list(set_a - set_b)
		l2 = list(set_b - set_a)
		if len(l1) == 0 and len(l2) == 0:
			return -1
		else:
			l1.extend(l2)
			k = sorted(l1)
			return ''.join(k)


class Solution:

	def UncommonChars(self, A, B):
		(lst1, lst2) = ([], [])
		for i in range(len(A)):
			lst1.append(A[i])
		for i in range(len(B)):
			lst2.append(B[i])
		st1 = set(lst1)
		st2 = set(lst2)
		st3 = st1 - st2
		st4 = st2 - st1
		st3 = list(st3)
		st4 = list(st4)
		st3.extend(st4)
		st3.sort()
		if len(st3) == 0:
			return -1
		else:
			s = ''
			for i in range(len(st3)):
				s += st3[i]
			return s


class Solution:

	def UncommonChars(self, A, B):
		op = ''
		for i in A:
			if i not in B:
				if i not in op:
					op = op + i
		for j in B:
			if j not in A:
				if j not in op:
					op = op + j
		op = ''.join(sorted(op))
		if op == '':
			return -1
		return op


from collections import defaultdict

class Solution:

	def UncommonChars(self, A, B):
		uncommon = []
		freqA = defaultdict(int)
		freqB = defaultdict(int)
		for char in A:
			freqA[ord(char)] += 1
		for char in B:
			freqB[ord(char)] += 1
		for i in range(256):
			if freqA[i] > 0 and freqB[i] == 0:
				uncommon.append(chr(i))
			elif freqA[i] == 0 and freqB[i] > 0:
				uncommon.append(chr(i))
		if not uncommon:
			return '-1'
		return ''.join(uncommon)


class Solution:

	def UncommonChars(self, A, B):
		setA = set(A)
		setB = set(B)
		result = []
		for char in setA:
			if char not in setB:
				result.append(char)
		for char in setB:
			if char not in setA:
				result.append(char)
		result.sort()
		if len(result) == 0:
			return -1
		return ''.join(result)


from collections import Counter

class Solution:

	def UncommonChars(self, A, B):
		c_a = Counter(A)
		c_b = Counter(B)
		ans = ''
		for (i, x) in c_a.items():
			if i not in c_b:
				ans += i
		for (i, x) in c_b.items():
			if i not in c_a:
				ans += i
		ans = sorted(list(ans))
		return -1 if len(ans) == 0 else ''.join(ans)


class Solution:

	def UncommonChars(self, A, B):
		unc = []
		for ele in B:
			if A.find(ele) >= 0:
				continue
			elif ele not in unc:
				unc.append(ele)
		for ele in A:
			if B.find(ele) >= 0:
				continue
			elif ele not in unc:
				unc.append(ele)
		if len(unc) > 0:
			unc.sort()
			u = ''.join(unc)
			return u
		else:
			return -1


class Solution:

	def UncommonChars(self, A, B):
		a = list(A)
		b = list(B)
		if A == B:
			return -1
		else:
			s = ''
			for i in range(len(a)):
				if a[i] not in b and a[i] not in s:
					s = s + a[i]
			for j in range(len(b)):
				if b[j] not in a and b[j] not in s:
					s = s + b[j]
			m = sorted(s)
			res = ''.join(m)
			if len(m) == 0:
				return -1
			else:
				return res


class Solution:

	def UncommonChars(self, a, b):
		(d1, d2) = ({}, {})
		for c in a:
			d1[c] = d1.get(c, 0) + 1
		for c in b:
			d2[c] = d2.get(c, 0) + 1
		keys = set(d1.keys())
		keys.update(d2.keys())
		s = ''
		for c in keys:
			if c not in d1 or c not in d2:
				s += c
		return -1 if len(s) < 1 else ''.join(sorted(s))


class Solution:

	def UncommonChars(self, A, B):
		A = set(A)
		B = set(B)
		if A == B:
			return -1
		else:
			d = A.difference(B)
			e = B.difference(A)
			f = sorted(list(d.union(e)))
			f = ''.join(f)
			return f


class Solution:

	def UncommonChars(self, A, B):
		a_set = set(A)
		b_set = set(B)
		diff_a = a_set - b_set
		diff_b = b_set - a_set
		diff_a.update(diff_b)
		final = ''.join(sorted(diff_a))
		if not final:
			return -1
		return final


class Solution:

	def UncommonChars(self, A, B):
		c = set(A) - set(B)
		d = set(B) - set(A)
		c1 = list(c) + list(d)
		c1.sort()
		s = ''
		for i in c1:
			s += i
		if s:
			return s
		return -1


class Solution:

	def UncommonChars(self, A, B):
		uncommon_chars = set(A) - set(B)
		uncommon_chars |= set(B) - set(A)
		if not uncommon_chars:
			return -1
		return ''.join(sorted(uncommon_chars))


class Solution:

	def UncommonChars(self, A, B):
		str1 = ''
		for i in range(len(A)):
			if A[i] not in B and A[i] not in str1:
				str1 = str1 + A[i]
		for j in range(len(B)):
			if B[j] not in A and B[j] not in str1:
				str1 = str1 + B[j]
		res = ''.join(sorted(str1))
		if len(str1) > 0:
			return res
		else:
			return -1


class Solution:

	def UncommonChars(self, A, B):
		s1 = set(A)
		d = dict()
		for x in s1:
			if x not in d:
				d[x] = 1
		s1 = set(B)
		e = dict()
		for x in s1:
			if x not in d:
				d[x] = 1
			else:
				d[x] += 1
		ans = ''
		for (key, value) in d.items():
			if value == 1:
				ans += key
		ans = ''.join(sorted(ans))
		if not ans:
			return -1
		else:
			return ans


import itertools

class Solution:

	def UncommonChars(self, A, B):
		self.A = A
		self.B = B
		A = set(A)
		B = set(B)
		lista = []
		lista.append(list(A - B))
		lista.append(list(B - A))
		lista_plana = itertools.chain(*lista)
		lista = list(lista_plana)
		lista.sort()
		if not lista:
			return -1
		else:
			res = ''.join(lista)
			return res


class Solution:

	def UncommonChars(self, A, B):
		r = []
		for i in A:
			if i not in B:
				r.append(i)
		for i in B:
			if i not in A:
				r.append(i)
		res = set(r)
		cur = sorted(list(res))
		uncommon = ''.join(cur)
		if len(uncommon) == 0:
			return -1
		return uncommon


class Solution:

	def UncommonChars(self, A, B):
		arr1 = []
		arr2 = []
		arr3 = []
		for i in range(len(A)):
			arr1.append(A[i])
		for j in range(len(B)):
			arr2.append(B[j])
		for ele in arr1:
			if ele in arr3:
				continue
			if ele not in arr2:
				arr3.append(ele)
				continue
		for elem in arr2:
			if elem in arr3:
				continue
			if elem not in arr1:
				arr3.append(elem)
				continue
		arr3.sort()
		s = ''
		for k in range(len(arr3)):
			s += str(arr3[k])
		if len(s) == 0:
			return -1
		else:
			return s


class Solution:

	def UncommonChars(self, A, B):
		A = set(A)
		B = set(B)
		op = set()
		set1 = A.difference(B)
		set2 = B.difference(A)
		op.update(set1)
		op.update(set2)
		if op == set():
			return -1
		else:
			return ''.join(sorted(op))


class Solution:

	def UncommonChars(self, A, B):
		res = [0] * 256
		ans = ''
		for ele in set(A):
			res[ord(ele)] = 1
		for ele in set(B):
			res[ord(ele)] -= 1
		for i in range(256):
			if res[i] != 0:
				ans += chr(i)
		return ''.join(sorted(ans)) if ans else -1


class Solution:

	def UncommonChars(self, A, B):
		ans = []
		for st in A:
			if st not in B:
				ans.append(st)
		for st in B:
			if st not in A:
				ans.append(st)
		ans = sorted(set(ans))
		ans = list(ans)
		ans = ''.join(ans)
		if len(ans) == 0:
			return -1
		return ans


class Solution:

	def UncommonChars(self, A, B):
		uncommon = ''
		for i in A:
			if i not in B:
				if_there = 1
				uncommon += i
		for i in B:
			if i not in A:
				if_there = 1
				uncommon += i
		if uncommon == '':
			return -1
		else:
			uncommon = list(set(uncommon))
			uncommon.sort()
			uncommon = ''.join(uncommon)
			return uncommon


class Solution:

	def UncommonChars(self, A, B):
		result = []
		for i in range(len(A)):
			if A[i] not in B and A[i] not in result:
				result.append(A[i])
		for i in range(len(B)):
			if B[i] not in A and B[i] not in result:
				result.append(B[i])
		if len(result) > 0:
			result.sort()
			answer = ''
		else:
			answer = -1
		for i in range(len(result)):
			answer = answer + result[i]
		return answer


class Solution:

	def UncommonChars(self, A, B):
		char_list_a = [0] * 255
		char_list_b = [0] * 255
		ans = ''
		for i in A:
			char_list_a[ord(i)] = 1
		for i in B:
			char_list_b[ord(i)] = 1
		for i in range(255):
			if char_list_a[i]:
				if not char_list_b[i]:
					ans += chr(i)
			elif char_list_b[i]:
				if not char_list_a[i]:
					ans += chr(i)
		return ans if ans != '' else '-1'


class Solution:

	def UncommonChars(self, a, b):
		d = []
		for i in a:
			if i not in b:
				d.append(i)
		for i in b:
			if i not in a:
				d.append(i)
		e = set(d)
		f = sorted(e)
		r = ''
		if f == []:
			return -1
		else:
			for i in f:
				r += i
		return r


class Solution:

	def UncommonChars(self, A, B):
		x = list(A)
		y = list(B)
		x = list(set(x))
		y = list(set(y))
		uncommon_string = ''
		any_common = True
		new_list = x + y
		new_list.sort()
		for i in new_list:
			if new_list.count(i) == 1:
				any_common = False
				uncommon_string += i
		if any_common == False:
			return uncommon_string
		else:
			return -1


class Solution:

	def UncommonChars(self, A, B):
		res = ''
		for i in A:
			if i in B:
				continue
			else:
				res += i
		for j in B:
			if j in A:
				continue
			else:
				res += j
		res = set(res)
		if not res:
			return -1
		else:
			return ''.join(sorted(res))


class Solution:

	def UncommonChars(self, A, B):
		a = set((char for char in A))
		b = set((char for char in B))
		out = ''.join(sorted(a.union(b) - a.intersection(b)))
		if not out:
			return -1
		return out


class Solution:

	def UncommonChars(self, A, B):
		res = ''
		setA = set(A)
		setB = set(B)
		for i in setA:
			if i not in setB:
				res += i
		for i in setB:
			if i not in setA:
				res += i
		if len(res) > 0:
			return ''.join(sorted(list(res)))
		else:
			return -1


class Solution:

	def UncommonChars(self, a, b):
		result = ''
		for i in a:
			if i not in b:
				if i not in result:
					result += i
		for i in b:
			if i not in a:
				if i not in result:
					result += i
		ou = ''.join(sorted(result))
		if ou == '':
			return -1
		return ou


class Solution:

	def UncommonChars(self, A, B):
		st = ''
		for i in range(len(A)):
			if A[i] not in B and A[i] not in st:
				st += A[i]
		for i in range(len(B)):
			if B[i] not in A and B[i] not in st:
				st += B[i]
		if len(st) < 1:
			return -1
		else:
			return ''.join(sorted(st))


class Solution:

	def UncommonChars(self, A, B):
		s = ''
		if set(A) != set(B):
			for i in A:
				if i not in B:
					s += i
			for x in B:
				if x not in A:
					s += x
			return ''.join(sorted(set(s)))
		else:
			return '-1'


class Solution:

	def UncommonChars(self, A, B):
		res = ''
		for i in A:
			if i not in B:
				if i not in res:
					res += i
		for i in B:
			if i not in A:
				if i not in res:
					res += i
		if res == '':
			return -1
		return ''.join(sorted(res))


class Solution:

	def UncommonChars(self, A, B):
		out = []
		for each in A:
			if each not in B:
				out.append(each)
		for each in B:
			if each not in A:
				out.append(each)
		if len(out) == 0:
			return -1
		return ''.join(sorted(set(out)))


class Solution:

	def UncommonChars(self, A, B):
		a = set(A)
		b = set(B)
		s = ''
		c = a - b
		d = b - a
		if not c and (not d):
			return -1
		for i in c:
			s += i
		for j in d:
			s += j
		s = ''.join(sorted(s))
		return s


class Solution:

	def UncommonChars(self, A, B):
		l = []
		c = list(set(A) & set(B))
		d = A + B
		for i in d:
			if i not in c:
				if i not in l:
					l.append(i)
		if len(l) == 0:
			return -1
		else:
			return ''.join(sorted(l))


class Solution:

	def UncommonChars(self, A, B):
		a = []
		for i in A:
			if i not in B:
				a.append(i)
		for j in B:
			if j not in A:
				a.append(j)
		a = sorted(set(a))
		a = list(a)
		a = ''.join(a)
		if len(a) == 0:
			return -1
		else:
			return a


class Solution:

	def UncommonChars(self, A, B):
		l = []
		for i in A:
			if i not in B:
				l.append(i)
		for j in B:
			if j not in A:
				l.append(j)
		if len(l) == 0:
			return -1
		l = set(l)
		l = list(l)
		l.sort()
		st = ''
		for i in l:
			st = st + str(i)
		return st


class Solution:

	def UncommonChars(self, A, B):
		un = []
		r = ''
		for i in A:
			if i not in B:
				un.append(i)
		for i in B:
			if i not in A:
				un.append(i)
		c = set(un)
		if un == []:
			return -1
		return r.join(sorted(c))


class Solution:

	def UncommonChars(self, A, B):
		res = ''
		for i in A:
			if i not in B:
				res += i
		for i in B:
			if i not in A:
				res += i
		res = sorted(res)
		res = ''.join(res)
		result = ''
		for i in res:
			if i not in result:
				result += i
		if len(result) == 0:
			return -1
		else:
			return result


class Solution:

	def UncommonChars(self, A, B):
		res = ''
		present = [0] * 26
		for e in A:
			present[ord(e) - ord('a')] = 1
		for e in B:
			if present[ord(e) - ord('a')] == 1 or present[ord(e) - ord('a')] == -1:
				present[ord(e) - ord('a')] = -1
			else:
				present[ord(e) - ord('a')] = 2
		res = ''
		for (i, e) in enumerate(present):
			if e == 1 or e == 2:
				res += chr(i + ord('a'))
		if res:
			return res
		else:
			return -1


class Solution:

	def UncommonChars(self, A, B):
		first = list(set(A).difference(set(B)))
		second = list(set(B).difference(set(A)))
		first.extend(second)
		answer = ''
		for i in sorted(first):
			answer += i
		if answer == '':
			return -1
		else:
			return answer


class Solution:

	def UncommonChars(self, A, B):
		k = ''
		for i in A:
			if i not in B:
				k += i
		for i in B:
			if i not in A:
				k += i
		k = list(k)
		k = sorted(set(k))
		if len(k) == 0:
			return -1
		return ''.join(k)


class Solution:

	def UncommonChars(self, A, B):
		s = ''
		for i in A:
			if i not in B and i not in s:
				s += i
		for j in B:
			if j not in A and j not in s:
				s += j
		s1 = ''.join(sorted(s))
		if len(s) == 0:
			return '-1'
		return s1


class Solution:

	def UncommonChars(self, A, B):
		temp_set_a = set(A)
		temp_set_b = set(B)
		diff = temp_set_a.symmetric_difference(temp_set_b)
		res = list(diff)
		res.sort()
		res_sort = ''.join(res)
		if res_sort == '':
			return '-1'
		else:
			return res_sort


class Solution:

	def UncommonChars(self, A, B):
		a_set = set(A)
		b_set = set(B)
		c = a_set.symmetric_difference(b_set)
		l = list(c)
		count = 0
		for i in l:
			count = count + 1
		if count >= 1:
			d = sorted(c)
			d_str = ''.join(d)
			return d_str
		else:
			return -1


class Solution:

	def UncommonChars(self, A, B):
		if A == B:
			return -1
		else:
			c = []
			for i in A:
				if i not in B and i not in c:
					c.append(i)
			for i in B:
				if i not in A and i not in c:
					c.append(i)
			c.sort()
			if c != []:
				return ''.join(c)
			else:
				return -1


class Solution:

	def UncommonChars(self, A, B):
		s1 = set(A)
		s2 = set(B)
		res1 = s1.difference(s2)
		res2 = s2.difference(s1)
		ans = list(res1.union(res2))
		ans.sort()
		res = ''.join(ans)
		if len(res) > 0:
			return res
		return -1


class Solution:

	def UncommonChars(self, A, B):
		res = ''
		for char in A:
			if char not in B:
				res += char
		for char in B:
			if char not in A:
				res += char
		if len(res) == 0:
			return -1
		return ''.join(sorted(set(res)))


class Solution:

	def UncommonChars(self, A, B):
		v = []
		A = set(A)
		B = set(B)
		for i in A:
			if i not in B:
				v.append(i)
		for j in B:
			if j not in A:
				v.append(j)
		if v:
			x = ''.join(sorted(v))
			return x
		else:
			return -1


class Solution:

	def UncommonChars(self, A, B):
		a = ''
		for i in A:
			if i not in B and i not in a:
				a += i
		for i in B:
			if i not in A and i not in a:
				a += i
		if len(a) != 0:
			a = ''.join(sorted(a))
			return a
		else:
			return -1


class Solution:

	def UncommonChars(self, A, B):
		d = {}
		d1 = {}
		l = []
		for i in A:
			if i not in d:
				d[i] = 1
			else:
				d[i] += 1
		for i in B:
			if i not in d1:
				d1[i] = 1
			else:
				d1[i] += 1
		for i in d:
			if i not in d1:
				l = l + [i]
		for i in d1:
			if i not in d:
				l = l + [i]
		l = sorted(l)
		if len(l) > 0:
			return ''.join(l)
		else:
			return -1


class Solution:

	def UncommonChars(self, A, B):
		l1 = set()
		for i in A:
			if i not in B:
				l1.add(i)
		for i in B:
			if i not in A:
				l1.add(i)
		fin_list = list(l1)
		fin_list.sort()
		if fin_list == []:
			return -1
		else:
			return ''.join(fin_list)


class Solution:

	def UncommonChars(self, A, B):
		A1 = set(A)
		B1 = set(B)
		C1 = A1.union(B1) - A1.intersection(B1)
		ans = []
		for i in C1:
			ans.append(i)
		ans.sort()
		ans2 = ''
		for j in ans:
			ans2 += j
		if len(ans2) == 0:
			return -1
		return ans2


class Solution:

	def UncommonChars(self, A, B):
		a = set(A)
		b = set(B)
		l = list(a.symmetric_difference(b))
		l.sort()
		if l == []:
			return -1
		else:
			return ''.join(l)


class Solution:

	def UncommonChars(self, A, B):
		if A == B:
			return -1
		else:
			us = ''
			for uc1 in A:
				if uc1 not in B:
					us += uc1
			for uc2 in B:
				if uc2 not in A:
					us += uc2
			main = sorted(us)
			ans = ''
			for i in main:
				if i not in ans:
					ans += i
			if ans == '':
				return -1
			else:
				return ans


class Solution:

	def UncommonChars(self, A, B):
		a = set(A)
		b = set(B)
		if sorted(set(a)) == sorted(set(b)):
			return -1
		x = sorted(a.difference(b).union(b.difference(a)))
		return ''.join(x)


class Solution:

	def UncommonChars(self, A, B):
		intersection = sorted(set(A) ^ set(B))
		if intersection:
			return ''.join(intersection)
		return -1


class Solution:

	def UncommonChars(self, A, B):
		A = set(A)
		B = set(B)
		C = ''.join(sorted(A ^ B))
		if C != '':
			return C
		else:
			return -1


class Solution:

	def UncommonChars(self, a, b):
		l = []
		for i in b:
			if i not in a and i not in l:
				l.append(i)
		for j in a:
			if j not in b and j not in l:
				l.append(j)
		s = sorted(l)
		orignal = ''.join(s)
		if len(orignal) == 0:
			return -1
		return orignal


class Solution:

	def UncommonChars(self, A, B):
		sanyam1 = ''
		for char in A:
			if char not in B and sanyam1.count(char) == 0:
				sanyam1 += char
			else:
				pass
		for i in B:
			if i not in A and sanyam1.count(i) == 0:
				sanyam1 += i
			else:
				pass
		if len(sanyam1) <= 0:
			return -1
		else:
			return ''.join(sorted(sanyam1))


class Solution:

	def UncommonChars(self, A, B):
		c = ''
		for i in A:
			if i not in B and c.count(i) == 0:
				c = c + i
		for i in B:
			if i not in A and c.count(i) == 0:
				c += i
		ans = ''
		c = sorted(c)
		if len(c) > 0:
			return ans.join(c)
		else:
			return -1


class Solution:

	def UncommonChars(self, A, B):
		A = set(A)
		B = set(B)
		common = A.intersection(B)
		all = A.union(B)
		uncommon = all.difference(common)
		if uncommon == set():
			return -1
		return ''.join(sorted(list(uncommon)))


class Solution:

	def UncommonChars(self, A, B):
		hmap1 = {}
		hmap2 = {}
		ans = []
		for i in range(len(A)):
			if A[i] in B or A[i] in ans:
				continue
			else:
				ans.append(A[i])
		for j in range(len(B)):
			if B[j] in A or B[j] in ans:
				continue
			else:
				ans.append(B[j])
		if ans == []:
			return -1
		ans = sorted(ans)
		return ''.join(ans)


class Solution:

	def UncommonChars(self, A, B):
		result = []
		for a in range(0, len(A)):
			letra = A[a]
			if B.find(letra) == -1 and result.count(letra) == 0:
				result.append(letra)
		for b in range(0, len(B)):
			letra = B[b]
			if A.find(letra) == -1 and result.count(letra) == 0:
				result.append(letra)
		if len(result) == 0:
			return -1
		else:
			return ''.join(sorted(result))


class Solution:

	def UncommonChars(self, A, B):
		ans = []
		for i in A:
			if i not in B:
				ans += i
		for j in B:
			if j not in A:
				ans += j
		if len(ans) > 0:
			return ''.join(sorted(set(ans)))
		else:
			return -1


class Solution:

	def UncommonChars(self, A, B):
		hmap = {}
		for i in range(26):
			hmap[chr(i + 97)] = []
		for i in range(len(A)):
			hmap[A[i]] += ['A']
		ans = ''
		arr = []
		for i in range(len(B)):
			hmap[B[i]] += ['B']
		for i in range(26):
			if 'A' in hmap[chr(i + 97)] and 'B' not in hmap[chr(i + 97)] or ('A' not in hmap[chr(i + 97)] and 'B' in hmap[chr(i + 97)]):
				ans += chr(i + 97)
		if ans == '':
			return -1
		return ans


class Solution:

	def UncommonChars(self, A, B):
		A = set(A)
		B = set(B)
		A = list(A)
		B = list(B)
		Z = ''
		C = A + B
		for i in C:
			if i in A and i in B:
				continue
			else:
				Z += i
		X = list(Z)
		X.sort()
		Y = ''
		for i in X:
			Y += i
		if len(Y) == 0:
			return -1
		else:
			return Y


class Solution:

	def UncommonChars(self, A, B):
		res = []
		output = ''
		for c in A:
			if c not in B and c not in res:
				res.append(c)
		for c in B:
			if c not in A and c not in res:
				res.append(c)
		if len(res) == 0:
			return -1
		res.sort()
		for c in res:
			output += c
		return output


class Solution:

	def UncommonChars(self, A, B):
		a = set(A).difference(set(B))
		b = set(B).difference(set(A))
		res = list(a) + list(b)
		res.sort()
		if len(res):
			return ''.join(res)
		return -1


class Solution:

	def UncommonChars(self, A, B):
		if A == B:
			return -1
		a = set(A)
		b = set(B)
		result = list(a.difference(b).union(b.difference(a)))
		if len(result) == 0:
			return -1
		result.sort()
		ans = ''
		for e in result:
			ans += e
		return ans