Little Susie loves strings. Today she calculates distances between them. As Susie is a small girl after all, her strings contain only digits zero and one. She uses the definition of Hamming distance:

We will define the distance between two strings s and t of the same length consisting of digits zero and one as the number of positions i, such that s_{i} isn't equal to t_{i}. 

As besides everything else Susie loves symmetry, she wants to find for two strings s and t of length n such string p of length n, that the distance from p to s was equal to the distance from p to t.

It's time for Susie to go to bed, help her find such string p or state that it is impossible.


-----Input-----

The first line contains string s of length n. 

The second line contains string t of length n.

The length of string n is within range from 1 to 10^5. It is guaranteed that both strings contain only digits zero and one.


-----Output-----

Print a string of length n, consisting of digits zero and one, that meets the problem statement. If no such string exist, print on a single line "impossible" (without the quotes).

If there are multiple possible answers, print any of them.


-----Examples-----
Input
0001
1011

Output
0011

Input
000
111

Output
impossible



-----Note-----

In the first sample different answers are possible, namely — 0010, 0011, 0110, 0111, 1000, 1001, 1100, 1101.

Source: codeforces | Difficulty: EASY
Tags: Greedy algorithms


Solutions:
s = list(input())
t = list(input())
n = len(s)
p = list('0' * n)
k = 0
for i in range(n):
	if s[i] == t[i]:
		p[i] = s[i]
	elif k % 2 == 0:
		p[i] = s[i]
		k += 1
	else:
		p[i] = t[i]
		k += 1
if k % 2 == 0:
	print(''.join(p))
else:
	print('impossible')


s = input()
t = input()
diff = []
ans = [None] * len(s)
for i in range(len(s)):
	if s[i] != t[i]:
		diff.append(i)
	else:
		ans[i] = s[i]
if len(diff) % 2 == 1:
	print('impossible')
else:
	for i in range(len(diff) // 2):
		ans[diff[i]] = t[diff[i]]
	for i in range(len(diff) // 2, len(diff)):
		ans[diff[i]] = s[diff[i]]
	print(''.join(ans))


import sys
from os import path
if path.exists('input.txt') and path.exists('output.txt'):
	sys.stdout = open('output.txt', 'w')
	sys.stdin = open('input.txt', 'r')

def main():
	(s, t) = (input(), input())
	n = len(s)
	diff = 0
	answer = []
	for i in range(n):
		if s[i] != t[i]:
			answer.append(s[i] if diff % 2 == 0 else t[i])
			diff += 1
		else:
			answer.append(s[i])
	if diff % 2 == 0:
		print(''.join(answer))
	else:
		print('impossible')
main()


s = list(input())
t = list(input())
ind = []
for i in range(len(s)):
	if s[i] != t[i]:
		ind.append(i)
if len(ind) % 2 != 0:
	print('impossible')
else:
	for j in range(len(ind) // 2):
		if s[ind[j]] == '0':
			s[ind[j]] = '1'
		else:
			s[ind[j]] = '0'
	print(''.join(s))


def dist(s1, s2):
	d = 0
	for i in range(len(s1)):
		if s1[i] != s2[i]:
			d += 1
	return d

def build_str(s1, s2, d):
	s = list(s1)
	for i in range(len(s2)):
		if s2[i] != s1[i] and d > 0:
			s[i] = s2[i]
			d -= 1
			if d == 0:
				break
	return ''.join(s)
s1 = input()
s2 = input()
d = dist(s1, s2)
if d % 2 != 0:
	print('impossible')
else:
	print(build_str(s1, s2, d / 2))


s = input()
t = input()
d = 0
n = len(s)
for i in range(n):
	if s[i] != t[i]:
		d += 1
if d % 2 != 0:
	print('impossible')
	exit()
else:
	p = []
	f = 0
	for i in range(n):
		if s[i] == t[i]:
			p.append(s[i])
		else:
			p.append(s[i] if f == 0 else t[i])
			f = 0 if f == 1 else 1
print(''.join(p))


s = input()
t = input()
n = len(s)
k = 0
for i in range(n):
	if s[i] != t[i]:
		k += 1
if k & 1:
	print('impossible')
	exit()
k >>= 1
r = ''
for i in range(n):
	if s[i] == t[i]:
		r += s[i]
	elif k:
		k -= 1
		r += s[i]
	else:
		r += t[i]
print(r)


a = str(input())
b = str(input())
num = 0
sample = list()
for (i, j) in zip(a, b):
	if i == j:
		sample.append('0')
	else:
		num += 1
		sample.append('1')
if num % 2 > 0:
	print('impossible')
else:
	pos = 0
	flag = True
	while num > 0:
		if sample[pos] == '1':
			num -= 1
			if flag:
				flag = False
				sample[pos] = a[pos]
			else:
				flag = True
				sample[pos] = b[pos]
		pos += 1
	print(''.join(sample))


(s, t) = (input(), input())
a = abs(s.count('1') - t.count('1'))
if a % 2 == 1:
	print('impossible')
else:
	f = 0
	for x in range(len(s)):
		if s[x] != t[x]:
			if f == 0:
				print(s[x], end='')
			else:
				print(t[x], end='')
			f = [1, 0][f]
		else:
			print(s[x], end='')


s = input()
t = input()
p = ''
flag = True
d = 0
for i in range(len(s)):
	if s[i] != t[i]:
		d += 1
		flag = not flag
		if flag:
			p += s[i]
		else:
			p += t[i]
	else:
		p += s[i]
if d % 2 == 0:
	print(p)
else:
	print('impossible')


__author__ = 'artyom'
s = [input(), input()]
(r, d, c) = ('', 0, 0)
for i in range(len(s[0])):
	if s[0][i] == s[1][i]:
		r += s[0][i]
	else:
		r += s[d][i]
		d ^= 1
print(r if d == 0 else 'impossible')


s = input()
t = input()
n = len(s)
x = [-1] * n
c = 0
for i in range(n):
	if s[i] != t[i]:
		c += 1
if c % 2 == 1:
	print('impossible')
else:
	c = c // 2
	for i in range(n):
		if x[i] == -1 and c != 0 and (s[i] != t[i]):
			x[i] = s[i]
			c -= 1
		else:
			x[i] = t[i]
	print(''.join(x))


s = input()
s2 = input()
s3 = ''
f = True
for i in range(len(s)):
	if s[i] == s2[i]:
		s3 += '1'
	elif f:
		s3 += s[i]
		f = not f
	else:
		s3 += s2[i]
		f = not f
if f:
	print(s3)
else:
	print('impossible')


def f(c):
	an = ''
	if c == '0':
		an = '1'
	else:
		an = '0'
	return an
a = input()
b = input()
if a == b:
	print(a)
	exit()
answer = list(a)
k = 0
for i in range(len(a)):
	if a[i] != b[i]:
		k += 1
if k % 2 == 1 or k == 0:
	print('impossible')
	exit()
else:
	v = 0
	for i in range(len(a)):
		if a[i] != b[i]:
			answer[i] = f(answer[i])
			v += 1
		if v == k // 2:
			break
for i in answer:
	print(i, end='')


s1 = input()
s2 = input()
n = len(s1)
lt = []
lt.append([s1[x] for x in range(n)])
lt.append([s2[x] for x in range(n)])
ans = []
cnt = 0
for i in range(n):
	if lt[0][i] == lt[1][i]:
		ans.append(lt[0][i])
	else:
		ans.append(lt[cnt][i])
		cnt ^= 1
if cnt == 1:
	print('impossible')
else:
	print(''.join(ans))


s = input()
t = input()
n = len(s)
j = 0
p = [0] * n
for i in range(0, n):
	if s[i] != t[i]:
		if j % 2 == 0:
			p[i] = t[i]
		else:
			p[i] = s[i]
		j += 1
	else:
		p[i] = s[i]
if j % 2 != 0:
	print('impossible')
else:
	for i in range(0, n):
		print(p[i], end='')


a = input()
a1 = input()
a2 = []
n = 0
a3 = ''
for i in range(len(a)):
	if a[i] == a1[i]:
		a2.append(True)
	else:
		a2.append(False)
		n += 1
if n % 2 > 0:
	print('impossible')
else:
	n /= 2
	for i in range(len(a)):
		if n > 0:
			if a2[i] == False:
				if a[i] == '0':
					a3 += '1'
				else:
					a3 += '0'
				n -= 1
			else:
				a3 += a[i]
		else:
			a3 += a[i]
	print(a3)


import sys
a = input()
b = input()
c = list(a)
cnt = 0
for i in range(0, len(a)):
	if a[i] != b[i]:
		cnt += 1
if cnt % 2 == 1:
	print('impossible')
	sys.exit()
ct = 0
for i in range(0, len(a)):
	if a[i] != b[i] and ct < cnt / 2:
		ct += 1
		c[i] = b[i]
print(''.join(c))


a = input()
b = input()
n = len(a)
ans = []
k = 0
for i in range(n):
	if a[i] == b[i]:
		ans.append('0')
	elif k > 0:
		k -= 1
		ans.append(a[i])
	else:
		k += 1
		ans.append(b[i])
if k != 0:
	print('impossible')
else:
	print(''.join(ans))


import sys
import math
import bisect

def solve(s, t):
	n = len(s)
	A = []
	for i in range(n):
		if s[i] != t[i]:
			A.append(i)
	if len(A) % 2 == 1:
		return None
	B = list(s)
	for i in range(len(A) // 2):
		j = A[i]
		if B[j] == '0':
			B[j] = '1'
		elif B[j] == '1':
			B[j] = '0'
	return ''.join(B)

def main():
	s = input()
	t = input()
	ans = solve(s, t)
	if ans:
		print(ans)
	else:
		print('impossible')
main()


from sys import stdout
a = input()
b = input()
diff = 0
for i in range(0, len(a)):
	if a[i] != b[i]:
		diff += 1
if diff % 2 == 1:
	print('impossible')
	exit()
diff /= 2
for i in range(0, len(a)):
	if a[i] == b[i]:
		stdout.write(a[i])
	elif diff > 0:
		stdout.write(a[i])
		diff -= 1
	else:
		stdout.write(b[i])
print()


s = input()
t = input()
result = 0
for (x, y) in zip(s, t):
	if x != y:
		result += 1
if result % 2 == 1:
	print('impossible')
else:
	n = ''
	(result, i) = (result // 2, 0)
	for (x, y) in zip(s, t):
		if x != y:
			result -= 1
		n += x
		i += 1
		if result == 0:
			break
	print(n + t[i:])


s = input()
t = input()
raz = 0
for i in range(len(s)):
	if s[i] != t[i]:
		raz += 1
if raz % 2 == 0:
	raz //= 2
	ans = ''
	for i in range(len(s)):
		if s[i] == t[i]:
			ans = ans + s[i]
		else:
			if raz == 0:
				ans = ans + t[i:]
				break
			ans = ans + s[i]
			raz -= 1
	print(ans)
else:
	print('impossible')


s = input()
t = input()
sa = s.count('0')
sb = s.count('1')
ta = t.count('0')
tb = t.count('1')
n = len(s)
L = abs(sa - ta) + abs(sb - tb)
L /= 2
if L % 2 == 1:
	print('impossible')
else:
	ans = ''
	c = 0
	for i in range(n):
		if s[i] == t[i]:
			ans += s[i]
		elif c == 0:
			ans += s[i]
			c = 1
		else:
			ans += t[i]
			c = 0
	print(ans)


s = input()
t = input()
n = len(s)
p = [0] * n
dist = 0
for i in range(n):
	if s[i] != t[i]:
		dist += 1
		if dist % 2 == 1:
			p[i] = int(s[i])
		else:
			p[i] = int(t[i])
	else:
		p[i] = int(s[i])
if dist % 2:
	print('impossible')
else:
	for x in p:
		print(x, end='')


def main():
	(l, f) = ([], True)
	for (a, b) in zip(input(), input()):
		if a == b:
			l.append(a)
		elif f:
			l.append(a)
			f = False
		else:
			l.append(b)
			f = True
	print(''.join(l if f else 'impossible'))
main()


s1 = input()
s2 = input()
n = len(s1)
ans = ''
x1 = 0
x2 = 0
for i in range(n):
	if s1[i] != s2[i]:
		if x1 >= x2:
			ans += s2[i]
			x2 += 1
		else:
			ans += s1[i]
			x1 += 1
	else:
		ans += s1[i]
if x1 != x2:
	print('impossible')
else:
	print(ans)


s = input().strip()
t = input().strip()
d = 0
for i in range(len(s)):
	if s[i] != t[i]:
		d += 1
if d % 2 != 0:
	print('impossible')
else:
	res = list(s)
	k = 0
	for i in range(len(s)):
		if s[i] == t[i]:
			continue
		k += 1
		if k > d // 2:
			res[i] = t[i]
	print(''.join(res))


first = input()
second = input()
index = 0
fark = 0
str = ''
while index <= len(first) - 1:
	if first[index] != second[index]:
		fark += 1
		if fark % 2 == 0:
			str += second[index]
		else:
			str += first[index]
	else:
		str += first[index]
	index += 1
if fark % 2 == 0:
	print(str)
else:
	print('impossible')


s = input()
t = input()
c = 0
for i in range(len(s)):
	if s[i] != t[i]:
		c += 1
if c == 0:
	print(s)
elif c % 2 != 0:
	print('impossible')
else:
	for i in range(len(s)):
		if s[i] == t[i]:
			print(s[i], end='')
		elif c % 2 == 0:
			print(s[i], end='')
			c -= 1
		else:
			print(t[i], end='')
			c -= 1


import operator

def gen(s, t, c):
	for (a, b) in zip(s, t):
		if c and a != b:
			c -= 1
			yield a
		else:
			yield b
s = input()
t = input()
count = len(s) - sum(map(operator.eq, s, t))
if count & 1 == 0:
	print(str.join('', gen(s, t, count // 2)))
else:
	print('impossible')


s1 = input().strip()
l = len(s1)
n1 = int(s1, 2)
n2 = int(input(), 2)
n = n1 ^ n2
sn = [i for i in bin(n)[2:]]
m = sum(map(int, sn))
if m % 2 == 1:
	print('impossible')
else:
	sn1 = [i for i in bin(n & n1)[2:]]
	m1 = sum(map(int, sn1))
	sn2 = [i for i in bin(n & n2)[2:]]
	m2 = sum(map(int, sn2))
	ans = n1 & n2
	c = 0
	if m1 > m2:
		t = (m1 - m2) // 2
		for i in range(l):
			if sn1[i] == '1':
				sn1[i] = '0'
				c += 1
				if c == m1 - t:
					break
		ans |= int(''.join(sn1), 2)
	elif m2 > m1:
		t = (m2 - m1) // 2
		for i in range(l):
			if sn2[i] == '1':
				sn2[i] = '0'
				c += 1
				if c == m2 - t:
					break
		ans |= int(''.join(sn2), 2)
	print(bin(ans)[2:].zfill(l))


s = input()
t = input()
diff = 0
p = [''] * len(s)
last = 1
for (i, pair) in enumerate(zip(s, t)):
	(a, b) = pair
	if a != b:
		diff += 1
		if last == 1:
			p[i] = str(int(s[i]) ^ 1)
		else:
			p[i] = str(int(t[i]) ^ 1)
		last ^= 1
	else:
		p[i] = s[i]
if diff & 1:
	print('impossible')
else:
	p = ''.join(p)
	print(p)


s = input()
t = input()
ans = ''
good = True
for i in range(s.__len__()):
	if s[i] == t[i]:
		ans += str(s[i])
	elif good:
		ans += str(s[i])
		good = False
	else:
		ans += str(t[i])
		good = True
if good:
	print(ans)
else:
	print('impossible')


s1 = input()
s2 = input()
a = 0
l = len(s1)
for i in range(l):
	if s1[i] != s2[i]:
		a += 1
if a % 2 == 1:
	print('impossible')
	exit()
a //= 2
res = ''
for i in range(l):
	if s1[i] == s2[i] or a == 0:
		res += s1[i]
	else:
		a -= 1
		res += s2[i]
print(res)


(a, b) = (input(), input())
d = 0
s = ''
j = 0
for i in range(len(a)):
	if a[i] != b[i]:
		j += 1
		if j % 2 == 0:
			s += a[i]
		else:
			s += b[i]
	else:
		s += '0'
if j % 2 == 0:
	print(s)
else:
	print('impossible')


s = input()
t = input()
n = len(s)
sum = 0
for i in range(0, n):
	if s[i] != t[i]:
		sum += 1
if sum & 1:
	print('impossible')
else:
	sum /= 2
	for i in range(0, n):
		if sum > 0 and s[i] != t[i]:
			print(t[i], end='')
			sum -= 1
		else:
			print(s[i], end='')
	print()


a = list(input())
b = list(input())
nums = []
ras = 0
for i in range(len(a)):
	if not a[i] == b[i]:
		ras += 1
		nums.append(i)
if ras % 2:
	print('impossible')
else:
	for i in range(ras // 2):
		if a[nums[i]] == '1':
			a[nums[i]] = '0'
		else:
			a[nums[i]] = '1'
	print(''.join(a))


g = input()
h = input()
c = 0
x = []
for i in range(len(g)):
	if int(g[i]) ^ int(h[i]) == 1:
		if c % 2 == 0:
			x += [g[i]]
		else:
			x += [h[i]]
		c += 1
	else:
		x += [g[i]]
if c % 2 == 0:
	for i in x:
		print(i, end='')
else:
	print('impossible')


a = input()
b = input()
c = []
f = 0
for i in range(len(a)):
	if a[i] == b[i]:
		c.append(a[i])
	else:
		c.append('1' if a[i] == '1' and (not f & 1) or (a[i] == '0' and f & 1) else '0')
		f += 1
if f & 1:
	print('impossible')
else:
	print(''.join(c))


(a, b) = (input(), input())
n = len(a)
d = [False for i in range(n)]
dn = 0
for i in range(n):
	if a[i] != b[i]:
		d[i] = True
		dn += 1
if dn % 2 == 0:
	dn = dn >> 1
	for i in range(n):
		if d[i] == False or dn == 0:
			print(a[i], end='')
		else:
			print('0' if a[i] == '1' else '1', end='')
			dn -= 1
	print()
else:
	print('impossible')


import sys
Input = sys.stdin.readline
s1 = Input()
s2 = Input()
c = x = 0
final = ''
for i in range(len(s1)):
	if s1[i] != s2[i]:
		c += 1
		if x:
			final += s1[i]
			x = 0
		else:
			final += s2[i]
			x = 1
	else:
		final += s1[i]
if c % 2 == 0:
	print(final)
else:
	print('impossible')


(a, b, c, d) = (input(), input(), 0, 0)
for i in range(len(a)):
	if a[i] != b[i]:
		c += 1
if c % 2:
	print('impossible')
else:
	e = ''
	for i in range(len(a)):
		if a[i] != b[i]:
			d += 1
			if d <= c // 2:
				e += a[i]
			else:
				e += b[i]
		else:
			e += b[i]
	print(e)


s = input()
t = input()
l = []
for i in range(len(s)):
	if s[i] != t[i]:
		l.append(i)
if len(l) % 2:
	print('impossible')
elif l:
	ss = l[len(l) // 2]
	print(s[:ss] + t[ss:])
else:
	print(s)


s = input()
t = input()
count_different = 0
for i in range(len(s)):
	if s[i] != t[i]:
		count_different += 1
if count_different % 2 == 1:
	print('impossible')
else:
	k = count_different // 2
	ans = ''
	for i in range(len(s)):
		if s[i] == t[i]:
			ans += s[i]
		else:
			if k > 0:
				ans += s[i]
			else:
				ans += t[i]
			k -= 1
	print(ans)


a = input()
b = input()
c = 0
for i in range(len(a)):
	if a[i] != b[i]:
		c += 1
if c % 2 == 1:
	print('impossible')
else:
	c //= 2
	res = list(a)
	for i in range(len(a)):
		if c > 0 and a[i] != b[i]:
			res[i] = b[i]
			c -= 1
	print(''.join(res))


s = list(input())
t = input()
ti = 0
for i in range(len(s)):
	if s[i] != t[i]:
		ti += 1
		if ti % 2 != 0:
			s[i] = t[i]
if ti % 2 == 0:
	print(''.join(s))
else:
	print('impossible')


s = input()
t = input()
ans = ''
c = 0
for i in range(len(s)):
	if s[i] == t[i]:
		ans += s[i]
	elif c == 0:
		ans += s[i]
		c = 1
	elif c == 1:
		ans += t[i]
		c = 0
print('impossible') if c == 1 else print(ans)


s = input()
t = input()
n = len(s)
d1 = d2 = 0
for (x, y) in zip(s, t):
	if x != y:
		d2 += 1
if d2 == 0:
	print(s)
	exit()
s = list(s)
ans = 'impossible'
for i in range(n):
	if s[i] == t[i]:
		continue
	if d1 != d2:
		s[i] = '0' if s[i] == '1' else '1'
		d1 += 1
		d2 -= 1
	else:
		ans = ''.join(s)
		break
print(ans)


def calc(s):
	count = 0
	for c in s:
		if c == '3':
			count += 1
	return count
s1 = input()
s2 = input()
s3 = ['' for i in range(len(s2))]
for i in range(len(s2)):
	if s1[i] != s2[i]:
		s3[i] = '3'
	else:
		s3[i] = s1[i]
threes = calc(s3)
if threes % 2 == 1:
	print('impossible')
else:
	count = 0
	for i in range(len(s3)):
		if s3[i] == '3':
			if count % 2 == 0:
				s3[i] = s2[i]
				count += 1
			else:
				s3[i] = s1[i]
				count += 1
	print(''.join(s3))


ss = input()
tt = input()
s = int(ss, base=2)
t = int(tt, base=2)
d = 0
for c in bin(s ^ t):
	if c == '1':
		d += 1
ans = ''
if d % 2 == 0:
	k = d // 2
	for i in range(len(ss)):
		if ss[i] == tt[i]:
			ans += ss[i]
		elif k > 0 and ss[i] != tt[i]:
			ans += ss[i]
			k -= 1
		else:
			ans += tt[i]
	print(ans)
else:
	print('impossible')


a = input()
b = input()
n = len(a)
d = []
p = 0
for (i, j) in zip(a, b):
	if i != j:
		d.append(p)
	p += 1
if len(d) % 2:
	print('impossible')
else:
	ans = list(a)
	for i in d[:len(d) // 2]:
		ans[i] = b[i]
	print(''.join(ans))


s = input()
t = input()
is_impossible = False
res = []
count = 0
for i in range(len(s)):
	if s[i] != t[i]:
		count += 1
		if count % 2 == 1:
			is_impossible = True
			res.append(s[i])
		else:
			is_impossible = False
			res.append(t[i])
	else:
		res.append(t[i])
if is_impossible:
	print('impossible')
else:
	print(''.join(res))


s = input()
t = input()
n = len(s)
p = [i for i in range(n)]
s_counter = 0
t_counter = 0
for i in range(n):
	if s[i] == t[i]:
		p[i] = s[i]
	elif s_counter <= t_counter:
		p[i] = s[i]
		s_counter += 1
	else:
		p[i] = t[i]
		t_counter += 1
if s_counter != t_counter:
	print('impossible')
else:
	for i in range(n):
		print(p[i], end='')
	print()


S = input()
T = input()
k = 0
for i in range(len(S)):
	if S[i] != T[i]:
		k = k + 1
if k % 2 != 0:
	print('impossible')
else:
	t = 1
	P = ''
	for i in range(len(S)):
		if S[i] == T[i]:
			P = P + S[i]
		elif t == 1:
			P = P + S[i]
			t = t + 1
		else:
			P = P + T[i]
			t = t - 1
	print(P)


import math, string, itertools, fractions, heapq, collections, re, array, bisect, sys, copy, functools
sys.setrecursionlimit(10 ** 7)
inf = 10 ** 20
eps = 1.0 / 10 ** 10
mod = 10 ** 9 + 7
dd = [(-1, 0), (0, 1), (1, 0), (0, -1)]
ddn = [(-1, 0), (-1, 1), (0, 1), (1, 1), (1, 0), (1, -1), (0, -1), (-1, -1)]

def LI():
	return list(map(int, sys.stdin.readline().split()))

def LLI():
	return [tuple(map(int, l.split())) for l in sys.stdin]

def LI_():
	return [int(x) - 1 for x in sys.stdin.readline().split()]

def LF():
	return [float(x) for x in sys.stdin.readline().split()]

def LS():
	return sys.stdin.readline().split()

def I():
	return int(sys.stdin.readline())

def F():
	return float(sys.stdin.readline())

def S():
	return input()

def pf(s):
	return print(s, flush=True)

def main():
	s = S()
	t = S()
	l = len(s)
	k = 0
	r = []
	for i in range(l):
		if s[i] == t[i]:
			r.append(s[i])
		else:
			k += 1
			if k % 2 == 0:
				r.append(s[i])
			else:
				r.append(t[i])
	if k % 2 == 0:
		return ''.join(r)
	return 'impossible'
print(main())


s = input()
t = input()
if s == t:
	print(s)
	exit(0)
p = []
dif = 0
for i in range(len(s)):
	if s[i] != t[i]:
		dif += 1
if dif % 2 == 1:
	print('impossible')
	exit(0)
prev = True
for i in range(len(s)):
	if s[i] == t[i]:
		p.append(s[i])
	elif dif:
		p.append(s[i] if prev else t[i])
		prev = False if prev else True
print(''.join(p))


(s, t) = (input(), input())
h = [i for i in range(len(s)) if s[i] != t[i]]
if not len(h) % 2:
	ans = [x for x in s]
	for i in range(len(h) // 2):
		ans[h[i]] = t[h[i]]
	print(''.join(ans))
else:
	print('impossible')


s = input()
p = input()
ans = ''
cnt = 0
for i in range(len(s)):
	if s[i] == p[i] == '0':
		ans += '1'
	elif s[i] == p[i] == '1':
		ans += '0'
	elif s[i] != p[i]:
		if cnt % 2 == 0:
			ans += p[i]
		else:
			ans += s[i]
		cnt += 1
if cnt % 2 == 1:
	print('impossible')
else:
	print(ans)


S = input()
T = input()
N = len(S)
cnt = 0
for i in range(N):
	if S[i] != T[i]:
		cnt += 1
if cnt % 2 != 0:
	print('impossible')
	exit()
cntd = cnt // 2
ans = list(S)
for i in range(N):
	if cntd == 0:
		break
	if S[i] != T[i]:
		ans[i] = '0' if S[i] == '1' else '1'
		cntd -= 1
print(''.join(ans))


n = input()
m = input()
c = 1
ans = []
for (i, j) in zip(n, m):
	if i == j:
		ans.append(i)
	else:
		if c % 2 == 1:
			ans.append(i)
		else:
			ans.append(j)
		c += 1
if c % 2 == 0:
	print('impossible')
else:
	print(''.join(map(str, ans)))


c = ''
t = 0
a = (input(), input())
for i in range(len(a[0])):
	if a[0][i] != a[1][i]:
		c += a[t % 2][i]
		t += 1
	else:
		c += str(int(not int(a[0][i])))
print(c if not t % 2 else 'impossible')


n = list(input())
k = list(input())
j = 0
for i in range(len(n)):
	if n[i] != k[i]:
		j = j + 1
		if j % 2 == 0:
			n[i] = k[i]
if j % 2 == 0:
	print(*n, sep='')
else:
	print('impossible')


s = input()
t = input()
n = len(s)
h = 0
for i in range(n):
	if s[i] != t[i]:
		h += 1
if h % 2 == 1:
	print('impossible')
else:
	c = 0
	p = ''
	for i in range(0, n):
		if s[i] != t[i]:
			if c < h // 2:
				p += t[i]
			else:
				p += s[i]
			c += 1
		else:
			p += s[i]
	print(p)


s = input()
t = input()
diffcnt = 0
for (i, j) in zip(s, t):
	if i != j:
		diffcnt += 1
if diffcnt % 2 == 1:
	print('impossible')
	return
cnt = 0
ans = []
for (i, j) in zip(s, t):
	if i == j:
		ans.append(i)
	else:
		ans.append(i if cnt % 2 == 0 else j)
		cnt += 1
print(''.join(ans))


s = str(input())
t = str(input())
ans = ''
flag = 1
c = 0
for i in range(len(s)):
	if s[i] != t[i]:
		c += 1
		if flag:
			ans += s[i]
		else:
			ans += t[i]
		flag = 1 - flag
	else:
		ans += s[i]
print('impossible' if c & 1 else ans)


s = input()
t = input()
e = 0
count_1 = 0
count_2 = 0
s1 = ''
for i in range(len(s)):
	if s[i] == t[i]:
		s1 = s1 + s[i]
	else:
		if e == 0:
			s1 = s1 + s[i]
			count_1 = count_1 + 1
		else:
			s1 = s1 + t[i]
			count_2 = count_2 + 1
		e = 1 - e % 2
if count_1 == count_2:
	print(s1)
else:
	print('impossible')


current = 0
answer = []
s = [x for x in input()]
t = [x for x in input()]
for (x, y) in zip(s, t):
	if x != y:
		answer.append([x, y][current])
		current = 1 - current
	else:
		answer.append(x)
print('impossible' if current else ''.join(answer))


S = input()
T = input()
P = ''
c = 0
A = [0] * len(S)
for i in range(len(S)):
	if S[i] != T[i]:
		c = c + 1
		A[i] = 1
if c % 2 == 0:
	for i in range(len(S)):
		if A[i] == 1:
			c = c - 1
			if c % 2 == 0:
				P = P + T[i]
			else:
				P = P + S[i]
		else:
			P = P + S[i]
	print(P)
else:
	print('impossible')


import sys
s = input()
t = input()
count = 0
for i in range(len(s)):
	if s[i] != t[i]:
		count += 1
if count % 2 == 1:
	print('impossible')
else:
	k = 1
	for i in range(len(s)):
		if s[i] != t[i]:
			if k == 1:
				sys.stdout.write(s[i])
				k = 2
			else:
				sys.stdout.write(t[i])
				k = 1
		else:
			sys.stdout.write(s[i])


a = input()
b = input()
n = len(a)
c = [0] * n
count = 0
for i in range(n):
	if a[i] != b[i]:
		count += 1
		c[i] = [a[i], b[i]][count % 2]
	else:
		c[i] = a[i]
if count % 2 == 1:
	print('impossible')
else:
	print(*c, sep='')


s = input()
t = input()
a = len(s)
n = 0
string = ''
for z in range(a):
	p = s[z]
	q = t[z]
	condition1 = p == '0' and q == '1'
	condition2 = p == '1' and q == '0'
	if condition1 or condition2:
		if n % 2 == 0:
			string += str(1 - int(p))
		else:
			string += p
		n += 1
	else:
		string += p
if n % 2 == 0:
	print(string)
else:
	print('impossible')


s = input()
t = input()
count = 0
for i in range(len(s)):
	if s[i] != t[i]:
		count += 1
if count % 2 != 0:
	print('impossible')
else:
	count = 0
	for i in range(len(s)):
		if s[i] != t[i]:
			if count % 2 == 0:
				print(s[i], end='')
			else:
				print(t[i], end='')
			count += 1
		else:
			print(s[i], end='')


s = input()
t = input()
cnt = 0
n = len(s)
res = []
for i in range(n):
	if s[i] != t[i]:
		cnt += 1
		res.append(i)
if cnt % 2 != 0:
	print('impossible')
	quit()
else:
	p = list(t)
	for i in range(cnt // 2):
		if p[res[i]] == '0':
			p[res[i]] = '1'
		else:
			p[res[i]] = '0'
	print(''.join(map(str, p)))


f = input()
u = input()
(result, ch) = ('', 0)
for i in range(len(f)):
	if f[i] != u[i]:
		result += f[i] if ch else u[i]
		ch ^= 1
	else:
		result += f[i]
print(result if ch == 0 else 'impossible')


s = list(map(int, input()))
t = list(map(int, input()))
n = len(s)
(cnt, flag) = (0, 0)
for i in range(n):
	if s[i] != t[i]:
		cnt += 1
if cnt % 2 != 0:
	print('impossible')
else:
	for k in range(n):
		if s[k] != t[k] and flag == 0:
			s[k] = t[k]
			flag = 1
		elif s[k] != t[k] and flag == 1:
			flag = 0
	print(*s, sep='')


s = list(map(int, list(input())))
t = list(map(int, list(input())))
d = 0
for i in range(len(s)):
	if s[i] != t[i]:
		d += 1
if d % 2 == 1:
	print('impossible')
else:
	d = d // 2
	w = ''
	for i in range(len(s)):
		if s[i] != t[i] and d > 0:
			w += str(s[i])
			d -= 1
		else:
			w += str(t[i])
	print(w)


a = list(map(int, input()))
b = list(map(int, input()))
n = 0
x = []
ans = a.copy()
for i in range(len(a)):
	if a[i] != b[i]:
		n += 1
		x.append(i)
if n % 2 != 0:
	print('impossible')
else:
	for i in range(n // 2):
		ans[x[i]] = b[x[i]]
	print(''.join(map(str, ans)))


def flip(c):
	if c == '1':
		return '0'
	else:
		return '1'
s = input()
t = input()
c = list(s)
b = []
n = len(s)
m = 0
for i in range(n):
	if s[i] != t[i]:
		m += 1
		b.append(i)
if m % 2 == 1:
	print('impossible')
else:
	x = m // 2
	for i in range(x):
		y = b[i]
		c[y] = flip(c[y])
	print(''.join(c))


a = input()
b = input()
l = len(a)
c = ''
n = 0
for i in range(l):
	n += abs(int(a[i]) - int(b[i]))
if n % 2:
	print('impossible')
	exit(0)
for i in range(l):
	if a[i] == b[i]:
		c += a[i]
	elif n == 0:
		c += a[i]
		n = 1
	else:
		c += b[i]
		n = 0
print(c)


st1 = input()
st2 = input()
n = len(st1)
changes = 0
for i in range(n):
	if st1[i] != st2[i]:
		changes = changes + 1
if changes % 2 == 1:
	print('impossible')
else:
	half = changes / 2
	index = 0
	answer = ''
	while half > 0:
		if st1[index] != st2[index]:
			answer = answer + st2[index]
			half = half - 1
		else:
			answer = answer + st1[index]
		index = index + 1
	while index < n:
		answer = answer + st1[index]
		index = index + 1
	print(answer)


s1 = input()
s2 = input()
k = 0
for i in range(len(s1)):
	if s1[i] != s2[i]:
		k += 1
if k % 2:
	print('impossible')
else:
	a = 0
	for i in range(len(s1)):
		if s1[i] != s2[i]:
			if a < k // 2:
				print(s1[i], end='')
			else:
				print(s2[i], end='')
			a += 1
		else:
			print(s1[i], end='')


import os
import sys
from io import BytesIO, IOBase

def main():
	s = input()
	t = input()
	n = len(s)
	ans = []
	reqs = 0
	reqt = 0
	chk = 0
	for x in range(n):
		if s[x] != t[x]:
			if chk == 0:
				ans.append(str(int(s[x]) ^ 1))
				reqs += 1
				chk = 1
			else:
				ans.append(str(int(t[x]) ^ 1))
				reqt += 1
				chk = 0
		else:
			ans.append(str(int(t[x]) ^ 1))
	if reqs == reqt:
		print(''.join(ans))
	else:
		print('impossible')
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
main()


import math, string, itertools, fractions, heapq, collections, re, array, bisect
from itertools import chain, dropwhile, permutations, combinations
from collections import defaultdict

def main(s, t):
	d = sum([i != j for (i, j) in zip(s, t)])
	n = len(s)
	if d % 2 == 1:
		print('impossible')
		return
	s = list(s)
	for i in range(n):
		if s[i] != t[i]:
			s[i] = t[i]
			d -= 2
			if d == 0:
				print(''.join(s))
				return
	print(''.join(s))

def main_input(info=0):
	s = input()
	t = input()
	main(s, t)
main_input()


s = list(map(str, input()))
t = list(map(str, input()))
dis = 0
for i in range(len(s)):
	if s[i] != t[i]:
		dis += 1
if dis % 2:
	print('impossible')
else:
	k = dis // 2
	for i in range(len(s)):
		if s[i] != t[i]:
			k -= 1
			t[i] = s[i]
		if k == 0:
			break
	print(*t, sep='')


def stringDistance(s1, s2, l):
	dist = 0
	for i in range(l):
		if s1[i] != s2[i]:
			dist += 1
	return dist

def stringReplace(s, i):
	if s[i] == '0':
		s[i] = '1'
	else:
		s[i] = '0'
	return s

def getNext(s, t, n):
	p = s[:]
	i = 0
	while n > 0:
		if t[i] != p[i]:
			n -= 1
			p = stringReplace(p, i)
		i += 1
	return p

def getP(s, t, l):
	dist = stringDistance(s, t, l)
	if dist % 2:
		return None
	n_changes = int(dist / 2)
	p = getNext(s, t, n_changes)
	p = ''.join(p)
	return p
s = input()
s = list(s)
t = input()
t = list(t)
l = len(s)
p = getP(s, t, l)
if p is None:
	print('impossible')
else:
	print(p)


n = input()
m = input()
a = ''
c = 0
for i in range(len(n)):
	if n[i] == m[i]:
		a += n[i]
	else:
		c += 1
		a += [n[i], m[i]][c % 2]
	if i == len(n) - 1 and c % 2:
		exit(print('impossible'))
print(a)


a = input()
b = input()
f = True
aux = [0] * len(a)
for i in range(len(a)):
	if a[i] != b[i]:
		if f:
			aux[i] = a[i]
			f = False
		else:
			aux[i] = b[i]
			f = True
if f:
	print(''.join(map(str, aux)))
else:
	print('impossible')


s = input()
t = input()
c = 0
ans = []
for i in range(len(s)):
	if s[i] == t[i]:
		ans.append(s[i])
	else:
		if c % 2 == 1:
			ans.append(s[i])
		else:
			ans.append(t[i])
		c += 1
if c % 2 != 0:
	print('impossible')
else:
	print(''.join(map(str, ans)))


s = input()
t = input()
n = len(s)
l = []
dist = 0
for i in range(n):
	if s[i] != t[i]:
		dist += 1
if dist % 2:
	print('impossible')
else:
	flag = 0
	for i in range(n):
		if s[i] == t[i]:
			l.append(s[i])
		elif flag == 0:
			l.append(s[i])
			flag = 1
		else:
			l.append(t[i])
			flag = 0
	print(''.join(l))


s = list(input())
t = list(input())
n = len(s)
res = []
turn = 0
for i in range(n):
	if s[i] == t[i]:
		res.append(s[i])
	else:
		turn += 1
		if turn % 2 == 0:
			res.append(s[i])
		else:
			res.append(t[i])
if turn % 2 != 0:
	print('impossible')
else:
	print(''.join(res))


n = input()
s = input()
l = []
t = list('0' * len(n))
for i in range(len(n)):
	if n[i] != s[i]:
		l.append(i)
		t[i] = n[i]
	else:
		t[i] = n[i]
if len(l) % 2 == 0:
	i = 0
	while i < len(l):
		if i % 2 == 0:
			t[l[i]] = s[l[i]]
		else:
			t[l[i]] = n[l[i]]
		i += 1
	print(''.join(t))
else:
	print('impossible')


t = input()
s = input()
k = 0
p = []
for i in range(len(s)):
	if s[i] != t[i]:
		if k % 2 == 1:
			p.append(s[i])
		else:
			p.append(t[i])
		k += 1
	else:
		p.append(s[i])
if k % 2 == 1:
	print('impossible')
else:
	for i in p:
		print(i, end='')


s = input()
t = input()
p = ''
c = 0
a = 0
for i in range(len(s)):
	k = s[i] != t[i]
	c += k
	if k:
		p += [s[i], t[i]][a % 2]
		a += 1
	else:
		p += '0'
print([p, 'impossible'][c % 2 == 1])


s = input()
t = input()
n = len(s)
dist = 0
for i in range(n):
	if s[i] != t[i]:
		dist += 1
if dist % 2 == 1:
	print('impossible')
else:
	p = ''
	flag = 0
	for i in range(n):
		if s[i] != t[i] and flag == 0:
			p += s[i]
			flag = flag ^ 1
		elif s[i] != t[i] and flag == 1:
			p += t[i]
			flag = flag ^ 1
		elif s[i] == t[i]:
			p += s[i]
	print(p)


from sys import stdin
s = stdin.readline()
t = stdin.readline()
ls = len(s) - 1
res = [''] * ls
c = 0
r = 0
for i in range(0, ls):
	if s[i] != t[i]:
		r += 1
		if c == 0:
			if s[i] == '0':
				res[i] = '1'
			else:
				res[i] = '0'
			c = 1
		else:
			if t[i] == '0':
				res[i] = '1'
			else:
				res[i] = '0'
			c = 0
	else:
		res[i] = s[i]
if r % 2 != 0:
	print('impossible')
else:
	print(''.join(res))


s = input()
t = input()
n = len(s)
d1 = 0
d2 = sum((s[i] != t[i] for i in range(n)))
ans = 'impossible'
if d2 == 0:
	ans = s
else:
	s = list(s)
	for i in range(n):
		if s[i] != t[i]:
			if d1 != d2:
				s[i] = '0' if s[i] == '1' else '1'
				d1 += 1
				d2 -= 1
			else:
				ans = ''.join(s)
				break
print(ans)


a = input()
b = input()
l = []
for i in range(len(a)):
	if a[i] != b[i]:
		l.append(i)
if len(l) % 2:
	print('impossible')
elif l:
	i = l[len(l) // 2]
	print(a[:i] + b[i:])
else:
	print(a)


s1 = str(input())
t1 = str(input())
s = [int(i) for i in s1]
t = [int(i) for i in t1]
n = len(s)
j = 0
l = []
for i in range(n):
	if s[i] == t[i]:
		l.append(s[i])
	elif j == 0:
		l.append(s[i])
		j = 1
	else:
		l.append(t[i])
		j = 0
if j == 0:
	p = ''
	for i in l:
		p += str(i)
	print(p)
else:
	print('impossible')


s1 = input()
s2 = input()
cnt = 0
s = ''
for i in range(len(s1)):
	if s1[i] != s2[i]:
		if cnt % 2 == 0:
			s += s1[i]
		else:
			s += s2[i]
		cnt += 1
	else:
		s += s1[i]
if cnt % 2 == 0:
	print(s)
else:
	print('impossible')


a = list(input())
b = list(input())
c = 0
ans = [0] * len(a)
f = 1
for i in range(len(a)):
	if a[i] != b[i]:
		if f:
			ans[i] = a[i]
		else:
			ans[i] = b[i]
		f = 1 - f
		c += 1
	else:
		ans[i] = a[i]
if c % 2 != 0:
	print('impossible')
else:
	print(*ans, sep='')


def main():
	s = input()
	t = input()
	n = len(s)
	c = 0
	for i in range(n):
		c += s[i] != t[i]
	if c % 2:
		print('impossible')
		return
	ans = ''
	x = 0
	for i in range(n):
		if s[i] == t[i]:
			ans += s[i]
		else:
			if 2 * x < c:
				ans += s[i]
			else:
				ans += t[i]
			x += 1
	print(ans)
main()


s = input()
t = input()
c = 0
n = len(s)
for j in range(n):
	if s[j] != t[j]:
		c += 1
if c % 2 != 0:
	print('impossible')
else:
	c1 = 0
	c2 = 0
	p = ''
	for j in range(n):
		if s[j] == t[j]:
			p += s[j]
		elif c1 < c // 2:
			c1 += 1
			p += s[j]
		else:
			p += t[j]
	print(p)


s = input()
t = input()

def hamming_distance(a, b):
	n = len(a)
	distance = 0
	for i in range(n):
		if a[i] != b[i]:
			distance += 1
	return distance
d = hamming_distance(s, t)
if d % 2 != 0:
	print('impossible')
else:
	r = ''
	do_s = False
	for i in range(len(s)):
		if s[i] == t[i]:
			r += s[i]
		elif do_s:
			r += s[i]
			do_s = False
		else:
			r += t[i]
			do_s = True
	print(r)


(First, Second, Answer, Check) = (input(), input(), '', True)
for i in range(len(First)):
	if Second[i] == First[i]:
		Answer += First[i]
	else:
		Answer += First[i] if Check else Second[i]
		Check = not Check
print(Answer if Check else 'impossible')


a = input()
b = input()
s = len(a)
k = True
ans = ''
for i in range(s):
	if a[i] == b[i]:
		ans += a[i]
	else:
		if k:
			ans += a[i]
		else:
			ans += b[i]
		k = not k
if k:
	print(ans)
else:
	print('impossible')


a = input()
b = input()
l = len(a)
count = 0
for i in range(l):
	if a[i] != b[i]:
		count += 1
if count % 2 == 1:
	print('impossible')
else:
	c = 0
	ans = ''
	for i in range(l):
		if a[i] != b[i] and c < count // 2:
			ans += a[i]
			c += 1
		else:
			ans += b[i]
	print(ans)


a = input()
b = input()
answer = 0
all_answer = [0] * len(a)
for i in range(len(a)):
	if a[i] != b[i]:
		if answer == 0:
			all_answer[i] = a[i]
			answer += 1
		else:
			all_answer[i] = b[i]
			answer -= 1
	else:
		all_answer[i] = a[i]
if answer == 0:
	print(''.join(all_answer))
else:
	print('impossible')


first = input()
second = input()
p = []
c = 0
for (ch1, ch2) in zip(first, second):
	if ch1 != ch2:
		p.append(ch1 if c else ch2)
		c = 1 - c
	else:
		p.append(ch1)
print('impossible' if c else ''.join(p))


s = str(input())
t = str(input())
n = len(s)
C = [0 for _ in range(n)]
diff = 0
for i in range(n):
	if s[i] == t[i]:
		C[i] = 1
	else:
		diff += 1
if diff % 2:
	print('impossible')
else:
	ce = 0
	i = 0
	while i < n:
		if C[i] == 0 and ce < diff // 2:
			print(1 - int(s[i]), end='')
			ce += 1
		else:
			print(s[i], end='')
		i += 1


s = input()
t = input()
w = ''
h = 0
g = 0
c = 0
for i in range(len(s)):
	if s[i] == '0' and t[i] == '1' and (g == 0):
		w += '0'
		c += 1
		g = 1
	elif s[i] == '0' and t[i] == '1' and (g == 1):
		w += '1'
		c += 1
		g = 0
	elif s[i] == '1' and t[i] == '0' and (h == 0):
		w += '0'
		c += 1
		h = 1
	elif s[i] == '1' and t[i] == '0' and (h == 1):
		w += '1'
		c += 1
		h = 0
	else:
		w += s[i]
if c % 2 == 0:
	print(w)
else:
	print('impossible')


x = input()
y = input()
v = 0
for i in range(len(x)):
	if x[i] != y[i]:
		v += 1
if v % 2 == 1:
	print('impossible')
else:
	v /= 2
	r = []
	for i in range(len(x)):
		if x[i] == y[i]:
			r.append(x[i])
		elif v > 0:
			r.append(x[i])
			v -= 1
		else:
			r.append(y[i])
	print(''.join(r))


s = input()
t = input()
r = 0
for i in range(len(s)):
	if s[i] != t[i]:
		r += 1
p = ''
a = divmod(r, 2)
if a[1] == 1:
	print('impossible')
else:
	i = 0
	for j in range(len(s)):
		if s[j] != t[j] and i < a[0]:
			p += t[j]
			i += 1
		else:
			p += s[j]
if p != '':
	print(p)


s = input()
t = input()
arr = [-1] * len(s)
count = 0
dup1 = []
dup2 = []
for i in range(len(s)):
	if s[i] != t[i]:
		count += 1
		dup1.append(s[i])
		dup2.append(i)
	else:
		arr[i] = s[i]
if count == 0:
	print(s)
elif count % 2:
	print('impossible')
else:
	for i in range(0, len(dup1), 2):
		if dup1[i] == dup1[i + 1]:
			arr[dup2[i]] = '1'
			arr[dup2[i + 1]] = '0'
		else:
			arr[dup2[i]] = '1'
			arr[dup2[i + 1]] = '1'
	ans = ''
	for i in arr:
		ans += i
	print(ans)


(a, b, c, cnt) = (input(), input(), '', 0)
for i in range(len(a)):
	if a[i] == b[i]:
		c += a[i]
	else:
		cnt += 1
		if cnt % 2:
			c += a[i]
		else:
			c += b[i]
print('impossible' if cnt & 1 else c)


import sys
r = lambda : map(int, input().split())
(s, t) = (input(), input())
n = len(s)
d = 0
for i in range(n):
	d += s[i] != t[i]
if d % 2 != 0:
	print('impossible')
	sys.exit(0)
(d1, d2) = (0, 0)
ans = ''
for i in range(n):
	if s[i] == t[i]:
		ans += s[i]
	elif d1 < d2:
		ans += s[i]
		d1 += 1
	else:
		ans += t[i]
		d2 += 1
print(ans)


import sys

def solve():
	(string1, string2) = (input(), input())
	different = []
	T = list(string1)
	turn = 0
	for i in range(len(string1)):
		if string1[i] != string2[i]:
			T[i] = string1[i] if turn == 0 else string2[i]
			turn = (turn + 1) % 2
	if turn:
		print('impossible')
	else:
		print(''.join(T))
solve()


(s, t) = (input(), input())
n = len(s)
p = bin(int(s, 2) ^ int(t, 2))[2:].zfill(n)
(div_, mod_) = divmod(p.count('1'), 2)
print('impossible' if mod_ else bin(int(p.replace('1', '0', div_), 2) ^ int(s, 2))[2:].zfill(n))


from sys import stdin, stdout
from collections import Counter

def ai():
	return list(map(int, stdin.readline().split()))

def ei():
	return map(int, stdin.readline().split())

def ip():
	return int(stdin.readline().strip())

def op(ans):
	return stdout.write(str(ans) + '\n')
s = input()
t = input()
dummy = ''
c = 0
for i in range(len(s)):
	if s[i] != t[i]:
		c += 1
		if c % 2 == 0:
			dummy += s[i]
		else:
			dummy += t[i]
	else:
		dummy += s[i]
if c % 2 == 0:
	print(dummy)
else:
	print('impossible')


a = list(input())
b = list(input())
c = ['0'] * len(a)
count = 0
for i in range(len(a)):
	if a[i] == b[i]:
		c[i] = a[i]
	else:
		count += 1
		if count % 2 == 0:
			c[i] = str(a[i])
		else:
			c[i] = str(b[i])
if count % 2 == 0:
	print(''.join(c))
else:
	print('impossible')


s = input()
t = input()
n = len(s)
which = 0
p = ''
count = 0
for i in range(n):
	if s[i] != t[i]:
		count = count + 1
		if which == 0:
			p = p + s[i]
			which = 1
		else:
			p = p + t[i]
			which = 0
	else:
		p = p + s[i]
if count % 2 == 0:
	print(p)
else:
	print('impossible')


f = input()
s = input()
pos = []
posset = set()
new = ''
count = 0
t = 0
for i in range(len(s)):
	if f[i] != s[i]:
		count += 1
		pos.append(i)
		posset.add(i)
if count % 2 != 0:
	print('impossible')
else:
	for i in range(len(f)):
		if i in posset:
			if t < count // 2:
				t += 1
				new += f[i]
			else:
				t += 1
				new += s[i]
		else:
			new += f[i]
print(new)


s1 = input()
s2 = input()
s = 0
x = list(s1)
for i in range(len(s1)):
	if s1[i] != s2[i]:
		s += 1
if s % 2 == 1:
	print('impossible')
else:
	s = s / 2
	i = 0
	while s:
		if s1[i] != s2[i]:
			x[i] = s2[i]
			s -= 1
		i += 1
	print(''.join(x))


s = input()
t = input()
n = len(s)
num = ''
a = True
for i in range(0, n):
	if s[i] == t[i]:
		num += s[i]
	else:
		if a:
			num += s[i]
		else:
			num += t[i]
		a = not a
if not a:
	print('impossible')
else:
	print(num)


s = input()
d = input()
t = ''
c = True
cnt = 0
for i in range(len(s)):
	if s[i] != d[i]:
		cnt += 1
		if c:
			t += s[i]
			c = False
		else:
			t += d[i]
			c = True
	else:
		t += s[i]
if not t and cnt == 0:
	print(s)
elif t and cnt % 2 == 0:
	print(t)
else:
	print('impossible')


s = input()
t = input()
n = len(s)
f = True
count = 0
ans = ''
for i in range(n):
	if s[i] != t[i]:
		count += 1
		if f:
			ans += s[i]
			f = False
		else:
			ans += t[i]
			f = True
	else:
		ans += s[i]
if count % 2 != 0:
	print('impossible')
else:
	print(ans)


(s, t) = [input() for i in range(2)]
(ans, l, flag) = ('', len(s), 0)
for i in range(l):
	if s[i] != t[i]:
		if flag:
			ans += t[i]
			flag = 0
			continue
		flag = 1
	ans += s[i]
if flag:
	print('impossible')
else:
	print(ans)


import sys
s1 = input()
s2 = input()
a = []
for i in range(len(s1)):
	if s1[i] != s2[i]:
		a.append(i)
if len(a) % 2:
	print('impossible')
	sys.exit()
s = [ch for ch in s1]
for i in a[::2]:
	s[i] = s1[i]
for i in a[1::2]:
	s[i] = s2[i]
for ch in s:
	print(ch, end='')


a = list(input())
b = list(input())
c = 0
l = []
for i in range(len(a)):
	if a[i] != b[i]:
		c += 1
		if c % 2 == 0:
			l.append(a[i])
		else:
			l.append(b[i])
	else:
		l.append(a[i])
if c % 2 == 0:
	print(''.join(l))
else:
	print('impossible')


s = input()
t = input()
r = ''
c = 0
for i in range(0, len(s)):
	if s[i] != t[i]:
		c += 1
		if c % 2 == 0:
			r += s[i]
		else:
			r += t[i]
	else:
		r += s[i]
if c % 2 == 0:
	print(r)
else:
	print('impossible')


string1 = list(input())
string2 = list(input())
x = 0
for i in range(len(string1)):
	if string1[i] != string2[i]:
		x += 1
	if x % 2 == 0:
		string1[i] = string2[i]
if x & 1:
	print('impossible')
else:
	print(''.join(string1))


(s, t) = (input(), input())
m = False
ans = ''
for i in range(len(s)):
	x = s[i]
	if s[i] != t[i]:
		m ^= True
		if not m:
			x = t[i]
	ans += x
print('impossible' if m else ans)


s1 = input()
s2 = input()
s3 = []
diff = 0
for i in range(len(s1)):
	if s1[i] == s2[i]:
		s3.append(s1[i])
	else:
		diff += 1
		if diff % 2:
			s3.append(s1[i])
		else:
			s3.append(s2[i])
if diff % 2:
	print('impossible\n')
else:
	print(''.join(s3))


a = input()
b = input()
flag = True
r = ''
for i in range(len(a)):
	if a[i] == b[i]:
		r += a[i]
	else:
		if flag:
			if a[i] == '1':
				r += '0'
			else:
				r += '1'
		elif b[i] == '1':
			r += '0'
		else:
			r += '1'
		flag = not flag
if flag:
	print(r)
else:
	print('impossible')


res = []
cnt = 0
for (s, t) in zip(input(), input()):
	if s == t:
		res.append('0')
	else:
		res.append(str((int(s) + cnt) % 2))
		cnt += 1
print(''.join(res) if cnt % 2 == 0 else 'impossible')


s = input()
t = input()
l_d = list()
c = 0
for i in range(len(s)):
	if s[i] != t[i] and c % 2 == 0:
		l_d.append('0' if '0' == s[i] else '1')
		c += 1
	elif s[i] != t[i]:
		c += 1
		l_d.append('1' if '0' == s[i] else '0')
	else:
		l_d.append('1')
if c % 2 == 1:
	print('impossible')
else:
	print(''.join(l_d))


s1 = input()
s2 = input()
diff = 0
n = len(s1)
for i in range(n):
	if s1[i] != s2[i]:
		diff += 1
if diff % 2 == 0:
	ans = ''
	diff2 = 0
	for i in range(n):
		if s1[i] == s2[i]:
			ans += s1[i]
		else:
			if diff2 % 2 == 0:
				ans += s1[i]
			else:
				ans += s2[i]
			diff2 += 1
	print(ans)
else:
	print('impossible')


from bisect import bisect_left as bs
from math import log as lg
log = lambda *x: print(*x)

def cin(*fn, def_fn=str):
	(i, r) = (0, [])
	if fn:
		def_fn = fn[0]
	for c in input().split(' '):
		r += [(fn[i] if len(fn) > i else def_fn)(c)]
		i += 1
	return r
(s,) = cin(str)
(t,) = cin(str)
e = ['0'] * len(s)
c = sum((s[i] != t[i] for i in range(len(s))))
if c % 2:
	log('impossible')
else:
	sc = 0
	for i in range(len(s)):
		if s[i] != t[i]:
			if sc < c // 2:
				(sc, e[i]) = (sc + 1, t[i])
			else:
				e[i] = s[i]
		else:
			e[i] = s[i]
	log(''.join(e))


s = input()
t = input()
sum_ = ''
for i in range(len(s)):
	sum_ += str(int(s[i]) + int(t[i]))
if sum_.count('1') % 2 != 0:
	print('impossible')
	exit()
ans = ''
co = sum_.count('1') // 2
chng = 0
for i in range(len(s)):
	if sum_[i] == '1':
		ans += str(abs(int(s[i]) - 1))
		chng += 1
	else:
		ans += s[i]
	if chng == co:
		ans += s[i + 1:]
		print(ans)
		exit()


s = input()
t = input()
n = len(s)
count = 0
for i in range(n):
	if s[i] != t[i]:
		count += 1
if count % 2 != 0:
	print('impossible')
else:
	mas = []
	bool = False
	for i in range(n):
		if s[i] == t[i]:
			mas.append('0')
		else:
			if bool:
				mas.append(s[i])
			else:
				mas.append(t[i])
			bool = not bool
	print(''.join(mas))


s = input()
t = input()
final = ''
isS = True
num = 0
for i in range(len(s)):
	if s[i] == t[i]:
		final += s[i]
	else:
		num += 1
		if isS:
			final += s[i]
			isS = False
		else:
			final += t[i]
			isS = True
if num % 2 == 0:
	print(final)
else:
	print('impossible')


s = input()
t = input()
ans = ''
f = 0
cnt = 0
t = list(t)
var = s.count('0')
flag = t.count('0')
if abs(var - flag) % 2 != 0:
	print('impossible')
	exit()
for i in range(len(s)):
	if s[i] != t[i]:
		if f == 0:
			f = 1
		else:
			t[i] = s[i]
			f = 0
print(''.join(t))


s = input()
t = input()
ans = ''
n = len(s)
diff = 0
flag_t = 0
flag_s = 1
for i in range(n):
	if s[i] != t[i]:
		diff += 1
		if flag_s == 1:
			ans += str(abs(int(s[i]) - 1))
			flag_s = 0
			flag_t = 1
		elif flag_t == 1:
			ans += str(abs(int(t[i]) - 1))
			flag_s = 1
			flag_t = 0
	else:
		ans += str(abs(int(t[i]) - 1))
if diff % 2 == 1:
	print('impossible')
else:
	print(ans)


a = list(input())
b = list(input())
q = 0
for k in range(len(a)):
	if a[k] == b[k]:
		pass
	else:
		q += 1
		if q % 2 == 0:
			pass
		else:
			a[k] = b[k]
if q % 2 == 0:
	print(''.join(a))
else:
	print('impossible')


s = input()
t = input()
num = len(s)
way = 0
for i in range(num):
	if s[i] != t[i]:
		way += 1
p = [0] * num
if way % 2 == 0:
	way2 = way // 2
	for i in range(num):
		if s[i] != t[i] and way2 > 0:
			print(s[i], end='')
			way2 -= 1
		elif s[i] != t[i] and way2 == 0:
			print(t[i], end='')
		elif s[i] == t[i]:
			print(s[i], end='')
else:
	print('impossible')


a = input()
b = input()
e = 1
k = []
for i in range(len(a)):
	if a[i] == b[i]:
		k.append(a[i])
	elif e == 1:
		k.append(a[i])
		e = 2
	else:
		k.append(b[i])
		e = 1
if e == 2:
	print('impossible')
else:
	for i in range(len(k)):
		print(k[i], end='')


x = input()
y = input()
mis = 0
for i in range(len(x)):
	if x[i] != y[i]:
		mis += 1
if mis % 2 != 0:
	print('impossible')
else:
	ans = [i for i in x]
	mis = mis / 2
	for i in range(len(x)):
		if mis == 0:
			break
		if y[i] != ans[i]:
			if y[i] == '0':
				ans[i] = '0'
			else:
				ans[i] = '1'
			mis -= 1
	ans = ''.join(ans)
	print(ans)


a = input()
b = input()
c = []
num = 0
x = 0
n = len(a)
for i in range(n):
	if a[i] == b[i]:
		c.append(a[i])
	else:
		num += 1
		if x == 0:
			c.append(a[i])
			x = 1
		else:
			c.append(b[i])
			x = 0
if num % 2 == 0:
	str = ''.join(c)
	print(str)
else:
	print('impossible')


s1 = input()
s2 = input()
s3 = ''
a = 0
for i in range(len(s1)):
	if s1[i] != s2[i]:
		a += 1
if a % 2:
	print('impossible')
else:
	a = a // 2
	for i in range(len(s1)):
		if a and int(s1[i]) - int(s2[i]) != 0:
			s3 += s1[i]
			a -= 1
		else:
			s3 += s2[i]
	print(s3)


import sys
import bisect
t = 1
for _ in range(t):
	s = input()
	t = input()
	cnt = 0
	for i in range(len(s)):
		if s[i] != t[i]:
			cnt += 1
	if cnt % 2 == 0:
		cnt1 = 0
		for i in range(len(s)):
			if s[i] != t[i]:
				if cnt1 < cnt // 2:
					print(s[i], end='')
				else:
					print(t[i], end='')
				cnt1 += 1
			else:
				print(s[i], end='')
	else:
		print('impossible')


t = input
r = range
s1 = t()
s2 = t()
p = []
c = 0
for (i1, i2) in zip(s1, s2):
	if i1 != i2:
		p.append(i1 if c else i2)
		c = 1 - c
	else:
		p.append(i1)
print('impossible' if c else ''.join(p))


from sys import *
from math import *
input = lambda : stdin.readline()
int_arr = lambda : list(map(int, stdin.readline().strip().split()))
str_arr = lambda : list(map(str, stdin.readline().split()))
get_str = lambda : map(str, stdin.readline().strip().split())
get_int = lambda : map(int, stdin.readline().strip().split())
get_float = lambda : map(float, stdin.readline().strip().split())
mod = 1000000007
setrecursionlimit(1000)
s = str(input())[:-1]
t = str(input())[:-1]
ct = 0
lst = []
p = ''
n = len(s)
for i in range(n):
	if s[i] != t[i]:
		ct += 1
		lst += [i]
c = 0
if not ct & 1:
	for i in range(n):
		if s[i] == t[i]:
			p += s[i]
		elif c % 2 == 0:
			p += str(1 - int(s[i]))
			c += 1
		else:
			p += str(1 - int(t[i]))
			c += 1
	print(p)
else:
	print('impossible')


a = input()
b = input()
(c1, c2, ans, v) = (0, 0, 0, [])
for (i, j) in zip(a, b):
	if i != j:
		ans += 1
		if c1 < c2:
			v.append(i)
			c1 += 1
		else:
			v.append(j)
			c2 += 1
	else:
		v.append(i)
if ans & 1:
	print('impossible')
else:
	print(''.join(v))


s0 = input()
s1 = input()
l = len(s0)
num = 0
res = ''
for c in range(0, l):
	if s0[c] != s1[c]:
		if num % 2 == 0:
			res += s0[c]
		else:
			res += s1[c]
		num += 1
	else:
		res += s0[c]
if num % 2 == 0:
	print(res)
else:
	print('impossible')


a = input()
b = input()
diff = 0
for i in range(len(a)):
	if a[i] != b[i]:
		diff += 1
if diff % 2 != 0:
	print('impossible')
else:
	start = 0
	ans = ''
	for i in range(len(a)):
		if a[i] != b[i]:
			if start % 2 == 0:
				ans += a[i]
			elif start % 2 == 1:
				ans += b[i]
			start += 1
		else:
			ans += a[i]
	print(ans)


s = input()
t = input()
c = 0
for i in range(len(s)):
	if s[i] != t[i]:
		c += 1
if c % 2 != 0:
	print('impossible')
else:
	ch = 0
	out = ''
	for i in range(len(s)):
		if s[i] != t[i]:
			if ch % 2 == 0:
				out += s[i]
				ch += 1
			else:
				out += t[i]
				ch += 1
		else:
			out += s[i]
	print(out)


rdl1 = input()
rdl2 = input()
ans = ''
index1 = 0
index2 = 0
for i in range(len(rdl1)):
	if rdl1[i] == rdl2[i]:
		ans += rdl1[i]
	elif index1 > index2:
		ans += rdl2[i]
		index2 += 1
	else:
		ans += rdl1[i]
		index1 += 1
if index1 == index2:
	print(ans)
else:
	print('impossible')


s1 = input()
s2 = input()
c = 0
ind = 0
output = ''
for i in range(len(s1)):
	if s1[i] != s2[i]:
		c += 1
		if ind:
			output += s1[i]
			ind = 0
		else:
			output += s2[i]
			ind = 1
	else:
		output += s1[i]
if c % 2 == 0:
	print(output)
else:
	print('impossible')


a = input()
b = input()
k = ''
r = 1
for i in range(len(a)):
	if a[i] == b[i]:
		k += '0'
	else:
		if r % 2 == 0:
			k += str(a[i])
		else:
			k += str(b[i])
		r += 1
if r % 2 == 0:
	print('impossible')
else:
	print(k)


s = input()
t = input()
length = len(s)
numberOfOne = 0
result = []
for i in range(length):
	if s[i] == t[i]:
		result.append('0')
	else:
		result.append('1')
		numberOfOne += 1
if numberOfOne % 2 != 0:
	print('impossible')
else:
	needToChange = numberOfOne // 2
	for (i, v) in enumerate(result):
		if v == '1' and needToChange > 0:
			result[i] = s[i]
			needToChange -= 1
		elif v == '1' and needToChange == 0:
			result[i] = t[i]
	print(''.join(result))


import sys
input = []
input_index = 0

def next(type, number=None):

	def next():
		global input, input_index
		while input_index == len(input):
			if sys.stdin:
				input = sys.stdin.readline().split()
				input_index = 0
			else:
				raise Exception()
		input_index += 1
		return input[input_index - 1]
	if number is None:
		result = type(next())
	else:
		result = [type(next()) for _ in range(number)]
	return result
s = next(str)
t = next(str)
n = len(s)
p = [0] * n
d = 0
for i in range(n):
	(sc, tc) = (s[i], t[i])
	if sc != tc:
		if d == 1:
			p[i] = sc
			d = 0
		elif d == -1:
			p[i] = tc
			d = 0
		else:
			p[i] = tc
			d = 1
	else:
		p[i] = sc
res = 'impossible'
if d == 0:
	res = ''.join(p)
print(res)


s = list(input())
t = list(input())
l = len(s)
ans = ''
c1 = c2 = 0
for i in range(l):
	if s[i] == '0' and t[i] == '1':
		if c1 % 2 == 0:
			ans += '0'
		else:
			ans += '1'
		c1 += 1
	elif s[i] == '1' and t[i] == '0':
		if c2 % 2 == 0:
			ans += '0'
		else:
			ans += '1'
		c2 += 1
	else:
		ans += s[i]
if (c1 + c2) % 2 != 0:
	print('impossible')
	exit()
print(ans)


(s, t) = (input(), input())
(a, w1, w2) = (0, 0, 0)
l = len(s)
q = [0 for i in range(l)]
for i in range(0, l):
	if s[i] != t[i]:
		a += 1
if a % 2 == 1:
	print('impossible')
else:
	for i in range(0, l):
		if s[i] != t[i] and w1 < a // 2:
			q[i] = s[i]
			w1 += 1
		elif s[i] != t[i] and w2 < a // 2:
			q[i] = t[i]
			w2 += 1
		elif s[i] == t[i]:
			q[i] = s[i]
	print(*q, sep='')


s = str(input())
t = str(input())
c = 0
for i in range(len(s)):
	if s[i] != t[i]:
		c += 1
if c % 2 == 1:
	print('impossible')
else:
	l = []
	for i in range(len(s)):
		if s[i] != t[i]:
			l.append(i)
	ans = []
	ll = len(l)
	flag = False
	for i in range(len(s)):
		if s[i] == t[i]:
			ans.append(s[i])
		elif flag:
			ans.append(s[i])
			flag = False
		else:
			ans.append(t[i])
			flag = True
	print(''.join(ans))


s = input()
t = input()
arr = [None for i in range(len(s))]
c = 1
g = 0
for i in range(len(s)):
	if s[i] == t[i]:
		arr[i] = s[i]
	else:
		if c % 2 == 1:
			arr[i] = s[i]
		else:
			arr[i] = t[i]
		c += 1
if c % 2 == 0:
	print('impossible')
else:
	print(''.join(map(str, arr)))


class CodeforcesTask545BSolution:

	def __init__(self):
		self.result = ''
		self.s = ''
		self.t = ''

	def read_input(self):
		self.s = input()
		self.t = input()

	def process_task(self):
		n = len(self.s)
		res = [0] * n
		cnt = 0
		b = False
		for x in range(n):
			if self.s[x] != self.t[x]:
				if b:
					res[x] = self.s[x]
				else:
					res[x] = self.t[x]
				b = not b
				cnt += 1
			else:
				res[x] = self.s[x]
		if not cnt % 2:
			self.result = ''.join([str(x) for x in res])
		else:
			self.result = 'impossible'

	def get_result(self):
		return self.result
Solution = CodeforcesTask545BSolution()
Solution.read_input()
Solution.process_task()
print(Solution.get_result())


s = list(map(int, input()))
t = list(map(int, input()))
dis = 0
for i in range(len(s)):
	dis += abs(s[i] - t[i])
if dis % 2 != 0:
	print('impossible')
else:
	dis = dis // 2
	for i in range(len(s)):
		if s[i] != t[i] and dis:
			s[i] = t[i]
			dis -= 1
		print(s[i], end='')


s = input()
t = input()

def dist(s, t):
	h = 0
	for i in range(len(s)):
		if s[i] != t[i]:
			h += 1
	return h
if dist(s, t) % 2 != 0:
	print('impossible')
else:
	z = dist(s, t) // 2
	l = ''
	h = 0
	for i in range(len(s)):
		if s[i] != t[i] and h != z:
			h += 1
			if s[i] == '1':
				l += '0'
			else:
				l += '1'
		else:
			l += s[i]
	print(l)


s = input()
t = input()
list1 = []
list2 = []
list3 = []
word = ''
for i in s:
	list1.append(i)
for i in t:
	list2.append(i)
hamming = 0
count = 0
for i in range(len(list1)):
	if list1[i] != list2[i]:
		hamming += 1
if hamming % 2 == 1:
	print('impossible')
else:
	for i in range(len(list1)):
		if list1[i] != list2[i]:
			list3.append(list2[i])
			count += 1
			if count == int(hamming / 2):
				break
		else:
			list3.append(list1[i])
	for i in range(len(list3), len(list1)):
		list3.append(list1[i])
	for i in range(len(list3)):
		word = word + list3[i]
	print(word)


import os
import sys
from collections import *
from bisect import *
from io import BytesIO, IOBase

def vsInput():
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('output.txt', 'w')
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
ALPHA = 'abcdefghijklmnopqrstuvwxyz/'
M = 10 ** 9 + 7
EPS = 1e-06

def Ceil(a, b):
	return a // b + int(a % b > 0)

def value():
	return tuple(map(int, input().split()))

def array():
	return [int(i) for i in input().split()]

def Int():
	return int(input())

def Str():
	return input()

def arrayS():
	return [i for i in input().split()]
a = input()
b = input()
n = len(a)
not_same = []
same = []
ans = [0] * n
for i in range(n):
	if a[i] != b[i]:
		not_same.append(i)
c = 0
for i in not_same:
	if c % 2:
		ans[i] = a[i]
	else:
		ans[i] = b[i]
	c += 1
if c % 2:
	print('impossible')
else:
	print(*ans, sep='')


s = input()
t = input()
x = ''
l = 0
for i in range(len(s)):
	if s[i] != t[i]:
		if l % 2 == 0:
			x += s[i]
		else:
			x += t[i]
		l += 1
	else:
		x += t[i]
if l % 2 == 1:
	print('impossible')
else:
	print(x)


s = input()
t = input()
D = {}
count = 1
for i in range(len(s)):
	if s[i] != t[i]:
		D[i] = 1
if len(D) % 2 == 1:
	print('impossible')
else:
	for i in range(len(s)):
		if i not in D:
			print(s[i], end='')
		elif count <= len(D) // 2:
			print(s[i], end='')
			count += 1
		else:
			print(t[i], end='')


s = input()
n = input()
l = len(s)
jud = True
new = ''
for i in range(l):
	if s[i] == n[i]:
		new += '0'
	else:
		if jud:
			new += s[i]
		else:
			new += n[i]
		jud = not jud
if jud:
	print(new)
else:
	print('impossible')


def solve():
	x = input()
	y = input()
	pos = []
	count = 0
	n = len(x)
	for i in range(n):
		if x[i] != y[i]:
			pos.append(i)
			count += 1
	if count % 2 == 1:
		print('impossible')
	else:
		xx = list(x)
		for i in range(count // 2):
			if xx[pos[i]] == '0':
				xx[pos[i]] = '1'
			else:
				xx[pos[i]] = '0'
		print(''.join(xx))
solve()


s1 = input()
s2 = input()
n = len(s1)
ham = 0
for i in range(n):
	if s1[i] != s2[i]:
		ham += 1
if ham & 1:
	print('impossible')
else:
	ham = 0
	for i in range(n):
		if s1[i] == s2[i]:
			print(s1[i], end='')
		else:
			ham += 1
			if ham & 1:
				print(s1[i], end='')
			else:
				print(s2[i], end='')


s = list(map(int, input()))
t = list(map(int, input()))
dis = 0
for i in range(len(s)):
	dis += abs(s[i] - t[i])
if dis % 2 == 1:
	print('impossible')
	exit()
res = ''
dis //= 2
for i in range(len(s)):
	if s[i] != t[i] and dis > 0:
		s[i] = t[i]
		dis -= 1
	res += str(s[i])
print(res)


s1 = input().strip()
s2 = input().strip()
dist = 0
n = len(s1)
for i in range(n):
	if s1[i] != s2[i]:
		dist += 1
if dist % 2 == 1:
	print('impossible')
else:
	k = dist // 2
	s = ''
	c = 0
	for i in range(n):
		if s1[i] != s2[i]:
			if c < k:
				s = s + s1[i]
			else:
				s = s + s2[i]
			c += 1
		else:
			s = s + s1[i]
	print(s)


a = input()
b = input()
out = ''
check = True
for (x, y) in zip(a, b):
	if x == y:
		out += '0'
	elif check:
		out += x
		check = False
	else:
		out += y
		check = True
print(out if check else 'impossible')


s = input()
t = input()
p = ''
length = len(s)
count = 0
for i in range(length):
	if s[i] != t[i]:
		count += 1
		p += s[i] if count % 2 == 0 else t[i]
	else:
		p += str(s[i])
if count % 2 != 0:
	print('impossible')
else:
	print(p)


s1 = input()
s2 = input()
ans = ''
i = 0
j = 0
s1f = True
s2f = False
s1ft = s1f
s2ft = s2f
while i < len(s1) and j < len(s2):
	if s1[i] == s2[j]:
		ans = ans + s1[i]
	else:
		if s1f == True:
			ans = ans + s1[i]
		else:
			ans = ans + s2[j]
		s1f = not s1f
		s2f = not s2f
	i = i + 1
	j = j + 1
if s1ft == s1f and s2ft == s2f:
	print(ans)
else:
	print('impossible')


a = input()
b = input()
n = len(a)
ans = ''
f = True
for i in range(n):
	if a[i] == b[i]:
		ans += a[i]
	else:
		if f:
			ans += a[i]
		else:
			ans += b[i]
		f = not f
if f == True:
	print(ans)
else:
	print('impossible')


s = input().strip()
t = input().strip()
p = []
dif = 0
for (sc, tc) in zip(s, t):
	if sc == tc:
		p.append(sc)
	else:
		dif += 1
		if dif & 1:
			p.append(sc)
		else:
			p.append(tc)
if dif & 1:
	print('impossible')
else:
	print(''.join(p))


a = input()
b = input()
c = ''
first = True
for (a1, b1) in zip(a, b):
	if a1 == b1:
		c += a1
	else:
		if first:
			c += a1
		else:
			c += b1
		first = not first
if first:
	print(c)
else:
	print('impossible')


s = input()
s1 = input()
ans = 0
for i in range(len(s)):
	if s[i] != s1[i]:
		ans += 1
if ans % 2 == 1:
	print('impossible')
	exit(0)
p = ''
a = ans // 2
for i in range(len(s)):
	if s[i] == s1[i]:
		p += s[i]
	elif a > 0:
		p += s[i]
		a -= 1
	else:
		p += s1[i]
print(p)


s = input()
t = input()
n = len(s)
mm = 0
for i in range(n):
	if t[i] != s[i]:
		mm += 1
if mm % 2 == 1:
	print('impossible')
	exit()
c = 0
ans = ''
for i in range(n):
	if t[i] != s[i] and c == 0:
		c = 1
		ans += s[i]
	elif t[i] != s[i] and c == 1:
		c = 0
		ans += t[i]
	else:
		ans += s[i]
print(ans)


a = input()
b = input()
r = []
cont = 0
cont2 = 0
for i in range(len(a)):
	if a[i] != b[i]:
		cont += 1
if cont % 2 == 0:
	for i in range(len(a)):
		if a[i] != b[i]:
			if cont % 2 == 0:
				r.append(a[i])
				cont += 1
			else:
				r.append(b[i])
				cont += 1
		else:
			r.append(a[i])
	for i in range(len(a)):
		print(str(r[i]), end='')
else:
	print('impossible')


s = list(input())
t = list(input())
k = 0
for i in range(len(t)):
	if s[i] != t[i]:
		k += 1
		if k % 2 == 0:
			s[i] = t[i]
if k % 2 == 0:
	print(*s, sep='')
else:
	print('impossible')


s1 = input()
s2 = input()
r = sum((1 for i in range(len(s1)) if s1[i] != s2[i]))
if r % 2 != 0:
	print('impossible')
else:
	one = True
	r = []
	for i in range(len(s1)):
		if s1[i] == s2[i]:
			r.append(s1[i])
		elif one:
			r.append(s1[i])
			one = False
		else:
			r.append(s2[i])
			one = True
	print(''.join(r))


s = input()
t = input()
e = d = 0
for i in range(len(s)):
	if s[i] == t[i]:
		e += 1
	else:
		d += 1
if d % 2:
	print('impossible')
else:
	k = 0
	z = d // 2
	p = [0] * len(s)
	for i in range(len(s)):
		if k < z and s[i] != t[i]:
			p[i] = s[i]
			k += 1
		elif k >= z and s[i] != t[i]:
			p[i] = t[i]
			k += 1
		elif s[i] == '1':
			p[i] = '0'
		else:
			p[i] = '1'
	for i in p:
		print(i, end='')


s = input()
t = input()
c = 0
l = []
for i in range(len(s)):
	if s[i] != t[i]:
		c += 1
		if c & 1:
			if s[i] == '1':
				l.append(0)
			else:
				l.append(1)
		else:
			l.append(int(s[i]))
	else:
		l.append(int(s[i]))
if c & 1:
	print('impossible')
else:
	for i in l:
		print(i, end='')


s = input()
t = input()
m = 0
c = ''
for i in range(len(s)):
	if s[i] != t[i]:
		m ^= 1
		c += t[i] if m else s[i]
	else:
		c += s[i]
if m:
	print('impossible')
else:
	print(c)


a = input()
b = input()
c = []
res = 0
for (x, y) in zip(a, b):
	if x == y:
		c.append(x)
	else:
		if res == 0:
			c.append(x)
		else:
			c.append(y)
		res ^= 1
if res:
	print('impossible')
else:
	print(''.join(c))


def f(s1, s2):
	result = 0
	for i in range(len(s1)):
		if s1[i] != s2[i]:
			result += 1
	if result % 2 == 1:
		return 'impossible'
	(s, answer) = ('', result // 2)
	for i in range(len(s1)):
		if s1[i] == s2[i]:
			s += s1[i]
		elif answer > 0:
			s += s1[i]
			answer -= 1
		else:
			s += s2[i]
	return s
t1 = input()
t2 = input()
print(f(t1, t2))


s = input()
t = input()
n = len(s)
sum1 = 0
ar = []
for i in range(n):
	if s[i] != t[i]:
		sum1 += 1
if sum1 % 2 == 1:
	print('impossible')
else:
	j = 1
	for i in range(n):
		if s[i] == t[i]:
			print(s[i], end='')
		elif s[i] != t[i] and j <= sum1 // 2:
			print(s[i], end='')
			j += 1
		elif s[i] != t[i] and j > sum1 // 2:
			print(t[i], end='')


A = input()
B = input()
c = ''
sayac = 0
turn = 0
for i in range(len(A)):
	if A[i] == B[i]:
		c = c + A[i]
	else:
		sayac += 1
		if sayac % 2:
			c = c + A[i]
		else:
			c = c + B[i]
if sayac % 2 == 0:
	print(c)
else:
	print('impossible')


s = input()
t = input()
res = ''
cnt = 0
for i in range(len(s)):
	if s[i] == t[i]:
		res += '0'
	else:
		res += str((int(s[i]) + cnt) % 2)
		cnt = (cnt + 1) % 2
if cnt == 0:
	print(res)
else:
	print('impossible')


s = [input(), input()]
p = False
r = []
for i in range(len(s[0])):
	if s[0][i] == s[1][i]:
		r.append('0')
	else:
		r.append(s[p][i])
		p = not p
if p:
	print('impossible')
else:
	print(''.join(r))


s = input().strip()
t = input().strip()
dif1 = 0
dif2 = 0
ans = ''
for p in map(lambda x, y: (x, y), s, t):
	if p[0] != p[1]:
		if dif1 > dif2:
			ans += p[0]
			dif2 += 1
		else:
			ans += p[1]
			dif1 += 1
	else:
		ans += p[0]
if dif1 == dif2:
	print(ans)
else:
	print('impossible')


from collections import defaultdict, deque, Counter, OrderedDict
from heapq import heappop, heappush

def main():
	(s, t) = ([c for c in input()], [c for c in input()])
	(n, eq, nq) = (len(s), [], [])
	ans = ['c'] * n
	for i in range(n):
		if s[i] == t[i]:
			eq.append(i)
			ans[i] = s[i]
		else:
			nq.append(i)
	if len(nq) & 1:
		print('impossible')
	else:
		if len(nq) > 0:
			for (i, v) in enumerate(nq):
				ans[v] = s[v] if i % 2 else t[v]
		else:
			ans[eq[0]] = '1' if s[eq[0]] == '0' else '0'
		print(''.join(ans))
main()


s1 = input()
s2 = input()
total = 0
s3 = []
for i in range(len(s1)):
	if s1[i] != s2[i]:
		s3.append(1)
		total += 1
	else:
		s3.append(0)
if total % 2 != 0:
	print('impossible')
else:
	p = []
	cur = 0
	for i in range(len(s1)):
		if s3[i] == 0:
			p.append(s1[i])
		elif s3[i] == 1 and cur < total // 2:
			cur += 1
			p.append(s1[i])
		else:
			p.append(s2[i])
	print(''.join(map(str, p)))