When new students come to the Specialized Educational and Scientific Centre (SESC) they need to start many things from the beginning. Sometimes the teachers say (not always unfairly) that we cannot even count. So our teachers decided to teach us arithmetics from the start. And what is the best way to teach students add and subtract? — That's right, using counting sticks! An here's our new task: 

An expression of counting sticks is an expression of type:[ A sticks][sign +][B sticks][sign =][C sticks] (1 ≤ A, B, C).  

Sign + consists of two crossed sticks: one vertical and one horizontal. Sign = consists of two horizontal sticks. The expression is arithmetically correct if A + B = C.

We've got an expression that looks like A + B = C given by counting sticks. Our task is to shift at most one stick (or we can shift nothing) so that the expression became arithmetically correct. Note that we cannot remove the sticks from the expression, also we cannot shift the sticks from the signs + and =.

We really aren't fabulous at arithmetics. Can you help us?


-----Input-----

The single line contains the initial expression. It is guaranteed that the expression looks like A + B = C, where 1 ≤ A, B, C ≤ 100.


-----Output-----

If there isn't a way to shift the stick so the expression becomes correct, print on a single line "Impossible" (without the quotes). If there is a way, print the resulting expression. Follow the format of the output from the test samples. Don't print extra space characters.

If there are multiple correct answers, print any of them. For clarifications, you are recommended to see the test samples.


-----Examples-----
Input
||+|=|||||

Output
|||+|=||||

Input
|||||+||=||

Output
Impossible

Input
|+|=||||||

Output
Impossible

Input
||||+||=||||||

Output
||||+||=||||||



-----Note-----

In the first sample we can shift stick from the third group of sticks to the first one.

In the second sample we cannot shift vertical stick from + sign to the second group of sticks. So we cannot make a - sign.

There is no answer in the third sample because we cannot remove sticks from the expression.

In the forth sample the initial expression is already arithmetically correct and that is why we don't have to shift sticks.

Difficulty: MEDIUM
Tags: Implementation

Complete search
Skill types: Complete search

Starter code:

Solutions:
a = [len(_) for _ in input().replace('+', '=').split('=')]
if a[0] + a[1] < a[2] and a[2] != 1:
	a[0] += 1
	a[2] -= 1
if a[0] + a[1] > a[2] and a[0] + a[1] != 1:
	if a[0] != 1:
		a[0] -= 1
	else:
		a[1] -= 1
	a[2] += 1
print('Impossible' if a[0] + a[1] != a[2] else '|' * a[0] + '+' + '|' * a[1] + '=' + '|' * a[2])


class CodeforcesTask394ASolution:

	def __init__(self):
		self.result = ''
		self.expression = ''

	def read_input(self):
		self.expression = input()

	def process_task(self):
		expr = self.expression.split('=')
		c = len(expr[1])
		a = len(expr[0].split('+')[0])
		b = len(expr[0].split('+')[1])
		diff = abs(a + b - c)
		if diff == 0 or diff == 2:
			if c > a + b:
				a += 1
				c -= 1
				self.result = '|' * a + '+' + '|' * b + '=' + '|' * c
			elif not diff:
				self.result = self.expression
			elif a + b > 2:
				if a > 1:
					a -= 1
				else:
					b -= 1
				c += 1
				self.result = '|' * a + '+' + '|' * b + '=' + '|' * c
			else:
				self.result = 'Impossible'
		else:
			self.result = 'Impossible'

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


(s, c) = input().split(sep='=')
(a, b) = s.split(sep='+')
(a, b, c) = map(len, [a, b, c])
if a + b != c:
	if a > 1 and a - 1 + b == c + 1:
		a -= 1
		c += 1
	elif b > 1 and a + b - 1 == c + 1:
		b -= 1
		c += 1
	elif c > 1 and a + 1 + b == c - 1:
		c -= 1
		a += 1
	else:
		print('Impossible')
		return
print('|' * a + '+' + '|' * b + '=' + '|' * c)


IN = input().split('=')
(a, b) = IN[0].split('+')
c = IN[1]
if len(a) + len(b) + 1 == len(c) - 1:
	a = '|' + a
	c = c.replace('|', '', 1)
	print(f'{a}+{b}={c}')
elif len(a) + len(b) - 1 == len(c) + 1:
	if len(a) == 1:
		c = '|' + c
		b = b.replace('|', '', 1)
	elif len(a) == len(b) == 1:
		print('Impossible')
	else:
		c = '|' + c
		a = a.replace('|', '', 1)
	print(f'{a}+{b}={c}')
elif len(a) + len(b) == len(c):
	print(f'{a}+{b}={c}')
else:
	print('Impossible')


string = input()
l = string.split('+')
(s1, s2) = (l[0], l[1])
l = s2.split('=')
(s3, s4) = (l[0], l[1])
k1 = len(s1) + len(s3)
k2 = len(s4)
if k1 < k2:
	if k2 - k1 == 2:
		s1 += '|'
		s4 = s4[:-1]
		print(s1 + '+' + s3 + '=' + s4)
	else:
		print('Impossible')
elif k2 < k1:
	if k1 - k2 == 2:
		s4 += '|'
		if len(s3) == 1:
			s1 = s1[:-1]
		else:
			s3 = s3[:-1]
		print(s1 + '+' + s3 + '=' + s4)
	else:
		print('Impossible')
else:
	print(s1 + '+' + s3 + '=' + s4)


import math as m
s = input().split('=')
left = s[0].split('+')
a = len(left[0])
b = len(left[1])
right = len(s[1])
if m.fabs(right - a - b) == 1 or m.fabs(right - a - b) > 2:
	print('Impossible')
elif a + b == right:
	print(a * '|', '+', b * '|', '=', right * '|', sep='')
elif right - a - b == 2:
	right -= 1
	b += 1
	print(a * '|', '+', b * '|', '=', right * '|', sep='')
elif right - a - b == -2:
	right += 1
	if b > 1:
		b -= 1
	else:
		a -= 1
	print(a * '|', '+', b * '|', '=', right * '|', sep='')


expr = input()
(a, b, c) = (expr.split('+')[0], expr.split('+')[1].split('=')[0], expr.split('+')[1].split('=')[1])
LHS = len(a) + len(b)
RHS = len(c)
if abs(LHS - RHS) != 2 and LHS != RHS:
	print('Impossible')
elif LHS == RHS:
	print(expr)
elif LHS > RHS:
	if len(a) > len(b):
		if len(a) == 1:
			print('Impossible')
		else:
			a = a[:-1]
			c = c + '|'
			print('{0}+{1}={2}'.format(a, b, c))
	elif len(b) == 1:
		print('Impossible')
	else:
		b = b[:-1]
		c = c + '|'
		print('{0}+{1}={2}'.format(a, b, c))
elif RHS > LHS:
	c = c[:-1]
	a = a + '|'
	print('{0}+{1}={2}'.format(a, b, c))


s = input().strip()
(l, r) = s.split('=')
a_b = len(r)
a = len(l.split('+')[0])
b = len(l.split('+')[1])
is_possible = True
if a + b == a_b - 2:
	a += 1
	a_b -= 1
elif a + b == a_b + 2:
	if a > b:
		a -= 1
	else:
		b -= 1
	a_b += 1
elif a + b != a_b:
	is_possible = False
if is_possible:
	print('|' * a + '+' + '|' * b + '=' + '|' * a_b)
else:
	print('Impossible')


i = lambda : map(int, input().split())
n = input()
(a, b, c) = (n.count('|', 0, n.find('+')), n.count('|', n.find('+'), n.find('=')), n.count('|', n.find('=')))
if a + b == c:
	print(n)
elif abs(a + b - c) == 2:
	if a + b > c:
		if a > 1:
			a -= 1
		elif b > 1:
			b -= 1
		c += 1
	else:
		if c > 1:
			c -= 1
		a += 1
	print('|' * a + '+' + '|' * b + '=' + '|' * c)
else:
	print('Impossible')


__author__ = 'Esfandiar'
(s1, s2) = input().split('=')
a = s1.count('|')
b = s2.count('|')
if a == b:
	print(s1 + '=' + s2)
elif abs(a - b) != 2:
	print('Impossible')
elif a < b:
	print(s1 + '|' + '=' + s2[:len(s2) - 1])
else:
	(q1, q2) = s1.split('+')
	if q1.count('|') == 1:
		print(s1[:len(s1) - 1] + '=' + s2 + '|')
	elif q2.count('|') == 1:
		print(q1[:len(q1) - 1] + '+' + q2 + '=' + s2 + '|')
	else:
		print(s1[:len(s1) - 1] + '=' + s2 + '|')


n = input()
lth = len(n)
a = n.find('+')
b = n.find('=') - a - 1
c = len(n) - n.find('=') - 1
if a + b == c:
	print(n)
elif a + b == c - 2:
	print('|', n[:lth - 1], sep='')
elif a + b == c + 2:
	if a >= 2:
		print(n[1:], '|', sep='')
	else:
		print(n[:a + 1], n[a + 2:], '|', sep='')
else:
	print('Impossible')


s = input()
a1 = []
for i in range(len(s)):
	if s[i] == '+':
		break
	else:
		a1.append(s[i])
a2 = []
for k in range(i + 1, len(s)):
	if s[k] == '=':
		break
	else:
		a2.append(s[k])
a3 = []
for j in range(k + 1, len(s)):
	a3.append(s[j])
c1 = a1.count('|')
c2 = a2.count('|')
c3 = a3.count('|')
if (c3 - c1 - c2) % 2 == 1:
	print('Impossible')
elif c3 == c1 + c2:
	print(s)
else:
	it = (c3 - c1 - c2) // 2
	if it == 1:
		a3.remove('|')
		a1.append('|')
		st1 = ''.join(a1)
		st2 = ''.join(a2)
		st3 = ''.join(a3)
		print(st1 + '+' + st2 + '=' + st3)
	elif it == -1:
		if c1 > 1:
			a1.remove('|')
		elif c2 > 1:
			a2.remove('|')
		else:
			print('Impossible')
		a3.append('|')
		st1 = ''.join(a1)
		st2 = ''.join(a2)
		st3 = ''.join(a3)
		print(st1 + '+' + st2 + '=' + st3)
	else:
		print('Impossible')


expression = input().split('=')
if expression[0].count('|') == expression[1].count('|'):
	print('='.join(expression))
elif abs(expression[0].count('|') - expression[1].count('|')) != 2:
	print('Impossible')
else:
	if expression[0].count('|') < expression[1].count('|'):
		expression[0] = '|' + expression[0]
		expression[1] = expression[1][1:]
	else:
		expression[1] = '|' + expression[1]
		L = expression[0].split('+')
		if len(L[0]) == 1:
			expression[0] = expression[0][:-1]
		else:
			expression[0] = expression[0][1:]
	print('='.join(expression))


def balancing(s):
	a = s.count('|', 0, s.index('+'))
	b = s.count('|', s.index('+'), s.index('='))
	c = s.count('|', s.index('='))
	sum = a + b
	if sum == c:
		print(s)
	elif sum < c and sum + 1 == c - 1:
		print('|' + s[0:-1])
	elif sum > c and sum - 1 == c + 1:
		if s.index('+') - 1 == 0:
			print(s[0:s.index('+') + 1] + s[s.index('+') + 2:] + '|')
		else:
			print(s[1:] + '|')
	else:
		print('Impossible')

def main():
	s = input()
	balancing(s)
main()


(suma, result) = input().split('=')
len_result = len(result)
(suma_1, suma_2) = suma.split('+')
(suma_1, suma_2) = (len(suma_1), len(suma_2))
len_suma = suma_1 + suma_2
if (len_suma + len_result) % 2 == 0:
	if len_suma == len_result:
		print(suma, '=', result, sep='', end='')
	elif len_suma + 2 == len_result:
		print(suma, '|', '=', result[:-1], sep='', end='')
	elif len_suma == len_result + 2:
		if suma_1 == 1:
			print(suma[:-1], '=|', result, sep='', end='')
		else:
			print(suma[1:len(suma)], '=|', result, sep='', end='')
	else:
		print('Impossible', sep='', end='')
else:
	print('Impossible', sep='', end='')


ip = input()
inp = ip.split('+')
a = len(inp[0])
b = len(inp[1].split('=')[0])
c = len(inp[1].split('=')[1])
if a + b == c:
	print(ip)
elif a + b + 1 == c - 1:
	print((a + 1) * '|' + '+' + b * '|' + '=' + (c - 1) * '|')
elif a + b - 1 == c + 1:
	if a != 1:
		print((a - 1) * '|' + '+' + b * '|' + '=' + (c + 1) * '|')
	elif b != 1:
		print(a * '|' + '+' + (b - 1) * '|' + '=' + (c + 1) * '|')
	else:
		print('Impossible')
else:
	print('Impossible')


string = input()
occured = None
A = 0
B = 0
C = 0
for c in string:
	if occured == None and c == '|':
		A += 1
	elif occured == None and c == '+':
		occured = '+'
	elif occured == '+' and c == '|':
		B += 1
	elif occured == '+' and c == '=':
		occured = '='
	elif occured == '=' and c == '|':
		C += 1
s = A + B - C
flag = True
if s == -2:
	A += 1
	C -= 1
elif s == 2:
	C += 1
	if A > 1:
		A -= 1
	else:
		B -= 1
elif s == 0:
	pass
else:
	flag = False
if flag == True:
	for _ in range(A):
		print('|', end='')
	print('+', end='')
	for _ in range(B):
		print('|', end='')
	print('=', end='')
	for _ in range(C):
		print('|', end='')
else:
	print('Impossible')


s = input()
n = len(s)
flag1 = False
flag2 = False
a = 0
b = 0
c = 0
for i in range(n):
	if flag1 == False and flag2 == False and (s[i] != '+'):
		if s[i] == '|':
			a = a + 1
	if s[i] == '+':
		flag1 = True
	if flag1 == True and flag2 == False and (s[i] != '='):
		if s[i] == '|':
			b = b + 1
	if s[i] == '=':
		flag2 = True
	if flag1 == True and flag2 == True:
		if s[i] == '|':
			c = c + 1
if abs(a + b - c) == 2:
	if a + b > c:
		if a > b:
			for _ in range(a - 1):
				print('|', end='')
			print('+', end='')
			for _ in range(b):
				print('|', end='')
			print('=', end='')
			for _ in range(c + 1):
				print('|', end='')
		else:
			for _ in range(a):
				print('|', end='')
			print('+', end='')
			for _ in range(b - 1):
				print('|', end='')
			print('=', end='')
			for _ in range(c + 1):
				print('|', end='')
	else:
		for _ in range(a + 1):
			print('|', end='')
		print('+', end='')
		for _ in range(b):
			print('|', end='')
		print('=', end='')
		for _ in range(c - 1):
			print('|', end='')
	print()
elif a + b == c:
	print(s)
else:
	print('Impossible')


s = input()
s1 = s[:s.index('+')]
s2 = s[s.index('+') + 1:s.index('=')]
s3 = s[s.index('=') + 1:]
s1 = s1.replace(' ', '')
s2 = s2.replace(' ', '')
s3 = s3.replace(' ', '')
l = len(s2) + len(s1)
if l == len(s3):
	print(s)
elif abs(len(s3) - l) <= 2:
	if l < len(s3):
		s1 = list(s1)
		s1.append('|')
		s3 = list(s3)
		s3.remove('|')
	else:
		s3 = list(s3)
		s3.append('|')
		if len(s1) != 1:
			s1 = list(s1)
			s1.remove('|')
		else:
			s2 = list(s2)
			s2.remove('|')
	if len(s1) + len(s2) == len(s3):
		s1 = ''.join(s1)
		s2 = ''.join(s2)
		s3 = ''.join(s3)
		print(s1 + '+' + s2 + '=' + s3)
	else:
		print('Impossible')
else:
	print('Impossible')


def validate_expression(arr):
	ini = arr.index('=')
	sicks_right = len(arr) - 1 - ini
	sicks_lefth = 0
	for i in range(ini):
		if arr[i] == '|':
			sicks_lefth = sicks_lefth + 1
	dif = sicks_lefth - sicks_right
	if dif < 0:
		dif = dif * -1
	if dif == 2:
		if sicks_lefth > sicks_right:
			cant_a = arr.index('+') - 1
			cant_b = cant_a + 1 - ini
			if cant_b < 0:
				cant_b = cant_b * -1
			if cant_a >= 1:
				print(arr[1:] + '|')
			else:
				print(arr[0:cant_a + 2] + arr[cant_a + 3:len(arr)] + '|')
		else:
			print('|' + arr[0:len(arr) - 1])
	elif sicks_lefth == sicks_right:
		print(arr)
	else:
		print('Impossible')
exp = input()
validate_expression(exp)


s = input()
a = s[:s.index('+')].count('|')
b = s[s.index('+'):s.index('=')].count('|')
c = s[s.index('='):].count('|')
if a + b - c == 2:
	if a > b:
		a -= 1
	else:
		b -= 1
	c += 1
	print(a * '|', '+', b * '|', '=', c * '|', sep='')
elif a + b - c == -2:
	c -= 1
	a += 1
	print(a * '|', '+', b * '|', '=', c * '|', sep='')
elif a + b == c:
	print(s)
else:
	print('Impossible')


t = input()
b = t.index('+')
c = t.index('=')
d = len(t[c:]) - 1
c = t.index('=') - b - 1
e = len(t) - 1
f = b + c
if f == d:
	print(t)
elif f - d == 2:
	g = t[:e] + '|' + t[e:]
	if b == 1:
		h = g[0:b + 2] + g[b + 3:]
	else:
		h = g[1:]
	print(h)
elif d - f == 2:
	g = t[:b] + '|' + t[b:]
	h = g[:e + 1]
	print(h)
else:
	print('Impossible')


e = str(input())
(a, b, c) = (e.index('+'), e.index('=') - e.index('+') - 1, len(e) - e.index('=') - 1)
if a + b == c:
	print(e)
elif a > 1 and a - 1 + b == c + 1:
	print('|' * (a - 1) + '+' + '|' * b + '=' + '|' * (c + 1))
elif b > 1 and a + b - 1 == c + 1:
	print('|' * a + '+' + '|' * (b - 1) + '=' + '|' * (c + 1))
elif c > 1 and a + 1 + b == c - 1:
	print('|' * (a + 1) + '+' + '|' * b + '=' + '|' * (c - 1))
else:
	print('Impossible')


text = input()
x = text.split('=')
y = len(x[0])
z = len(x[1])
if y - 1 == z:
	print(text)
elif y - 1 + 2 == z:
	print('|' + text[:-1])
elif y - 1 == z + 2:
	s_sp = x[0].split('+')
	if len(s_sp[0]) == 1:
		print(s_sp[0] + '+' + s_sp[1][:-1] + '=' + x[1] + '|')
	else:
		print(text[1:] + '|')
else:
	print('Impossible')


s = input()
a = 0
b = 0
c = 0
i = 0
while s[i] != '+':
	a += 1
	i += 1
i += 1
while s[i] != '=':
	b += 1
	i += 1
i += 1
while i < len(s):
	c += 1
	i += 1
if a + b == c:
	print(s)
elif a - 1 + b == c + 1:
	if a >= b:
		for i in range(a - 1):
			print('|', end='')
		print('+', end='')
		for i in range(b):
			print('|', end='')
		print('=', end='')
		for i in range(c + 1):
			print('|', end='')
	else:
		for i in range(a):
			print('|', end='')
		print('+', end='')
		for i in range(b - 1):
			print('|', end='')
		print('=', end='')
		for i in range(c + 1):
			print('|', end='')
elif a + 1 + b == c - 1:
	for i in range(a + 1):
		print('|', end='')
	print('+', end='')
	for i in range(b):
		print('|', end='')
	print('=', end='')
	for i in range(c - 1):
		print('|', end='')
else:
	print('Impossible')


string = input().strip()
(a1, a2) = string.split('=')[0].split('+')
b = string.split('=')[1]
len_a = len(a1) + len(a2)
if abs(len_a - len(b)) > 2 or abs(len_a - len(b)) == 1:
	print('Impossible')
elif len_a - len(b) == 0:
	print(string)
elif len(b) - len_a == 2:
	print('%s|+%s=%s' % (a1, a2, b[:-1]))
elif len(a1) == 1:
	print('%s+%s=%s|' % (a1, a2[:-1], b))
else:
	print('%s+%s=%s|' % (a1[:-1], a2, b))


s = input()
(x, y) = s.split('=')
(a, b) = x.split('+')
if len(a) + len(b) == len(y):
	print(s)
elif len(a) + len(b) == len(y) + 2:
	if len(a) > 1:
		a = a[:-1]
	else:
		b = b[:-1]
	y = y + '|'
	print(a + '+' + b + '=' + y)
elif len(a) + len(b) == len(y) - 2:
	a = a + '|'
	y = y[:-1]
	print(a + '+' + b + '=' + y)
else:
	print('Impossible')


(a, b) = input().split('=')
if abs(len(a) - 1 - len(b)) not in [0, 2]:
	print('Impossible')
elif len(a) - 1 == len(b):
	print(a + '=' + b)
elif len(a) - 1 < len(b):
	print('|' + a + '=' + b[:-1])
elif a.find('+') > 1:
	print(a[1:] + '=' + b + '|')
else:
	print(a[:-1] + '=' + b + '|')


import re

def count(x):
	return x.count('|')
text = input()
x = re.split('\\+|\\=', text)
lst = list(map(count, x))
if x[0] + x[1] == x[2]:
	print(x[0] + '+' + x[1] + '=' + x[2])
elif lst[0] > 1 and lst[0] - 1 + (lst[1] + 1) == lst[2]:
	print('|' * (lst[0] - 1) + '+' + '|' * (lst[1] + 1) + '=' + '|' * lst[2])
elif lst[1] > 1 and lst[0] + 1 + (lst[1] - 1) == lst[2]:
	print('|' * (lst[0] + 1) + '+' + '|' * (lst[1] - 1) + '=' + '|' * lst[2])
elif lst[0] > 1 and lst[0] - 1 + lst[1] == lst[2] + 1:
	print('|' * (lst[0] - 1) + '+' + '|' * lst[1] + '=' + '|' * (lst[2] + 1))
elif lst[2] > 1 and lst[0] + 1 + lst[1] == lst[2] - 1:
	print('|' * (lst[0] + 1) + '+' + '|' * lst[1] + '=' + '|' * (lst[2] - 1))
elif lst[2] > 1 and lst[0] + (lst[1] + 1) == lst[2] - 1:
	print('|' * lst[0] + '+' + '|' * (lst[1] + 1) + '=' + '|' * (lst[2] - 1))
elif lst[1] > 1 and lst[0] + (lst[1] - 1) == lst[2] + 1:
	print('|' * lst[0] + '+' + '|' * (lst[1] - 1) + '=' + '|' * (lst[2] + 1))
else:
	print('Impossible')


s = input()
a = len(s.partition('+')[0])
b = len(s.partition('=')[0].partition('+')[2])
c = len(s.partition('=')[2])
if a + b == c:
	print(s)
elif a + b - 1 == c + 1:
	if a > 1:
		print('|' * (a - 1) + '+' + '|' * b + '=' + '|' * (c + 1))
	elif b > 1:
		print('|' * a + '+' + '|' * (b - 1) + '=' + '|' * (1 + c))
	else:
		print('Impossible')
elif a + b + 1 == c - 1:
	if c > 1:
		print('|' * (a + 1) + '+' + '|' * b + '=' + '|' * (c - 1))
	else:
		print('Impossible')
else:
	print('Impossible')


import re
s = input()
c = [x.count('|') for x in re.split('[+=]', s)]
delta = c[0] + c[1] - c[2]
if delta % 2 == 1 or delta ** 2 > 4:
	print('Impossible')
elif delta == 0:
	print(s)
else:
	x = 1 if delta > 0 else -1
	i = 0 if c[0] > c[1] else 1
	(c[i], c[2]) = (c[i] - x, c[2] + x)
	print('|' * c[0] + '+' + '|' * c[1] + '=' + '|' * c[2])


a = input()
(i, k, m) = (1, 0, 1)
n1 = '0'
while m != 2:
	n1 = a[0:i]
	if n1[k] != '+':
		i += 1
		k += 1
	else:
		n1 = a[:k]
		m = 2
q = len(n1)
k += 1
i = k + 1
m = 1
n2 = '0'
while m != 2:
	n2 = a[0:i]
	if a[i] != '=':
		i += 1
	else:
		n2 = a[k:i]
		m = 2
w = len(n2)
i += 1
m = 1
n3 = '0'
n3 = a[i:-1]
e = len(n3) + 1
(z, x, c) = ('1', '1', '1')
sum = q + w
if sum == e:
	print(a)
elif (sum == e + 1) | (sum == e - 1) | (sum < e - 2) | (sum > e + 2):
	print('Impossible')
elif sum == e + 2:
	if q != 1:
		q -= 1
	else:
		w -= 1
	z = '|' * q
	x = '|' * w
	c = '|' * (e + 1)
	print(z, '+', x, '=', c, sep='')
elif e != 1 & sum != 2:
	q += 1
	z = '|' * q
	x = '|' * w
	c = '|' * (e - 1)
	print(z, '+', x, '=', c, sep='')
else:
	print('Impossible')


st = input()
copy = st.split('=')
if copy[0].count('|') + 2 == copy[1].count('|'):
	st = '|' + st[:len(st) - 1]
elif copy[0].count('|') == copy[1].count('|') + 2:
	if copy[0].split('+')[0].count('|') < 2:
		st = f'{copy[0][:-1]}={copy[1]}|'
	else:
		st = st[1:] + '|'
elif copy[0].count('|') != copy[1].count('|'):
	st = 'Impossible'
print(st)


expression = input()
a = expression.find('+')
b = expression.find('=') - a - 1
c = len(expression) - expression.find('=') - 1
if a + b == c:
	print(expression)
elif a + b - 1 == c + 1:
	if a > b:
		print('|' * (a - 1) + '+' + '|' * b + '=' + '|' * (c + 1))
	else:
		print('|' * a + '+' + '|' * (b - 1) + '=' + '|' * (c + 1))
elif a + b + 1 == c - 1:
	print('|' * (a + 1) + '+' + '|' * b + '=' + '|' * (c - 1))
else:
	print('Impossible')


from collections import Counter
import string
import math
import sys

def array_int():
	return [int(i) for i in sys.stdin.readline().split()]

def vary(number_of_variables):
	if number_of_variables == 1:
		return int(sys.stdin.readline())
	if number_of_variables >= 2:
		return map(int, sys.stdin.readline().split())

def makedict(var):
	return dict(Counter(var))
mod = 100000007
s = input()
x = y = n = 0
t = s.find('+')
tt = s.find('=')
x = s.count('|', 0, t)
y = s.count('|', t + 1, tt)
n = s.count('|', tt + 1, len(s))
if x + y == n:
	print(s)
elif x + 1 + y == n - 1:
	print('|' * (x + 1) + '+' + '|' * y + '=' + '|' * (n - 1))
elif x - 1 + y == n + 1:
	if x != 1:
		print('|' * (x - 1) + '+' + '|' * y + '=' + '|' * (n + 1))
	elif y > 1:
		print('|' * x + '+' + '|' * (y - 1) + '=' + '|' * (n + 1))
	else:
		print('Impossible')
else:
	print('Impossible')


stri = input()
one = 0
two = 0
res = 0
stres = ''
temp = stri.find('+')
teme = stri.find('=')
one = len(stri[:temp])
two = len(stri[temp + 1:teme])
res = len(stri[teme + 1:])
if one + two < res:
	one += 1
	res -= 1
elif one + two > res:
	res += 1
	if one > two:
		one -= 1
	else:
		two -= 1
if one + two == res:
	stres = '|' * one + '+' + '|' * two + '=' + '|' * res
	print(stres)
else:
	print('Impossible')


s = input()
(A, B, C) = ([], [], [])
V = [i for i in s]
v = V.copy()
for i in range(len(v)):
	if v[i] != '+':
		A.append(v[i])
		V.remove(V[0])
	else:
		V.remove(V[0])
		break
v = V.copy()
for i in range(len(v)):
	if v[i] != '=':
		B.append(v[i])
		V.remove(V[0])
	else:
		V.remove(V[0])
		break
C = V
if (len(A) + len(B) + len(C)) % 2 == 0:
	if len(A) + len(B) == len(C):
		print(*A, '+', *B, '=', *C, sep='')
	elif len(A) + 1 + len(B) == len(C) - 1:
		C.remove(C[0])
		A.append('|')
		print(*A, '+', *B, '=', *C, sep='')
	elif len(A) - 1 + len(B) == len(C) + 1:
		A.remove(A[0])
		C.append('|')
		if A:
			print(*A, '+', *B, '=', *C, sep='')
		else:
			B.remove(B[0])
			A.append('|')
			print(*A, '+', *B, '=', *C, sep='')
	else:
		print('Impossible')
else:
	print('Impossible')


str = input()
instr = str.split('=')
if '+' in instr[0]:
	sum = True
	first = instr[0].split('+')
else:
	sum = False
	first = instr[0].split('-')
if sum and len(instr[1]) == len(instr[0]) - 1 or (not sum and len(first[0]) - len(first[1]) == len(instr[1])):
	output = str
elif sum and len(instr[1]) + 1 == len(instr[0]) - 2 or (not sum and len(first[0]) - len(first[1]) - 1 == len(instr[1]) + 1):
	if len(first[0]) == 1:
		output = str[:2] + str[3:] + '|'
	else:
		output = str[1:] + '|'
elif sum and len(instr[1]) - 1 == len(instr[0]) or (not sum and len(first[0]) - len(first[1]) + 1 == len(instr[1]) - 1):
	output = '|' + str[:len(str) - 1]
else:
	output = 'Impossible'
print(output)


n = input().split('+')
fh = len(n[0])
sh = len(n[1].split('=')[0])
e = len(n[1].split('=')[1])
if fh + sh - e == -2:
	print((fh + 1) * '|' + '+' + sh * '|' + '=' + (e - 1) * '|')
elif fh + sh - e == 0:
	print(n[0] + '+' + n[1])
elif fh + sh - e == 2:
	if fh > 1:
		print((fh - 1) * '|' + '+' + sh * '|' + '=' + (e + 1) * '|')
	else:
		print(fh * '|' + '+' + (sh - 1) * '|' + '=' + (e + 1) * '|')
else:
	print('Impossible')


a = input()
n = 0
f = 0
s = 0
d = 0
m = False
z = False
for i in a:
	if i == '|':
		if not m and (not z):
			f += 1
		if m and (not z):
			s += 1
		if m and z:
			d += 1
	if i == '+':
		m = True
	if i == '=':
		z = True
delt = f + s - d
if delt < 0:
	delt *= -1
if delt != 2 and delt != 0:
	print('Impossible')
elif f + s == d:
	print(a)
elif f + s > d:
	if f > s:
		if f - 1 > 0:
			f -= 1
			d += 1
			s = f * '|' + '+' + s * '|' + '=' + d * '|'
			print(s)
	elif s - 1 > 0:
		s -= 1
		d += 1
		s = f * '|' + '+' + s * '|' + '=' + d * '|'
		print(s)
	else:
		print('Impossible')
elif d - 1 > 0:
	d -= 1
	f += 1
	s = f * '|' + '+' + s * '|' + '=' + d * '|'
	print(s)
else:
	print('Impossible')


s = input()
l = []
l = s.split('+')
temp = l[1].split('=')
l[1] = temp[0]
l.append(temp[1])
a = []
for i in l:
	a.append(i.count('|'))
result = a[0] + a[1] - a[2]
if result == 0:
	print(s)
elif result == 2:
	l[2] += '|'
	if a[0] == 1:
		l[1] = l[1][:-1]
	else:
		l[0] = l[0][:-1]
	print(l[0] + '+' + l[1] + '=' + l[2])
elif result == -2:
	l[0] += '|'
	l[2] = l[2][:-1]
	print(l[0] + '+' + l[1] + '=' + l[2])
else:
	print('Impossible')


s = input()
(i, a, b, c) = [0] * 4
while s[i] != '+':
	a += 1
	i += 1
i += 1
while s[i] != '=':
	b += 1
	i += 1
i += 1
tmp = len(s)
while i < tmp:
	c += 1
	i += 1
if a + b == c:
	print(s)
elif (a + b) % 2 != c % 2:
	print('Impossible')
else:
	tmp = 0
	if a + b < c:
		while a + b != c:
			a += 1
			c -= 1
			tmp += 1
	else:
		while a + b != c:
			if a > 1:
				a -= 1
			else:
				b -= 1
			c += 1
			tmp += 1
	if tmp > 1:
		print('Impossible')
	else:
		print('|' * a + '+' + '|' * b + '=' + '|' * c)


def function(expr):
	(A, subexpr) = expr.split('+')
	(B, C) = subexpr.split('=')
	a = A.count('|')
	b = B.count('|')
	c = C.count('|')
	if abs(a + b - c) == 2:
		if a + b > c:
			if a != 1:
				a -= 1
				c += 1
			else:
				b -= 1
				c += 1
		else:
			c -= 1
			a += 1
		return '|' * a + '+' + '|' * b + '=' + '|' * c
	elif abs(a + b - c) == 0:
		return expr
	else:
		return 'Impossible'

def main():
	expr = input().strip()
	expr = function(expr)
	print(expr)
main()


str = input()
i = 0
A = str.split('+')[0].count('|')
A_ = str.split('+')[1]
B = A_.split('=')[0].count('|')
C = A_.split('=')[1].count('|')
if A + B == C:
	print(str)
elif A + 1 + B == C - 1:
	print('|' * (A + 1) + '+' + '|' * B + '=' + '|' * (C - 1))
elif A + B - 1 == C + 1:
	if A - 1 <= 0:
		print('|' * A + '+' + '|' * (B - 1) + '=' + '|' * (C + 1))
	else:
		print('|' * (A - 1) + '+' + '|' * B + '=' + '|' * (C + 1))
else:
	print('Impossible')


s = input()
(a, b) = (s[:s.index('=')].count('|'), s[s.index('='):].count('|'))
if a == b:
	print(s)
	exit()
if abs(b - a) != 2:
	print('Impossible')
elif a > b:
	if s[1] != '+':
		print(s[1:] + '|')
	else:
		print(s[:s.index('=') - 1] + s[s.index('='):] + '|')
elif a < b:
	print('|' + s[:-1])


s = input()
ab = s.find('=') - 1
c = len(s) - ab - 2
if ab == c:
	s
elif ab + 2 == c:
	s = '|' + s[:-1]
elif ab == c + 2 and ab > 2:
	if s.find('+') > 1:
		s = s[1:] + '|'
	else:
		s = s[:s.find('=') - 1] + s[s.find('='):] + '|'
else:
	s = 'Impossible'
print(s)


def print_ans(l, r, ans):
	print('|' * l + '+' + '|' * r + '=' + '|' * ans)
sticks = input()
(plus, equals) = (sticks.find('+'), sticks.find('='))
(l, r, ans) = (plus, equals - plus - 1, len(sticks) - equals - 1)
if abs(l + r - ans) in (0, 2):
	if l + r > ans:
		if l > 1:
			(l, ans) = (l - 1, ans + 1)
		else:
			(r, ans) = (r - 1, ans + 1)
	elif l + r < ans:
		(l, ans) = (l + 1, ans - 1)
	print_ans(l, r, ans)
else:
	print('Impossible')


def printer(a, b, c):
	ans = ''
	for i in range(int(a)):
		ans += '|'
	ans += '+'
	for i in range(int(b)):
		ans += '|'
	ans += '='
	for i in range(int(c)):
		ans += '|'
	print(ans)
a = input()
n1 = len(a[:a.index('+')])
n2 = len(a[a.index('+') + 1:a.index('=')])
n3 = len(a[a.index('=') + 1:])
if n1 + n2 == n3:
	print(a)
elif n1 + n2 - n3 == 2:
	if n1 > n2:
		printer(n1 - 1, n2, n3 + 1)
	else:
		printer(n1, n2 - 1, n3 + 1)
elif n3 - (n1 + n2) == 2:
	printer(n1 + 1, n2, n3 - 1)
else:
	print('Impossible')


n = input()
(a, b, c, d) = (0, 0, 0, 1)
for i in n:
	if i == '+':
		d = 2
	elif i == '=':
		d = 3
	elif d == 1:
		a += 1
	elif d == 2:
		b += 1
	else:
		c += 1
razn = c - (a + b + c) / 2
if a + b == c:
	print(n)
elif razn == -1:
	razn = int(razn)
	if b == 1:
		print('|' * (a + razn) + '+' + '|' * b + '=' + '|' * (c - razn))
	else:
		print('|' * a + '+' + '|' * (b + razn) + '=' + '|' * (c - razn))
elif razn == 1:
	razn = int(razn)
	print('|' * a + '+' + '|' * (b + razn) + '=' + '|' * (c - razn))
else:
	print('Impossible')


a = input()
n = len(a)
if n % 2 or n < 6:
	print('Impossible')
else:
	n //= 2
	if '=' in a[n - 1:n + 2]:
		if a[n - 1] != '+':
			print(a[:n - 1] + '|=' + '|' * (n - 1))
		else:
			print('|' * (n - 2) + '+|=' + '|' * (n - 1))
	else:
		print('Impossible')


entrada = input()
solucion = False
a = 0
b = 0
c = 0
for i in range(len(entrada) - 1):
	if entrada[i] == '+':
		a = i
	elif entrada[i] == '=':
		b = i - a - 1
	c = len(entrada) - a - b - 2
if a + b == c and solucion == False:
	print(entrada)
	solucion = True
if c > 1:
	c -= 1
	a += 1
	if a + b == c and solucion == False:
		print('|' * a + '+' + '|' * b + '=' + '|' * c)
		solucion = True
	c += 1
	a -= 1
if a > 1:
	c += 1
	a -= 1
	if a + b == c and solucion == False:
		print('|' * a + '+' + '|' * b + '=' + '|' * c)
		solucion = True
	c -= 1
	a += 1
if b > 1:
	c += 1
	b -= 1
	if a + b == c and solucion == False:
		print('|' * a + '+' + '|' * b + '=' + '|' * c)
		solucion = True
	c -= 1
	b += 1
if solucion == False:
	print('Impossible')


n = input()
(first_add, second_add, summ) = (len(n[:n.index('+')]), len(n[n.index('+') + 1:n.index('=')]), len(n[n.index('=') + 1:]))
if first_add + second_add == summ:
	print(first_add * '|' + '+' + second_add * '|' + '=' + summ * '|')
elif first_add - 1 + second_add == summ + 1 and first_add - 1 != 0:
	print((first_add - 1) * '|' + '+' + second_add * '|' + '=' + (summ + 1) * '|')
elif first_add + second_add - 1 == summ + 1 and second_add - 1 != 0:
	print(first_add * '|' + '+' + (second_add - 1) * '|' + '=' + (summ + 1) * '|')
elif first_add + 1 + second_add == summ - 1:
	print((first_add + 1) * '|' + '+' + second_add * '|' + '=' + (summ - 1) * '|')
else:
	print('Impossible')


s = input()
op1 = 0
op2 = 0
res = 0
for i in range(0, len(s)):
	if s[i] == '+':
		break
	op1 += 1
for j in range(i + 1, len(s)):
	if s[j] == '=':
		break
	op2 += 1
res = len(s) - j - 1
add = op1 + op2 - res
diff = abs(op1 + op2 - res)
if diff == 0 or diff == 2:
	if add < 0:
		op1 += 1
		res = res - 1
	elif add > 0:
		if op1 > 1:
			op1 = op1 - 1
			res += 1
		else:
			op2 = op2 - 1
			res += 1
	for k in range(0, op1):
		print('|', end='')
	print('+', end='')
	for m in range(0, op2):
		print('|', end='')
	print('=', end='')
	for z in range(0, res):
		print('|', end='')
else:
	print('Impossible')


t = input()
k = t.find('=')
n = 2 * k - len(t)
if n == 2:
	if t[1] != '+':
		t = t[1:] + '|'
	else:
		t = t[:k - 1] + t[k:] + '|'
elif n == -2:
	t = '|' + t[:-1]
elif n != 0:
	t = 'Impossible'
print(t)


t = input()
s = t.split('+')
s = [s[0]] + s[1].split('=')
(a, b, c) = (len(s[0]), len(s[1]), len(s[2]))
if a + b == c:
	pass
elif b > 1 and a + b - 1 == c + 1:
	b -= 1
	c += 1
elif a > 1 and a - 1 + b == c + 1:
	a -= 1
	c += 1
elif c > 1 and a + b + 1 == c - 1:
	b += 1
	c -= 1
else:
	print('Impossible')
	exit()
print('{}+{}={}'.format(a * '|', b * '|', c * '|'))


sr = input()
(a, b) = sr.split('=')
(x, y) = map(len, a.split('+'))
z = len(b)
if x + y == z:
	print(sr)
elif x + y - z == 2:
	if x - 1 > 0:
		print('|' * (x - 1) + '+' + '|' * y + '=' + '|' * (z + 1))
	else:
		print('|' * x + '+' + '|' * (y - 1) + '=' + '|' * (z + 1))
elif x + y - z == -2:
	print('|' * (x + 1) + '+' + '|' * y + '=' + '|' * (z - 1))
else:
	print('Impossible')


s = input()
a = -1
c = 0
result = ''
for letter in s:
	if letter != '=':
		a += 1
	else:
		break
c = len(s) - 2 - a
if c == a:
	result = s
elif c - a == 2:
	result = s[-1] + s[0:-1]
elif c - a == -2:
	if s[1] != '+':
		result = s[1:] + s[0]
	else:
		result = s[0:3] + s[4:] + s[0]
else:
	result = 'Impossible'
print(result)


s = input()
a = s[:s.index('+')]
b = s[s.index('+') + 1:s.index('=')]
c = s[s.index('=') + 1:]
a1 = len(a)
b1 = len(b)
c1 = len(c)
if a1 + b1 == c1:
	print(s)
elif abs(a1 + b1 - c1) > 2:
	print('Impossible')
elif abs(a1 + b1 - c1) == 1:
	print('Impossible')
elif a1 + b1 > c1:
	if a1 >= b1:
		print('|' * (a1 - 1) + '+' + '|' * b1 + '=' + '|' * (c1 + 1))
	else:
		print('|' * a1 + '+' + '|' * (b1 - 1) + '=' + '|' * (c1 + 1))
elif a1 + b1 < c1:
	print('|' * (a1 + 1) + '+' + '|' * b1 + '=' + '|' * (c1 - 1))


a = list(input())
ans = ''
a1 = a.index('+')
a2 = a.index('=')
ans1 = a1
ans2 = a2 - a1 - 1
ans3 = len(a) - a2 - 1
if ans1 + ans2 == ans3:
	for i in range(len(a)):
		ans += a[i]
	print(ans)
elif ans1 + ans2 + 1 == ans3 - 1:
	del a[-1]
	a.insert(0, '|')
	for i in range(len(a)):
		ans += a[i]
	print(ans)
elif ans1 + ans2 - 1 == ans3 + 1:
	if ans1 > 1:
		del a[0]
		a.append('|')
		for i in range(len(a)):
			ans += a[i]
		print(ans)
	else:
		for i in range(ans1):
			ans += '|'
		ans += '+'
		for i in range(ans2 - 1):
			ans += '|'
		ans += '='
		for i in range(ans3 + 1):
			ans += '|'
		print(ans)
else:
	print('Impossible')


def check(a, b, c):
	if a + b == c:
		return '|' * a + '+' + '|' * b + '=' + '|' * c
	if a + b == c - 2:
		a += 1
		c -= 1
		return '|' * a + '+' + '|' * b + '=' + '|' * c
	if a + b == c + 2:
		if a > b:
			a -= 1
		else:
			b -= 1
		c += 1
		return '|' * a + '+' + '|' * b + '=' + '|' * c
	return 'Impossible'
line = input()
(a, b) = line.split('+')
(b, c) = b.split('=')
a = len(a)
b = len(b)
c = len(c)
print(check(a, b, c))


from sys import stdin
a = list(stdin.readline())
a.pop()
cont = 0
pos = 0
cont1 = 0
cont2 = 0
while a[pos] != '+':
	cont = cont + 1
	pos = pos + 1
pos += 1
while a[pos] != '=':
	cont2 = cont2 + 1
	pos = pos + 1
pos = -1
while a[pos] != '=':
	cont1 = cont1 + 1
	pos = pos - 1
if cont + cont2 < cont1:
	del a[-1]
	a.insert(0, '|')
	cont = cont + 1
	cont1 = cont1 - 1
elif cont + cont2 > cont1:
	del a[0]
	a.insert(-1, '|')
	cont = cont - 1
	cont1 = cont1 + 1
if cont == 0 and cont2 > 1:
	cont2 = cont2 - 1
	cont = cont + 1
if cont2 == 0 and cont > 1:
	cont2 = cont2 + 1
	cont = cont - 1
if cont + cont2 < cont1 or cont + cont2 > cont1:
	print('Impossible')
elif cont + cont2 == cont1:
	print('|' * cont + '+' + '|' * cont2 + '=' + '|' * cont1)


def crum(x):
	y = ''
	for i in range(x):
		y += '|'
	return y
(a, b) = input().split('+')
s = a + '+' + b
(b, c) = b.split('=')
x = a.count('|')
y = b.count('|')
z = c.count('|')
if x + y == z:
	print(s)
elif x - 1 + (y + 1) == z and x - 1 > 0:
	print(crum(x - 1) + '+' + crum(y + 1) + '=' + crum(z))
elif x - 1 + y == z + 1 and x - 1 > 0:
	print(crum(x - 1) + '+' + crum(y) + '=' + crum(z + 1))
elif x + 1 + (y - 1) == z and y - 1 > 0:
	print(crum(x + 1) + '+' + crum(y - 1) + '=' + crum(z))
elif x + (y - 1) == z + 1 and y - 1 > 0:
	print(crum(x) + '+' + crum(y - 1) + '=' + crum(z + 1))
elif x + 1 + y == z - 1 and z - 1 > 0:
	print(crum(x + 1) + '+' + crum(y) + '=' + crum(z - 1))
elif x + (y + 1) == z - 1 and z - 1 > 0:
	print(crum(x) + '+' + crum(y + 1) + '=' + crum(z - 1))
else:
	print('Impossible')


expression = input()
exp = expression.split('=')
c = len(exp[1])
exp = exp[0].split('+')
(a, b) = (len(exp[0]), len(exp[1]))
if a + b == c:
	print('|' * a + '+' + '|' * b + '=' + '|' * c)
elif a + b + 1 == c - 1:
	print('|' * a + '+' + '|' * (b + 1) + '=' + '|' * (c - 1))
elif a + b - 1 == c + 1:
	if b == 1:
		print('|' * (a - 1) + '+' + '|' * b + '=' + '|' * (c + 1))
	else:
		print('|' * a + '+' + '|' * (b - 1) + '=' + '|' * (c + 1))
else:
	print('Impossible')


s = input()
ind = s.index('=')
(left, right) = (s[:ind], s[ind + 1:])
ind = left.index('+')
(a, b) = (left[:ind], left[ind + 1:])
(A, B, C) = (len(a), len(b), len(right))
if abs(1 - abs(A + B - C)) != 1:
	print('Impossible')
	exit()
if A + B == C:
	print(s)
	exit()
if A + B + 1 == C - 1:
	print((A + 1) * '|' + '+' + B * '|' + '=' + (C - 1) * '|')
	exit()
if A + B - 1 == C + 1:
	if 1 < A >= B:
		print((A - 1) * '|' + '+' + B * '|' + '=' + (C + 1) * '|')
		exit()
	if A < B > 1:
		print(A * '|' + '+' + (B - 1) * '|' + '=' + (C + 1) * '|')
		exit()


s = str(input())
m = s.split('=')
count = 0
c = s.count('|')
m1 = m[0]
m2 = m[1]
t1 = m[0].count('|')
t2 = m[1].count('|')
t = abs((t1 - t2) // 2)
if c % 2 != 0 or t > 1:
	print('Impossible')
elif t1 < t2:
	m1 = m1 + '|'
	m2 = m2[t:]
	print(m1 + '=' + m2)
elif t1 > t2:
	x = m1.split('+')
	if x[0] == '|':
		m1 = m1[:len(m1) - 1]
		m2 = m2 + '|'
		print(m1 + '=' + m2)
	else:
		m1 = m1[1:]
		m2 = m2 + '|'
		print(m1 + '=' + m2)
else:
	print(m1 + '=' + m2)


(s, c) = input().split('=')
(a, b) = s.split('+')
(a, b, c) = map(len, [a, b, c])
if a + b != c:
	if a > 1 and a - 1 + b == c + 1:
		a -= 1
		c += 1
	elif b > 1 and a + b - 1 == c + 1:
		b -= 1
		c += 1
	elif c > 1 and a + 1 + b == c - 1:
		c -= 1
		a += 1
	else:
		print('Impossible')
		exit()
print('|' * a + '+' + '|' * b + '=' + '|' * c)


s = input()
(s1, s2) = s.split('+')
(s2, s3) = s2.split('=')
l1 = len(s1)
l2 = len(s2)
l3 = len(s3)
if l1 + l2 == l3:
	print(s)
elif l1 + l2 + 2 == l3:
	print('|' * (l1 + 1) + '+' + s2 + '=' + '|' * (l3 - 1))
elif l1 + l2 == l3 + 2:
	if l2 < l1:
		print('|' * (l1 - 1) + '+' + s2 + '=' + '|' * (l3 + 1))
	else:
		print(s1 + '+' + '|' * (l2 - 1) + '=' + '|' * (l3 + 1))
else:
	print('Impossible')


s = str(input())
plus = s.find('+')
equal = s.find('=')
first = s[:plus].count('|')
second = s[plus + 1:equal].count('|')
third = s[equal + 1:].count('|')
if int(first) + int(second) == int(third):
	print(int(first) * '|' + '+' + int(second) * '|' + '=' + int(third) * '|')
elif int(first) + 1 + int(second) == int(third) - 1:
	first = int(first) + 1
	third = int(third) - 1
	print(int(first) * '|' + '+' + int(second) * '|' + '=' + int(third) * '|')
elif int(first) + int(second) - 1 == int(third) + 1:
	if int(first) != 1:
		first = int(first) - 1
	else:
		second = int(second) - 1
	third = int(third) + 1
	print(int(first) * '|' + '+' + int(second) * '|' + '=' + int(third) * '|')
else:
	print('Impossible')


import re
(a, b, c) = map(len, re.split('\\+|=', input()))
for i in [0, -1, 1]:
	if a + b - i == c + i:
		if a - i > 0:
			print(f"{'|' * (a - i)}+{'|' * b}={'|' * (c + i)}")
			exit()
		if b - i > 0:
			print(f"{'|' * a}+{'|' * (b - i)}={'|' * (c + i)}")
			exit()
print('Impossible')


def count(sticks):
	return len(sticks)
(lhs, rhs) = input().split('=')
(a, b) = [count(i) for i in lhs.split('+')]
c = count(rhs)
if c == a + b + 2:
	c -= 1
	a += 1
elif c == a + b - 2 and (a > 1 or b > 1):
	c += 1
	if a > 1:
		a -= 1
	else:
		b -= 1
if a + b == c:
	print('|' * a + '+' + '|' * b + '=' + '|' * c)
else:
	print('Impossible')


v = input().split('+')
a = len(v[0])
v = v[1].split('=')
b = len(v[0])
c = len(v[1])

def good(a, b, c):
	return a + b == c and a > 0 and (b > 0) and (c > 0)
if good(a - 1, b, c + 1):
	a = a - 1
	c = c + 1
if good(a, b - 1, c + 1):
	b = b - 1
	c = c + 1
if good(a + 1, b, c - 1):
	a = a + 1
	c = c - 1
if good(a, b + 1, c - 1):
	b = b + 1
	c = c - 1
if a + b == c:
	print('|' * a + '+' + '|' * b + '=' + '|' * c)
else:
	print('Impossible')


a = input()
list2 = list(a)
b = int(len(list2))
if b / 2 != int(b / 2):
	print('Impossible')
else:
	c = list2.index('+')
	d = list2.index('=')
	delta = b - d - 1 - (d - 1)
	if abs(delta) > 2:
		print('Impossible')
	elif delta == 0:
		for i in range(b):
			print(list2[i], end='')
	elif delta == 2:
		list2[d] = '|'
		list2[d + 1] = '='
		for i in range(b):
			print(list2[i], end='')
	elif d - c == 2:
		list2[d] = '|'
		list2[d - 1] = '='
		list2[c] = '|'
		list2[c - 1] = '+'
		for i in range(b):
			print(list2[i], end='')
	else:
		list2[d] = '|'
		list2[d - 1] = '='
		for i in range(b):
			print(list2[i], end='')


def main():
	s = input().strip()
	l = s.split('=')
	temp = l[0].split('+')
	res = [0] * 3
	res[0] = temp[0].count('|')
	res[1] = temp[1].count('|')
	res[2] = l[1].count('|')
	lhs = res[0] + res[1]
	rhs = res[2]
	if abs(lhs - rhs) <= 2:
		diff = lhs - rhs
		if diff == 0:
			return s
		elif diff > 0:
			if res[1] > res[0]:
				res[1] -= 1
				res[2] += 1
			else:
				res[0] -= 1
				res[2] += 1
		else:
			res[2] -= 1
			res[0] += 1
		if res[0] + res[1] == res[2]:
			ans = '|' * res[0] + '+' + '|' * res[1] + '=' + '|' * res[2]
			return ans
	return 'Impossible'
print(main())


from sys import stdin

def main():
	a = stdin.readline().strip()
	x = a.split('+')
	y = x[1].split('=')
	(d, b, c) = (x[0], y[0], y[1])
	if len(d) + len(b) == len(c):
		print(a)
	elif len(d) + 1 + len(b) == len(c) - 1:
		d = d + '|'
		f = []
		for i in range(len(c)):
			f.append(c[i])
		f.remove(f[i])
		c = ''.join(f)
		e = d + '+' + b + '=' + c
		print(e)
	elif len(d) - 1 + len(b) == len(c) + 1:
		c = c + '|'
		if len(d) > 1:
			f = []
			for i in range(len(d)):
				f.append(d[i])
			f.remove(f[0])
			d = ''.join(f)
		else:
			f = []
			for i in range(len(b)):
				f.append(b[i])
			f.remove(f[0])
			b = ''.join(f)
		e = d + '+' + b + '=' + c
		print(e)
	else:
		print('Impossible')
main()


def check(number):
	num = number
	a = num[0]
	b = num[1]
	c = num[2]
	if a + b + 2 == c and c != 1:
		num[0] = a + 1
		num[1] = b
		num[2] = c - 1
		return num
	elif a + b == c + 2 and a != 1:
		num[0] = a - 1
		num[1] = b
		num[2] = c + 1
		return num
	elif a + b == c + 2 and b != 1:
		num[0] = a
		num[1] = b - 1
		num[2] = c + 1
		return num
	elif a + b == c:
		return num
	else:
		return -1
str = input()
number = []
x = str.split('+')
a = x[0]
x = x[1].split('=')
b = x[0]
c = x[1]
number.append(len(a))
number.append(len(b))
number.append(len(c))
r = check(number)
if r == -1:
	print('Impossible')
else:
	out = ''
	for i in range(r[0]):
		out += '|'
	out += '+'
	for i in range(r[1]):
		out += '|'
	out += '='
	for i in range(r[2]):
		out += '|'
	print(out)


import re
s = input()
nums = re.split('\\+|=', s)
A = len(nums[0])
B = len(nums[1])
C = len(nums[2])
if A + B - C == 0:
	print(s)
elif A + B - C == 2:
	if A > 1:
		print('|' * (A - 1) + '+' + '|' * B + '=' + '|' * (C + 1))
	else:
		print('|' * A + '+' + '|' * (B - 1) + '=' + '|' * (C + 1))
elif A + B - C == -2:
	print('|' * (A + 1) + '+' + '|' * B + '=' + '|' * (C - 1))
else:
	print('Impossible')


import re
import sys
l = re.split('=', input().rstrip().replace('+', '='))
for i in range(0, 3):
	l[i] = l[i].count('|')
c = l[0] + l[1]
if c + 2 == l[2]:
	l[0] = l[0] + 1
	l[2] = l[2] - 1
elif c == l[2] + 2:
	l[2] = l[2] + 1
	if l[0] == 1:
		l[1] = l[1] - 1
	else:
		l[0] = l[0] - 1
elif c != l[2]:
	print('Impossible')
	sys.exit()
print('|' * l[0], end='+')
print('|' * l[1], end='=')
print('|' * l[2], end='')


s = input()
(a, b) = s.split('+')
(b, c) = b.split('=')
a = list(a)
b = list(b)
c = list(c)
if len(a) + len(b) == len(c):
	stp = ''
	for i in a:
		stp = stp + i
	stp = stp + '+'
	for i in b:
		stp = stp + i
	stp = stp + '='
	for i in c:
		stp = stp + i
elif len(a) + len(b) < len(c):
	i = 0
	while i < 4:
		if i == 0:
			a.remove('|')
			c.append('|')
			if len(a) + len(b) == len(c):
				break
			else:
				a.append('|')
				c.remove('|')
				i = i + 1
		elif i == 1:
			b.remove('|')
			c.append('|')
			if len(a) + len(b) == len(c):
				break
			else:
				b.append('|')
				c.remove('|')
				i = i + 1
		elif i == 2:
			c.remove('|')
			a.append('|')
			if len(a) + len(b) == len(c):
				break
			else:
				c.append('|')
				a.remove('|')
				i = i + 1
		elif i == 3:
			c.remove('|')
			b.append('|')
			if len(a) + len(b) == len(c):
				break
			else:
				c.append('|')
				b.remove('|')
				i = i + 1
		else:
			i = i + 1
	stp = ''
	for i in a:
		stp = stp + i
	stp = stp + '+'
	for i in b:
		stp = stp + i
	stp = stp + '='
	for i in c:
		stp = stp + i
else:
	i = 0
	while i < 4:
		if i == 0:
			if len(a) > 1:
				a.remove('|')
				c.append('|')
				if len(a) + len(b) == len(c):
					break
				else:
					a.append('|')
					c.remove('|')
					i = i + 1
			else:
				i = i + 1
		elif i == 1:
			if len(b) > 1:
				b.remove('|')
				c.append('|')
				if len(a) + len(b) == len(c):
					break
				else:
					b.append('|')
					c.remove('|')
					i = i + 1
			else:
				i = i + 1
		elif i == 2:
			if len(c) > 1:
				c.remove('|')
				a.append('|')
				if len(a) + len(b) == len(c):
					break
				else:
					c.append('|')
					a.remove('|')
					i = i + 1
			else:
				i = i + 1
		elif i == 3:
			if len(c) > 1:
				c.remove('|')
				b.append('|')
				if len(a) + len(b) == len(c):
					break
				else:
					c.append('|')
					b.remove('|')
					i = i + 1
			else:
				i = i + 1
		else:
			i = i + 1
	stp = ''
	for i in a:
		stp = stp + i
	stp = stp + '+'
	for i in b:
		stp = stp + i
	stp = stp + '='
	for i in c:
		stp = stp + i
if len(a) + len(b) == len(c):
	print(stp)
else:
	print('Impossible')


import sys

def equ_balanced(num1, num2, num3):
	if num1 + num2 == num3:
		return True
	else:
		return False

def to_stick(num1, num2, num3):
	print('|' * num1, end='')
	print('+', end='')
	print('|' * num2, end='')
	print('=', end='')
	print('|' * num3)

def shift_stick1(num1, num2, sum):
	if num1 <= 1:
		return False
	a = num1 - 1
	b = num2 + 1
	s = sum
	if equ_balanced(a, b, s):
		to_stick(a, b, s)
		return True
	a = num1 - 1
	b = num2
	s = sum + 1
	if equ_balanced(a, b, s):
		to_stick(a, b, s)
		return True

def shift_stick2(num1, num2, sum):
	if num2 <= 1:
		return False
	a = num1 + 1
	b = num2 - 1
	s = sum
	if equ_balanced(a, b, s):
		to_stick(a, b, s)
		return True
	a = num1
	b = num2 - 1
	s = sum + 1
	if equ_balanced(a, b, s):
		to_stick(a, b, s)
		return True

def shift_stick3(num1, num2, sum):
	if sum <= 1:
		return False
	a = num1 + 1
	b = num2
	s = sum - 1
	if equ_balanced(a, b, s):
		to_stick(a, b, s)
		return True
	a = num1
	b = num2 + 1
	s = sum - 1
	if equ_balanced(a, b, s):
		to_stick(a, b, s)
		return True
equation = input()
num1 = 0
num2 = 0
sum = 0
str_len = len(equation)
i = 0
while i < str_len and equation[i] != '+':
	num1 = num1 + 1
	i += 1
i += 1
while i < str_len and equation[i] != '=':
	num2 = num2 + 1
	i += 1
i += 1
while i < str_len and equation[i] != '+':
	sum = sum + 1
	i += 1
if equ_balanced(num1, num2, sum) == True:
	to_stick(num1, num2, sum)
elif shift_stick1(num1, num2, sum) == True:
	sys.exit()
elif shift_stick2(num1, num2, sum) == True:
	sys.exit()
elif shift_stick3(num1, num2, sum) == True:
	sys.exit()
else:
	print('Impossible')


forma = input()
pal = forma.split('=')
A_B = pal[0].count('|')
C = pal[1].count('|')
A_Bo = A_B - 1
Co = C + 1
A_Ba = A_B + 1
Ca = C - 1
if A_B == C:
	print(forma)
elif A_Bo != Co and A_Ba != Ca:
	print('Impossible')
else:
	h_1 = pal[0] + '|'
	h_2 = pal[1][0:-1]
	if h_1.count('|') == h_2.count('|'):
		h = h_1 + '=' + h_2
		print(h)
	else:
		h = h_1[1:-1] + '=' + h_2 + '||'
		if h[0] == '+':
			h = h_1[0:-2] + '=' + h_2 + '||'
			print(h)
		else:
			print(h)


sticks = input()
(a, bc) = sticks.split('+')
(b, c) = bc.split('=')
if len(a) + len(b) + 1 == len(c) - 1:
	a = a + '|'
	c = c[1:]
elif len(a) + len(b) - 1 == len(c) + 1:
	if len(a) > 1:
		a = a[1:]
		c = c + '|'
	elif len(b) > 1:
		b = b[1:]
		c = c + '|'
sticks = ''.join([a, '+', b, '=', c])
if len(a) + len(b) == len(c):
	print(sticks)
else:
	print('Impossible')


s = input().strip()
a = s.index('+')
b = s.index('=') - a - 1
c = len(s) - a - b - 2

def display(a, b, c):
	print('%s+%s=%s' % (a * '|', b * '|', c * '|'))
if a + b == c:
	print(s)
elif a + b + 1 == c - 1:
	display(a, b + 1, c - 1)
elif a + b - 1 == c + 1:
	if b == 1:
		display(a - 1, b, c + 1)
	else:
		display(a, b - 1, c + 1)
else:
	print('Impossible')


def get_input():
	s = input()
	first_stick = s[0:s.find('+')]
	second_stick = s[s.find('+') + 1:s.find('=')]
	first_number = len(first_stick)
	second_number = len(second_stick)
	result_stick = s[s.find('=') + 1:]
	result = len(result_stick)
	if first_number + second_number == result:
		print(s)
	elif first_number + second_number + 1 == result - 1:
		print(first_stick + '|+' + second_stick + '=' + result_stick[:-1])
	elif first_number - 1 + second_number == result + 1:
		if len(first_stick) == 1:
			print(first_stick + '+' + second_stick[:-1] + '=' + result_stick + '|')
		else:
			print(first_stick[:-1] + '+' + second_stick + '=' + result_stick + '|')
	else:
		print('Impossible')
get_input()


str = input()
x = int(str.find('+'))
y = int(str.find('=') - x - 1)
z = int(len(str) - x - y - 2)
if x + y == z:
	print(str)
elif x + y + 1 == z - 1:
	for i in range(x + 1):
		print('|', end='')
	print('+', end='')
	for i in range(y):
		print('|', end='')
	print('=', end='')
	for i in range(z - 1):
		print('|', end='')
	print('')
elif x > 1 and x - 1 + y == z + 1:
	for i in range(x - 1):
		print('|', end='')
	print('+', end='')
	for i in range(y):
		print('|', end='')
	print('=', end='')
	for i in range(z + 1):
		print('|', end='')
	print('')
elif y > 1 and x + y - 1 == z + 1:
	for i in range(x):
		print('|', end='')
	print('+', end='')
	for i in range(y - 1):
		print('|', end='')
	print('=', end='')
	for i in range(z + 1):
		print('|', end='')
	print('')
else:
	print('Impossible')


def get_string(num1, num2, num3):
	return '|' * num1 + '+' + '|' * num2 + '=' + '|' * num3
expression = str(input())
pos_plus = expression.find('+')
pos_equal = expression.find('=')
num1 = len(expression[:pos_plus])
num2 = len(expression[pos_plus + 1:pos_equal])
num3 = len(expression[pos_equal + 1:])
if num1 + num2 > num3:
	if num1 + num2 - 1 == num3 + 1:
		if num1 - 1 != 0:
			print(get_string(num1 - 1, num2, num3 + 1))
		elif num2 - 1 != 0:
			print(get_string(num1, num2 - 1, num3 + 1))
		else:
			print('Impossible')
	else:
		print('Impossible')
elif num1 + num2 == num3:
	print(get_string(num1, num2, num3))
elif num1 + 1 + num2 == num3 - 1:
	print(get_string(num1 + 1, num2, num3 - 1))
else:
	print('Impossible')


exp = input()
exp1 = exp.split('=')
left = exp1[0]
right = exp1[1]
left = left.split('+')
right = right.split()
num1List = list(left[0])
num2List = list(left[1])
ansList = list(right[0])
(num1, num2, ans) = (0, 0, 0)
count = 0
for i in left[0]:
	count += 1
num1 = count
count = 0
for i in left[1]:
	count += 1
num2 = count
count = 0
for i in right[0]:
	count += 1
ans = count
if num1 + num2 == ans:
	print(exp)
	exit(0)
if num1 + num2 + 1 == ans - 1:
	num1List.append('|')
	ansList.pop()
	print(f"{''.join(num1List)}+{''.join(num2List)}={''.join(ansList)}")
elif num1 + num2 - 1 == ans + 1:
	if len(num1List) > 1:
		num1List.pop()
	else:
		num2List.pop()
	ansList.append('|')
	print(f"{''.join(num1List)}+{''.join(num2List)}={''.join(ansList)}")
else:
	print('Impossible')


str = input()
instr = str.split('=')
output = ''
if '+' in instr[0]:
	if len(instr[1]) == len(instr[0]) - 1:
		output = str
	elif len(instr[1]) + 1 == len(instr[0]) - 2:
		if len(instr[0].split('+')[0]) == 1:
			output = str[:2] + str[3:] + '|'
		else:
			output = str[1:] + '|'
	elif len(instr[1]) - 1 == len(instr[0]):
		output = '|' + str[:len(str) - 1]
	else:
		output = 'Impossible'
else:
	first = instr[0].split('-')
	if len(first[0]) - len(first[1]) == len(instr[1]):
		output = str
	elif len(first[0]) - len(first[1]) - 1 == len(instr[1]) + 1:
		if len(first[0]) == 1:
			output = str[:2] + str[3:] + '|'
		else:
			output = str[1:] + '|'
	elif len(first[0]) - len(first[1]) + 1 == len(instr[1]) - 1:
		output = '|' + str[:len(str) - 1]
	else:
		output = 'Impossible'
print(output)


n = list(input())
if '+' in n:
	t = n.index('+')
elif '-' in n:
	t = n.index('-')
e = n.index('=')
f = t
s = e - 1 - t
a = len(n) - 2 - s - f
if '+' in n:
	if f + s == a:
		for i in n:
			print(i, end='')
	elif a - f - s == 2:
		n = ['|'] + n[0:len(n) - 1]
		for i in n:
			print(i, end='')
	elif s + f - a == 2:
		if f >= 2:
			n = n[1:len(n)] + ['|']
		else:
			n = n[0:t + 1] + n[t + 2:e + 1] + n[e + 1:len(n)] + ['|']
		for i in n:
			print(i, end='')
	else:
		print('Impossible')


st = input()
(a, b, c) = (0, 0, 0)
(p, eq) = (0, 0)
for i in st:
	if i == '+':
		p = 1
		continue
	if i == '=':
		eq = 1
		continue
	if p == 0:
		a += 1
	elif p and eq == 0:
		b += 1
	elif eq:
		c += 1
ans = ''
a1 = 0
if a + b == c:
	print(st)
	a1 = 1
elif a + b + 1 == c - 1:
	for i in range(a):
		ans += '|'
	ans += '+'
	for i in range(b + 1):
		ans += '|'
	ans += '='
	for i in range(c - 1):
		ans += '|'
	a1 = 1
elif b != 1 and a + b - 1 == c + 1:
	for i in range(a):
		ans += '|'
	ans += '+'
	for i in range(b - 1):
		ans += '|'
	ans += '='
	for i in range(c + 1):
		ans += '|'
	a1 = 1
elif a != 1 and a + b - 1 == c + 1:
	for i in range(a - 1):
		ans += '|'
	ans += '+'
	for i in range(b):
		ans += '|'
	ans += '='
	for i in range(c + 1):
		ans += '|'
	a1 = 1
if a1 == 1:
	print(ans)
else:
	print('Impossible')


s = input()
(a, r) = s.split('+')
(b, c) = r.split('=')
a = len(a)
b = len(b)
c = len(c)
if a + b == c + 2:
	if a > b:
		a -= 1
	else:
		b -= 1
	c += 1
elif a + b == c - 2:
	c -= 1
	a += 1
if a + b == c:
	print('|' * a + '+' + '|' * b + '=' + '|' * c)
else:
	print('Impossible')


x = input()
for i in range(len(x)):
	if x[i] == '+':
		plus = i
	if x[i] == '=':
		equal = i
if len(x[:plus]) + len(x[plus + 1:equal]) == len(x[equal + 1:]):
	print(x)
elif len(x[:plus]) + len(x[plus + 1:equal]) - len(x[equal + 1:]) == 2:
	if len(x[:plus]) > 1:
		print(x[:plus - 1] + '+' + x[plus + 1:equal] + '=' + x[equal + 1:] + '|')
	else:
		print(x[:plus] + '+' + x[plus + 1:equal - 1] + '=' + x[equal + 1:] + '|')
elif len(x[:plus]) + len(x[plus + 1:equal]) - len(x[equal + 1:]) == -2:
	print(x[:plus] + '|' + '+' + x[plus + 1:equal] + '=' + x[equal + 1:len(x) - 1])
else:
	print('Impossible')


stick_group = input().split('=')
stick_group[0] = list(stick_group[0])
stick_group[1] = list(stick_group[1])
if abs(stick_group[0].count('|') - stick_group[1].count('|')) == 2:
	if stick_group[0].count('|') - stick_group[1].count('|') < 0:
		stick_group[0] += [stick_group[1].pop()]
		print(''.join(stick_group[0]) + '=' + ''.join(stick_group[1]))
	else:
		if stick_group[0][len(stick_group[0]) - 2] != '+':
			stick_group[1] += [stick_group[0].pop()]
		else:
			stick_group[1] += [stick_group[0].pop(0)]
		print(''.join(stick_group[0]) + '=' + ''.join(stick_group[1]))
elif stick_group[0].count('|') - stick_group[1].count('|') == 0:
	print(''.join(stick_group[0]) + '=' + ''.join(stick_group[1]))
else:
	print('Impossible')


s = input()
a = 0
b = 0
c = 0
a_s = s.split('+')
a = len(a_s[0])
b_s = a_s[1].split('=')
b = len(b_s[0])
c = len(s) - a - b - 2
if a + b == c:
	print(s)
elif a + b + 2 == c:
	s = '|' + s
	s = s[:-1]
	print(s)
elif a + b == c + 2 and a != 1:
	s = s + '|'
	s = s[1:]
	print(s)
elif a + b == c + 2:
	s = a_s[0] + '+' + a_s[1][1:] + '|'
	print(s)
else:
	print('Impossible')


str1 = input()
str = str1.split('=')
ans = str[0].split('+')
r = len(ans[0]) + len(ans[1])
if r - len(str[1]) != 0 and r - len(str[1]) != -2 and (r - len(str[1]) != 2):
	print('Impossible')
else:
	a = len(ans[0])
	b = len(ans[1])
	c = len(str[1])
	if r - c == 2:
		if a > 1:
			a -= 1
		else:
			b -= 1
		c += 1
	elif r - c == -2:
		a += 1
		c -= 1
	print(a * '|' + '+' + b * '|' + '=' + c * '|')


import re

def counting_sticks(A: int, B: int, C: int) -> tuple:
	if A + B + 2 == C:
		return (A + 1, B, C - 1)
	if A + B == C + 2:
		if A > 1:
			return (A - 1, B, C + 1)
		return (A, B - 1, C + 1)
	if A + B == C:
		return (A, B, C)
	return (-1, -1, -1)
(A, B, C) = map(len, re.split('[+=]', input()))
(xA, xB, xC) = counting_sticks(A, B, C)
if xA < 0:
	print('Impossible')
else:
	print('|' * xA + '+' + '|' * xB + '=' + '|' * xC)


stri = input()
a = stri[:stri.index('+')].count('|')
b = stri[stri.index('+'):stri.index('=')].count('|')
c = stri[stri.index('='):].count('|')
a = int(a)
b = int(b)
c = int(c)
if abs(c - (a + b)) == 2:
	if c > a + b:
		c = c - 1
		a = a + 1
	else:
		c = c + 1
		if a != 1:
			a = a - 1
		elif b != 1:
			b = b - 1
	ans = '|' * a + '+' + '|' * b + '=' + '|' * c
elif c == a + b:
	ans = stri
else:
	ans = 'Impossible'
if a < 1 or b < 1 or c < 1:
	ans == 'Impossible'
print(ans)


unformatted = input()
(a, bc) = unformatted.split('+')
(b, c) = bc.split('=')
(a, b, c) = (len(a), len(b), len(c))
if a + b == c:
	print('|' * a, '+', '|' * b, '=', '|' * c, sep='')
elif a + b - 1 == c + 1:
	if a >= 2:
		print('|' * (a - 1), '+', '|' * b, '=', '|' * (c + 1), sep='')
	elif b >= 2:
		print('|' * a, '+', '|' * (b - 1), '=', '|' * (c + 1), sep='')
	else:
		print('Impossible')
elif a + b + 1 == c - 1:
	if c >= 2:
		print('|' * a, '+', '|' * (b + 1), '=', '|' * (c - 1), sep='')
	else:
		print('Impossible')
else:
	print('Impossible')


def printabc(A, B, C):
	for i in range(A):
		print('|', end='')
	print('+', end='')
	for i in range(B):
		print('|', end='')
	print('=', end='')
	for i in range(C):
		print('|', end='')
string = input()
A = len(string.split('+')[0])
B = len(string.split('+')[1].split('=')[0])
C = len(string.split('+')[1].split('=')[1])
if A + B == C:
	printabc(A, B, C)
elif C - A - B == 2:
	C = C - 1
	A = A + 1
	printabc(A, B, C)
elif A + B - C == 2:
	if A == 1:
		B = B - 1
		C = C + 1
	else:
		A = A - 1
		C = C + 1
	printabc(A, B, C)
else:
	print('Impossible')


import re
s = input()
l = re.compile('[|]+').findall(s)
diff = len(l[0]) + len(l[1]) - len(l[2])
if diff == 0:
	print(s)
elif diff == -2:
	print(l[0] + '|+' + l[1] + '=' + l[2][:-1])
elif diff == 2:
	l[2] += '|'
	if len(l[0]) == 1:
		l[1] = l[1][:-1]
	else:
		l[0] = l[0][:-1]
	print(l[0] + '+' + l[1] + '=' + l[2])
else:
	print('Impossible')


s = input()
ar = [0, 0, 0]
k = 0
for i in s:
	if i == '|':
		ar[k] += 1
	else:
		k += 1
if ar[0] + ar[1] - ar[2] == 0:
	print(s)
elif ar[0] + ar[1] - ar[2] == 2:
	if ar[0] > 1:
		print(s[1:] + s[0])
	else:
		s = '|' * ar[0] + '+' + '|' * (ar[1] - 1) + '=' + '|' * (ar[2] + 1)
		print(s)
elif ar[0] + ar[1] - ar[2] == -2:
	if ar[2] > 1:
		print(s[-1] + s[0:len(s) - 1])
	else:
		s = '|' * ar[0] + '+' + '|' * (ar[1] + 1) + '=' + '|' * (ar[2] - 1)
else:
	print('Impossible')


def validateExp(a, b, c):
	len_a = len(a)
	len_b = len(b)
	len_c = len(c)
	lhs = len_a + len_b
	res = ''
	if lhs == len_c:
		res += a + '+' + b + '=' + c
		return res
	if abs(lhs - len_c) != 2:
		return 'Impossible'
	elif lhs > len_c:
		if len_a > 1:
			len_a -= 1
		else:
			len_b -= 1
		len_c += 1
		for i in range(len_a):
			res += '|'
		res += '+'
		for i in range(len_b):
			res += '|'
		res += '='
		for i in range(len_c):
			res += '|'
	elif len_c > lhs:
		len_c -= 1
		len_a += 1
		for i in range(len_a):
			res += '|'
		res += '+'
		for i in range(len_b):
			res += '|'
		res += '='
		for i in range(len_c):
			res += '|'
	return res
exp = input()
exps = exp.split('+')
a = exps[0]
exps1 = exps[1].split('=')
b = exps1[0]
c = exps1[1]
print(validateExp(a, b, c))


line = input()
sides_switcher = 0
right_side_switcher = 0
rightside = None
first_right_side = None
last_right_side = None
leftside = None
add_stick = line[0]

def myremover(sentence):
	new_sentence = None
	counter = 1
	for word in sentence:
		if counter != len(sentence):
			if new_sentence == None:
				new_sentence = word
			else:
				new_sentence = new_sentence + word
		else:
			pass
		counter += 1
	return new_sentence
for stick in line:
	if stick == '+':
		right_side_switcher = 1
		continue
	elif stick == '=':
		sides_switcher = 1
		continue
	if sides_switcher == 0:
		if right_side_switcher == 0:
			if first_right_side == None:
				first_right_side = stick
			else:
				first_right_side = str(first_right_side + stick)
		elif right_side_switcher == 1:
			if last_right_side == None:
				last_right_side = stick
			else:
				last_right_side = str(last_right_side + stick)
	elif leftside == None:
		leftside = stick
	else:
		leftside = str(leftside) + stick
rightside = str(first_right_side + last_right_side)
if len(rightside) == len(leftside):
	print(str(first_right_side + '+' + last_right_side + '=' + leftside))
elif len(rightside) + 2 == len(leftside):
	new_first_right_side = str(first_right_side.join(add_stick)) + str(first_right_side)
	new_leftside = myremover(leftside)
	print(new_first_right_side + '+' + last_right_side + '=' + new_leftside)
elif len(rightside) == len(leftside) + 2:
	if first_right_side > last_right_side:
		new_changed_rightside = myremover(first_right_side)
		new_leftside = leftside + leftside.join(add_stick)
		print(str(new_changed_rightside) + '+' + str(last_right_side) + '=' + str(new_leftside))
	else:
		new_changed_rightside = myremover(last_right_side)
		new_leftside = leftside + leftside.join(add_stick)
		print(str(first_right_side) + '+' + str(new_changed_rightside) + '=' + str(new_leftside))
else:
	print('Impossible')


s = input()
(a, b) = s.split('+')
(b, c) = b.split('=')
a_num = a.count('|')
b_num = b.count('|')
c_num = c.count('|')
if a_num + b_num == c_num + 2 or a_num + b_num + 2 == c_num or a_num + b_num == c_num:
	if a_num + b_num == c_num + 2 and (a_num > 1 or b_num > 1):
		if a_num > 1:
			a_num -= 1
			c_num += 1
			a = '|' * a_num
			c = '|' * c_num
			print(a + '+' + b + '=' + c)
		elif b_num > 1:
			b_num -= 1
			c_num += 1
			b = '|' * b_num
			c = '|' * c_num
			print(a + '+' + b + '=' + c)
		else:
			print('Impossible')
	elif a_num + b_num + 2 == c_num:
		a_num += 1
		c_num -= 1
		a = '|' * a_num
		c = '|' * c_num
		print(a + '+' + b + '=' + c)
	else:
		print(s)
else:
	print('Impossible')


org = input()
S = org.split('+')
A = S[0].count('|')
S = S[1].split('=')
B = S[0].count('|')
C = S[1].count('|')
if A + B - C == -2:
	print('|' * (A + 1) + '+' + '|' * B + '=' + '|' * (C - 1))
elif A + B - C == 2:
	if A > 1:
		print('|' * (A - 1) + '+' + '|' * B + '=' + '|' * (C + 1))
	else:
		print('|' * A + '+' + '|' * (B - 1) + '=' + '|' * (C + 1))
elif A + B == C:
	print(org)
else:
	print('Impossible')


s = input()
n = len(s)
i = s.find('=')
l = s[0:i].count('|')
r = s[i:n].count('|')
if l == r:
	print(s)
else:
	k = s.find('||')
	if l - r == 2:
		print(s[0:k] + s[k + 1:n] + '|')
	elif l - r == -2:
		print(s[0:i] + '|' + s[i:n - 1])
	else:
		print('Impossible')


s = input()
p = s.find('+')
r = s.find('=')
if r - 1 == len(s) - r - 1:
	print(s)
	exit(0)
if abs(r - 1 - (len(s) - r - 1)) != 2:
	print('Impossible')
	exit(0)
if r - 1 > len(s) - r - 1:
	if p != 1:
		print(s[1:] + s[0])
	else:
		print('|+' + '|' * (r - 3) + '=' + '|' * (len(s) - r))
else:
	print(s[-1] + s[:-1])


s = input().strip()
l = s.split('+')
m = l[1].split('=')
a = len(l[0])
b = len(m[0])
c = len(m[1])
if a + b == c:
	print(s)
elif a + b - c == 2:
	if a > b:
		a -= 1
	else:
		b -= 1
	c += 1
	print('|' * a + '+' + '|' * b + '=' + '|' * c)
elif c - a - b == 2:
	c -= 1
	a += 1
	print('|' * a + '+' + '|' * b + '=' + '|' * c)
else:
	print('Impossible')


s = input()
L = list(s)
n2 = L.index('=') - 1
n3 = len(L) - n2 - 2
if n2 == n3:
	print(s)
elif n2 == n3 + 2 and s[1] != '+':
	print(s[1:] + '|')
elif n2 == n3 + 2 and n2 != 2:
	print('|+' + s[3:] + '|')
elif n2 == n3 - 2:
	print('|' + s[:len(s) - 1])
else:
	print('Impossible')


phase = 0
(a, b, c) = (0, 0, 0)
pat = input()
for ch in pat:
	if ch == '+':
		phase = 1
		continue
	if ch == '=':
		phase = 2
		continue
	if phase == 0 and ch == '|':
		a += 1
	elif phase == 1 and ch == '|':
		b += 1
	elif phase == 2 and ch == '|':
		c += 1
if a + b - c == 2:
	if a >= b:
		a -= 1
	else:
		b -= 1
	c += 1
	print('|' * a + '+' + '|' * b + '=' + '|' * c)
elif a + b - c == -2:
	a += 1
	c -= 1
	print('|' * a + '+' + '|' * b + '=' + '|' * c)
elif a + b - c == 0:
	print('|' * a + '+' + '|' * b + '=' + '|' * c)
else:
	print('Impossible')


inp = input()
(firstGroup, c) = inp.split('=')
(a, b) = firstGroup.split('+')
A = len(a)
B = len(b)
C = len(c)
elements = [A, B, C]
impo = True
firstExp = A + B
am = A - 1
bm = B - 1
cm = C - 1
exp1 = am > 0 and am + (B + 1) == C
exp2 = am > 0 and am + B == C + 1
exp3 = bm > 0 and A + 1 + bm == C
exp4 = bm > 0 and A + bm == C + 1
exp5 = cm > 0 and A + 1 + B == cm
exp6 = cm > 0 and A + (B + 1) == cm
if firstExp == C:
	ao = A
	bo = B
	co = C
elif exp1:
	ao = A - 1
	bo = B + 1
	co = C
elif exp2:
	ao = A - 1
	bo = B
	co = C + 1
elif exp3:
	ao = A + 1
	bo = B - 1
	co = C
elif exp4:
	ao = A
	bo = B - 1
	co = C + 1
elif exp5:
	ao = A + 1
	bo = B
	co = C - 1
elif exp6:
	ao = A
	bo = B + 1
	co = C - 1
else:
	ao = 0
	bo = 0
	co = 0
if ao != 0 and bo != 0 and (co != 0):
	print(ao * '|' + '+' + bo * '|' + '=' + co * '|')
else:
	print('Impossible')


import re
A = list(map(str, re.split('\\+|=', input())))
x = len(A[0])
y = len(A[1])
z = len(A[2])
if x + y == z:
	print('|' * x + '+' + '|' * y + '=' + '|' * z)
elif z - x - y == 2:
	print('|' * (x + 1) + '+' + '|' * y + '=' + '|' * (z - 1))
elif x + y - z == 2:
	if x == 1:
		print('|' * x + '+' + '|' * (y - 1) + '=' + '|' * (z + 1))
	else:
		print('|' * (x - 1) + '+' + '|' * y + '=' + '|' * (z + 1))
else:
	print('Impossible')


s = input()
A = 0
B = 0
C = 0
i = 0
while s[i] != '+':
	A += 1
	i += 1
i += 1
while s[i] != '=':
	B += 1
	i += 1
C = len(s) - A - B - 2
sep = '|'
if A + B != C and abs(A + B - C) != 2:
	res = 'Impossible'
elif A + B == C:
	res = s
elif A + B == C + 2 and A != 1:
	res = s[1:] + '|'
elif A + B == C + 2 and A == 1:
	res = '{}+{}={}'.format(sep * A, sep * (B - 1), sep * (C + 1))
elif A + B == C - 2:
	res = '|' + s[:-1]
print(res)


s = input()
t = s.find('=')
a = s[:t]
b = s[t:]
ac = a.count('|')
bc = b.count('|')
if ac == bc:
	ans = s
elif abs(ac - bc) == 2:
	if ac > bc:
		if a[-2] == '|':
			ans = a[:len(a) - 1] + b + '|'
		else:
			ans = a[1:] + b + '|'
	else:
		ans = a + '|' + b[:len(b) - 1]
else:
	ans = 'Impossible'
print(ans)


equ = input()
x = equ.find('=')
if x == len(equ) / 2 - 1:
	print('|' + equ[:len(equ) - 1])
elif x == len(equ) / 2:
	print(equ)
elif x == len(equ) / 2 + 1:
	if equ.find('+') != 1:
		print(equ[1:] + '|')
	else:
		print(equ[:2] + equ[3:] + '|')
else:
	print('Impossible')


x = input()
x = x.split('+')
y = x[1].split('=')
x = [x[0]]
for i in y:
	x.append(i)
a = x[1].count('|') + x[0].count('|')
b = x[2].count('|')
m = abs(a - b)
if m == 2 or m == 0:
	if a == b:
		pass
	elif a < b:
		x[0] += '|'
		x[2] = x[2][:-1]
	else:
		x[2] += '|'
		if len(x[0]) >= len(x[1]):
			x[0] = x[0][:-1]
		else:
			x[1] = x[1][:-1]
	s = x[0] + '+' + x[1] + '=' + x[2]
	print(s)
else:
	print('Impossible')


(a, b) = input().split('+')
(c, d) = b.split('=')
if len(a) + len(c) == len(d):
	print(a + '+' + c + '=' + d)
elif len(d) != 1 and len(a) + len(c) + 1 == len(d) - 1:
	print(a + '+' + c + '|' + '=' + d[:-1])
elif len(c) != 1 and len(a) + len(c) - 1 == len(d) + 1:
	print(a + '+' + c[:-1] + '=' + d + '|')
elif len(a) != 1 and len(a) - 1 + len(c) == len(d) + 1:
	print(a[:-1] + '+' + c + '=' + d + '|')
else:
	print('Impossible')


(a, b, c) = [n.count('|') for n in input().replace('=', '+').split('+')]
C1 = abs(a + b - c) == 2
C2 = a + b <= c
C3 = a > 1
a = a + C1 * C2 - C3 * (not C2)
b = b - (not C2) * (not C3)
c = c - C1 * C2 + (not C2)
if not (a + b == c or C1):
	print('Impossible')
else:
	print('{}+{}={}'.format(*[x * '|' for x in [a, b, c]]))


import sys

def main():
	s = sys.stdin.readline().rstrip() + '0'
	a = b = c = 0
	sticks = 0
	i = 0
	while i < len(s):
		if s[i] == '|':
			sticks += 1
		else:
			if s[i] == '+':
				a = sticks
			elif s[i] == '=':
				b = sticks
			elif s[i] == '0':
				c = sticks
			sticks = 0
		i += 1
	if a + b == c - 2:
		res = '|' * (a + 1) + '+' + '|' * b + '=' + '|' * (c - 1)
	elif a + b - 2 == c:
		if a != 1:
			res = '|' * (a - 1) + '+' + '|' * b + '=' + '|' * (c + 1)
		else:
			res = '|' + '+' + '|' * (b - 1) + '=' + '|' * (c + 1)
	elif a + b == c:
		res = s[:-1]
	else:
		res = 'Impossible'
	print(res)
main()


equation = input()
a = equation.index('+')
b = equation.index('=') - a - 1
c = len(equation) - equation.index('=') - 1
if a + b == c:
	print(equation)
elif a + b + 1 == c - 1:
	a = a + 1
	c = c - 1
	print('%s+%s=%s' % ('|' * a, '|' * b, '|' * c))
elif a + b - 1 == c + 1:
	if a > 1:
		a = a - 1
	else:
		b = b - 1
	c = c + 1
	print('%s+%s=%s' % ('|' * a, '|' * b, '|' * c))
else:
	print('Impossible')


str = input()
a = b = c = 0

def tinh(str):
	for i in range(len(str)):
		if str[i] == '|':
			global a
			a = a + 1
		else:
			for j in range(i + 1, len(str)):
				if str[j] == '|':
					global b
					b = b + 1
				else:
					global c
					c = len(str) - j - 1
					return 1
tinh(str)
if a + b == c:
	print(str)
elif a + b == c - 2:
	print('|', end='')
	for i in range(len(str) - 1):
		print(str[i], end='')
elif a + b == c + 2:
	if a != 1:
		for i in range(1, len(str)):
			print(str[i], end='')
		print('|')
	else:
		print('|+', end='')
		for i in range(b - 1):
			print('|', end='')
		for j in range(a + b + 1, len(str)):
			print(str[j], end='')
		print('|')
else:
	print('Impossible')


import sys
import math

def read_int():
	return int(input().strip())

def read_int_list():
	return list(map(int, input().strip().split()))

def read_string():
	return input().strip()

def read_string_list(delim=' '):
	return input().strip().split(delim)

def get_eq(a, b, c):
	eq = ''
	for i in range(a):
		eq += '|'
	eq += '+'
	for i in range(b):
		eq += '|'
	eq += '='
	for i in range(c):
		eq += '|'
	return eq
ineq = read_string()
(a, b, c) = (0, 0, 0)
a = ineq.find('+')
b = ineq.find('=') - a - 1
c = len(ineq) - ineq.find('=') - 1
if a + b == c:
	print(ineq)
	sys.exit()
if a - 1 + b == c + 1:
	if a > 1:
		print(get_eq(a - 1, b, c + 1))
	elif b > 1:
		print(get_eq(a, b - 1, c + 1))
	else:
		print('DISPUTE')
	sys.exit()
if a + b + 1 == c - 1:
	print(get_eq(a + 1, b, c - 1))
	sys.exit()
print('Impossible')


import re

def get_actual(input_string):
	(a, b, c) = map(str, re.split('[+ =]', input_string))
	a_count = len(a)
	b_count = len(b)
	c_count = len(c)
	if c_count - b_count == a_count:
		return input_string
	elif a_count + 1 + b_count == c_count - 1:
		c_count = c_count - 1
		a_count = a_count + 1
	elif a_count > 1 and a_count - 1 + b_count == c_count + 1:
		c_count = c_count + 1
		a_count = a_count - 1
	elif b_count > 1 and a_count + (b_count - 1) == c_count + 1:
		c_count = c_count + 1
		b_count = b_count - 1
	if a_count + b_count == c_count:
		a = ''.join((str(x) for x in ['|' * a_count]))
		b = ''.join((str(x) for x in ['|' * b_count]))
		c = ''.join((str(x) for x in ['|' * c_count]))
		return a + '+' + b + '=' + c
	else:
		return 'Impossible'
input_string = input()
print(get_actual(input_string))


(a, b, c) = input().replace('+', '=').split('=')
lenA = 0
lenB = 0
lenC = 0
a1 = len(a)
b1 = len(b)
c1 = len(c)
st = ''
if a1 + b1 - c1 == 0:
	st = a + '+' + b + '=' + c
if a1 + b1 - c1 == 2:
	if a1 > 1:
		lenA = a1 - 1
		lenB = b1
	elif b1 > 1:
		lenB = b1 - 1
		lenA = a1
	lenC = c1 + 1
if a1 + b1 - c1 == -2:
	if c1 > 1:
		lenA = a1 + 1
		lenB = b1
		lenC = c1 - 1
if lenA and lenB and (lenC != 0):
	for x in range(lenA):
		st = st + '|'
	st = st + '+'
	for x in range(lenB):
		st = st + '|'
	st = st + '='
	for x in range(lenC):
		st = st + '|'
if st:
	print(st)
else:
	print('Impossible')


g = input()
import re
m = re.match('(\\|+)\\+(\\|+)=(\\|+)', g)
z = m.group
a = len(z(1))
b = len(z(2))
c = len(z(3))
if a + b == c - 2:
	print('|' * (a + 1) + '+' + '|' * b + '=' + '|' * (c - 1))
elif a + b == c + 2:
	if a == 1:
		print('|' * a + '+' + '|' * (b - 1) + '=' + '|' * (c + 1))
	else:
		print('|' * (a - 1) + '+' + '|' * b + '=' + '|' * (c + 1))
elif a + b == c:
	print(g)
else:
	print('Impossible')


s = input()
s = s.split('=')
a = s[0]
b = s[1]
na = a.count('|')
nb = b.count('|')
if abs(na - nb) != 2 and abs(na - nb) != 0:
	print('Impossible')
else:
	t = na - nb
	if t > 0:
		q = a.split('+')
		n1 = q[0].count('|')
		n2 = q[1].count('|')
		if n1 > 1:
			print(''.join(a[1:]), end='=')
		else:
			print(''.join(a[:-1]), end='=')
		print('|', end='')
		print(''.join(b))
	elif t < 0:
		print(''.join(a), end='')
		print('|', end='=')
		print(''.join(b[1:]))
	else:
		print('='.join(s))


def checkCond(a_count, b_count, rhs_count):
	if a_count + b_count == rhs_count:
		return True
	else:
		return False

def generating_answer(a, b, rhs, count):
	s = a + '+' + b + '=' + rhs
	rhs_count = rhs.count('|')
	a_count = a.count('|')
	b_count = b.count('|')
	count += 1
	val = checkCond(a_count, b_count, rhs_count)
	if val:
		return s
	elif count <= 1:
		if a_count + b_count > rhs_count:
			if a_count > b_count:
				ans = generating_answer(a[1:], b, rhs + '|', count)
			else:
				ans = generating_answer(a, b[1:], rhs + '|', count)
		else:
			ans = generating_answer(a + '|', b, rhs[1:], count)
		count += 1
		return ans
	else:
		return 'Impossible'
s = input()
count = 0
(lhs, rhs) = (s.split('=')[0], s.split('=')[1])
(a, b) = (lhs.split('+')[0], lhs.split('+')[1])
ans = generating_answer(a, b, rhs, count)
print(ans)


s = input()
(s0, s3) = s.split('=')
(s1, s2) = s0.split('+')
a = len(s1)
b = len(s2)
c = len(s3)
if a + b == c:
	print(s)
elif a + b + 2 == c:
	if c > 1:
		print(str(a * '|') + '+' + str((b + 1) * '|') + '=' + str((c - 1) * '|'))
	else:
		print('Impossible')
elif a + b == c + 2:
	if b > 1:
		print(str(a * '|') + '+' + str((b - 1) * '|') + '=' + str((c + 1) * '|'))
	elif a > 1:
		print(str((a - 1) * '|') + '+' + str(b * '|') + '=' + str((c + 1) * '|'))
	else:
		print('Impossible')
else:
	print('Impossible')


import math
import cmath
n = input()
m = [0] * 3
a = 0
for x in n:
	if x == '|':
		m[a] += 1
	else:
		a += 1
if m[0] + m[1] != m[2] - 2 and m[0] + m[1] != m[2] + 2 and (m[0] + m[1] != m[2]):
	print('Impossible')
elif m[0] + m[1] == m[2]:
	print(n)
elif m[0] + m[1] == m[2] - 2:
	m[0] += 1
	m[2] -= 1
	for _ in range(m[0]):
		print('|', end='')
	print('+', end='')
	for _ in range(m[1]):
		print('|', end='')
	print('=', end='')
	for _ in range(m[2]):
		print('|', end='')
else:
	if m[0] > 1:
		m[0] -= 1
	else:
		m[1] -= 1
	m[2] += 1
	for _ in range(m[0]):
		print('|', end='')
	print('+', end='')
	for _ in range(m[1]):
		print('|', end='')
	print('=', end='')
	for _ in range(m[2]):
		print('|', end='')


(x, c) = map(str, input().split('='))
(a, b) = map(str, x.split('+'))
if len(a) + len(b) == len(c):
	print(a + '+' + b + '=' + c)
elif len(a) + len(b) + 2 == len(c):
	print(a + '|+' + b + '=' + c[0:len(c) - 1])
elif len(a) + len(b) == len(c) + 2:
	if len(a) > 1:
		print(a[0:len(a) - 1] + '+' + b + '=' + c + '|')
	else:
		print(a + '+' + b[0:len(b) - 1] + '=' + c + '|')
else:
	print('Impossible')


s = input()
(a, b) = s.split('+')
(b, c) = b.split('=')
ab = len(a + b)
lc = len(c)
if ab - lc == 0 or lc - ab == 0:
	print(s)
elif ab - lc == 2:
	if len(a) > 1:
		print(a[1:] + '+' + b + '=' + c + '|')
	else:
		print(a + '+' + b[1:] + '=' + c + '|')
elif lc - ab == 2:
	print(a + '|+' + b + '=' + c[1:])
else:
	print('Impossible')


expression = input()
count_1 = 0
count_2 = 0
after_equal = False
for i in expression:
	if i == '=':
		after_equal = True
	if i == '|' and after_equal == True:
		count_2 += 1
	elif i == '|' and after_equal != True:
		count_1 += 1
if count_1 == count_2:
	print(expression)
elif count_1 - count_2 == -2:
	expression = '|' + expression
	print(expression[:-1])
elif count_1 - count_2 == 2:
	expression = expression + '|'
	if expression[1] != '|':
		print(expression[:2] + expression[3:])
	else:
		print(expression[1:])
else:
	print('Impossible')


def main():
	exp = input()
	(a_plus_b, c) = exp.split('=')
	(a, b) = a_plus_b.split('+')
	if len(a) + len(b) == len(c):
		print(exp)
	elif len(a) + len(b) == len(c) - 2:
		print('|' * (len(a) + 1) + '+' + '|' * len(b) + '=' + '|' * (len(c) - 1))
	elif len(a) + len(b) == len(c) + 2:
		if len(a) >= 2:
			print('|' * (len(a) - 1) + '+' + '|' * len(b) + '=' + '|' * (len(c) + 1))
		elif len(b) >= 2:
			print('|' * len(a) + '+' + '|' * (len(b) - 1) + '=' + '|' * (len(c) + 1))
		else:
			print('Impossible')
	else:
		print('Impossible')
main()


def printp(a, b, c):
	s = ''
	for i in range(a):
		s = s + '|'
	s = s + '+'
	for i in range(0, b):
		s = s + '|'
	s = s + '='
	for i in range(0, c):
		s = s + '|'
	return s
s = str(input())
plus = s.index('+')
equal = s.index('=')
a = len(s[:plus])
b = len(s[plus + 1:equal])
c = len(s[equal + 1:])
if a + b == c:
	print(s)
elif a + 1 + b == c - 1 or b + 1 + a == c - 1 or b - 1 + a == c + 1 or (a - 1 + b == c + 1):
	if a + 1 + b == c - 1 and c >= 2:
		print(printp(a + 1, b, c - 1))
	elif b + 1 + a == c - 1 and c >= 2:
		print(printp(a, b + 1, c - 1))
	elif b - 1 + a == c + 1 and b >= 2:
		print(printp(a, b - 1, c + 1))
	elif a - 1 + b == c + 1 and a >= 2:
		print(printp(a - 1, b, c + 1))
else:
	print('Impossible')


s = input().split('=')
a = s[0].count('|')
b = s[1].count('|')
if a == b:
	print(s[0] + '=' + s[1])
elif abs(a - b) == 2:
	if a < b:
		print(s[0] + '|=' + s[1][:-1])
	elif s[0][-2] != '+':
		print(s[0][:-1] + '=|' + s[1])
	else:
		print(s[0][1:] + '=|' + s[1])
else:
	print('Impossible')


s = input()
plus = s.index('+')
ravno = s.index('=')
a = len(s[:plus])
b = len(s[plus + 1:ravno])
c = len(s[ravno + 1:])
if a + b == c - 2:
	a += 1
	c -= 1
	print('|' * a, '+', '|' * b, '=', '|' * c, sep='')
elif a + b - 2 == c:
	c += 1
	if a > 1:
		a -= 1
		print('|' * a, '+', '|' * b, '=', '|' * c, sep='')
	elif b > 1:
		b -= 1
		print('|' * a, '+', '|' * b, '=', '|' * c, sep='')
elif a + b == c:
	print('|' * a, '+', '|' * b, '=', '|' * c, sep='')
else:
	print('Impossible')


s = input()
var = [0] * 3
le = len(s)
k = 0
for i in range(len(s)):
	if s[i] == '|':
		var[k] += 1
	else:
		k += 1
if var[0] + var[1] == var[2]:
	for i in range(var[0]):
		print('|', end='')
	print('+', end='')
	for i in range(var[1]):
		print('|', end='')
	print('=', end='')
	for i in range(var[2]):
		print('|', end='')
elif var[0] + 1 + var[1] == var[2] - 1 and var[2] - 1 > 0:
	for i in range(var[0] + 1):
		print('|', end='')
	print('+', end='')
	for i in range(var[1]):
		print('|', end='')
	print('=', end='')
	for i in range(var[2] - 1):
		print('|', end='')
elif var[0] - 1 + var[1] == var[2] + 1 and var[0] - 1 > 0:
	for i in range(var[0] - 1):
		print('|', end='')
	print('+', end='')
	for i in range(var[1]):
		print('|', end='')
	print('=', end='')
	for i in range(var[2] + 1):
		print('|', end='')
elif var[0] + var[1] - 1 == var[2] + 1 and var[1] - 1 > 0:
	for i in range(var[0]):
		print('|', end='')
	print('+', end='')
	for i in range(var[1] - 1):
		print('|', end='')
	print('=', end='')
	for i in range(var[2] + 1):
		print('|', end='')
else:
	print('Impossible')


input_str = input()
(b1, b2, b3) = (0, 0, 0)
(in_b1, in_b2) = (True, False)
for x in input_str:
	if x == '|':
		if in_b1:
			b1 += 1
		elif in_b2:
			b2 += 1
		else:
			b3 += 1
	elif x == '+':
		(in_b1, in_b2) = (False, True)
	else:
		in_b2 = False
if b1 + b2 == b3:
	pass
elif b1 + b2 == b3 + 2:
	if b1 > 1:
		b1 -= 1
	else:
		b2 -= 1
	b3 += 1
elif b1 + b2 + 2 == b3:
	b2 += 1
	b3 -= 1
else:
	print('Impossible')
	exit()
print('|' * b1 + '+' + '|' * b2 + '=' + b3 * '|')


s = input()
c = s.split('=')
l = c[0].count('|')
r = c[1].count('|')
if l == r:
	print(s)
elif r == l + 2:
	print('|' + s[:-1])
elif r + 2 == l:
	d = c[0].split('+')
	if len(d[0]) == 1:
		print(s[:2] + s[3:] + '|')
	else:
		print(s[1:] + '|')
else:
	print('Impossible')


import re
s = input().strip()
s = s.replace('|', 'a')
a = re.findall('[\\w]+', s)
if len(a[2]) - len(a[0]) - len(a[1]) == 2:
	s = s[0:s.index('+')] + 'a' + s[s.index('+'):len(s) - 1]
	s = s.replace('a', '|')
elif len(a[2]) - len(a[0]) - len(a[1]) == -2:
	if len(a[0]) > len(a[1]):
		s = s[0:s.index('+') - 1] + s[s.index('+'):len(s)] + 'a'
	else:
		s = s[0:s.index('+') + 1] + s[s.index('+') + 1:s.index('=') - 1] + s[s.index('='):] + 'a'
	s = s.replace('a', '|')
elif len(a[2]) == len(a[0]) + len(a[1]):
	s = s.replace('a', '|')
else:
	s = 'Impossible'
print(s)


x = input()
y = list(x)
a = len(y[:y.index('+')])
b = len(y[y.index('+') + 1:y.index('=')])
c = len(y[y.index('=') + 1:])
if a + b == c:
	print(x)
elif a + b + 1 == c - 1:
	print((a + 1) * '|' + '+' + b * '|' + '=' + (c - 1) * '|')
elif a + b - 1 == c + 1 and a > 1:
	print((a - 1) * '|' + '+' + b * '|' + '=' + (c + 1) * '|')
elif a + b - 1 == c + 1 and b > 1:
	print(a * '|' + '+' + (b - 1) * '|' + '=' + (c + 1) * '|')
else:
	print('Impossible')


def sol():
	z = input()
	a = z.split('+')
	b = list(map(len, [a[0]] + a[1].split('=')))
	(a, b, c) = b
	if a + b == c:
		pass
	elif a + b == c - 2:
		c -= 1
		a += 1
	elif a + b == c + 2:
		if a == 1:
			b -= 1
			c += 1
		else:
			a -= 1
			c += 1
	else:
		print('Impossible')
		return
	exp = ''
	for i in range(a):
		exp += '|'
	exp += '+'
	for i in range(b):
		exp += '|'
	exp += '='
	for i in range(c):
		exp += '|'
	print(exp)
sol()


import re

def stickToTuple(s):
	temp = re.match('(\\|+)\\+(\\|+)=(\\|+)', s)
	return tuple(map(len, temp.groups()))

def tupleToStick(a, b, c):
	return '{}+{}={}'.format('|' * a, '|' * b, '|' * c)

def solve(a, b, c):
	if a + b == c:
		return tupleToStick(a, b, c)
	if a + b - 1 == c + 1:
		if a > 1:
			return tupleToStick(a - 1, b, c + 1)
		return tupleToStick(a, b - 1, c + 1)
	if a + b + 1 == c - 1 and c > 1:
		return tupleToStick(a + 1, b, c - 1)
	return 'Impossible'
s = input()
print(solve(*stickToTuple(s)))


def Print(char, times):
	for _ in range(times):
		print(char, end='')

def main():
	_input = input()
	A = len(_input.split('+')[0])
	B = len(_input.split('+')[1].split('=')[0])
	C = len(_input.split('+')[1].split('=')[1])
	if A + B + 1 == C - 1:
		Print('|', A + 1)
		print('+', end='')
		Print('|', B)
		print('=', end='')
		Print('|', C - 1)
		print()
	elif A + B - 1 == C + 1:
		if A == 1:
			Print('|', A)
			print('+', end='')
			Print('|', B - 1)
			print('=', end='')
			Print('|', C + 1)
			print()
		else:
			Print('|', A - 1)
			print('+', end='')
			Print('|', B)
			print('=', end='')
			Print('|', C + 1)
			print()
	elif A + B == C:
		print(_input)
	else:
		print('Impossible')
main()


from sys import stdin

def main():
	x = stdin.readline().strip()
	for i in range(0, len(x)):
		if x[i] == '=':
			b = i
		if x[i] == '+':
			a = i
	c = len(x[0:a])
	d = len(x[b + 1:len(x)])
	e = len(x[a + 1:b])
	if c + e == d:
		print(x)
	elif c + e > d:
		if c + e > d and c + e != d:
			if c == 1:
				e -= 1
			else:
				c -= 1
			d += 1
		if d != c + e:
			print('Impossible')
		else:
			m = ('|' * c, '+', '|' * e, '=', '|' * d)
			m = ''.join(m)
			print(m)
	else:
		if d > c + e and c + e != d:
			d -= 1
			c += 1
		if c + e != d:
			print('Impossible')
		else:
			n = ('|' * c, '+', '|' * e, '=', '|' * d)
			n = ''.join(n)
			print(n)
main()


s = input()
p = s.find('=')
d = 2 * p - len(s)
if d == 0:
	print(s)
elif d == 2:
	t = s.find('+')
	if t != 1:
		print(s[1:] + s[0])
	else:
		print(s[:p - 1] + s[p:] + s[0])
elif d == -2:
	print(s[-1] + s[:-1])
else:
	print('Impossible')


str = input()
plusloc = str.index('+')
equalloc = str.index('=')
i = 0
(a, b, c) = (0, 0, 0)
while i != plusloc:
	a = a + 1
	i = i + 1
i = i + 1
while i != equalloc:
	b = b + 1
	i = i + 1
i = i + 1
while i != len(str):
	c = c + 1
	i = i + 1
if a + b == c:
	(a, b, c) = (a, b, c)
elif a + 1 + b == c - 1:
	a = a + 1
	c = c - 1
elif a - 1 + b == c + 1 and a != 1:
	a = a - 1
	c = c + 1
elif a == 1 and a + (b - 1) == c + 1 and (b != 1):
	b = b - 1
	c = c + 1
else:
	(a, b, c) = (-1, -1, -1)
if a != -1:
	for i in range(a):
		print('|', end='')
	print('+', end='')
	for i in range(b):
		print('|', end='')
	print('=', end='')
	for i in range(c):
		print('|', end='')
else:
	print('Impossible')


x = input()
l = []
for i in x:
	l.append(i)
flag = fla = q1 = q2 = q3 = 0
c = ''
for i in l:
	if i == '+':
		flag = 1
	if i == '=':
		fla = 1
	if flag == 0:
		q1 += 1
	if flag == 1 and fla == 0:
		q2 += 1
	if fla == 1:
		q3 += 1
q2 -= 1
q3 -= 1
if q1 + q2 == q3:
	for i in l:
		c += i
	print(c)
elif q1 + q2 + 1 == q3 - 1:
	l.insert(0, l.pop())
	for i in l:
		c += i
	print(c)
elif q1 + q2 - 1 == q3 + 1:
	if q1 > 1:
		l.append(l.pop(0))
	else:
		l.append(l.pop(3))
	for i in l:
		c += i
	print(c)
else:
	print('Impossible')


s = input()
a = len(s.split('+')[0])
(b, c) = map(len, s[a + 1:].split('='))
if abs(c - (a + b)) not in [0, 2]:
	print('Impossible')
else:
	if a + b < c:
		a += 1
		c -= 1
	elif a + b > c:
		c += 1
		if a > b:
			a -= 1
		else:
			b -= 1
	print(f"{'|' * a}+{'|' * b}={'|' * c}")


string = input()
[AB, C] = string.split('=')
[A, B] = AB.split('+')
a = len(A)
b = len(B)
c = len(C)
found = False
if a + b == c:
	found = True
elif a > 1 and a - 1 + b == c + 1:
	a -= 1
	c += 1
	found = True
elif b > 1 and a + (b - 1) == c + 1:
	b -= 1
	c += 1
	found = True
elif c > 1:
	if a + 1 + b == c - 1:
		a += 1
		c -= 1
		found = True
	elif a + (b + 1) == c - 1:
		b += 1
		c -= 1
		found = True
if found:
	A = ''.join(['|' for _ in range(a)])
	B = ''.join(['|' for _ in range(b)])
	C = ''.join(['|' for _ in range(c)])
	print('%s+%s=%s' % (A, B, C))
else:
	print('Impossible')


n = list(input())
(c1, c2, c3) = (n[:n.index('+')].count('|'), n[n.index('+') + 1:n.index('=')].count('|'), n[n.index('=') + 1:].count('|'))
if (c1 + c2 + c3) % 2 != 0 and c1 + c2 + c3 <= 2:
	print('Impossible')
elif c1 + c2 == c3:
	print(''.join(n))
elif c1 + c2 - c3 == 2:
	if c1 > c2:
		print('|' * (c1 - 1) + '+' + '|' * c2 + '=' + '|' * (c3 + 1))
	else:
		print('|' * c1 + '+' + '|' * (c2 - 1) + '=' + '|' * (c3 + 1))
elif c1 + c2 - c3 == -2:
	print('|' * (c1 + 1) + '+' + '|' * c2 + '=' + '|' * (c3 - 1))
else:
	print('Impossible')


s = input() + '-'
a = s.find('+')
b = s.find('=') - s.find('+') - 1
c = s.find('-') - s.find('=') - 1
if a + b == c:
	print(s[:-1])
elif a + b + 2 == c:
	print('|' + s[:-2])
elif a + b == c + 2:
	if a > b:
		print(s[1:-1] + '|')
	else:
		print(a * '|' + '+' + (b - 1) * '|' + '=' + (c + 1) * '|')
else:
	print('Impossible')


def do():
	s = input()
	t = []
	count = 1
	i = 0
	while i < len(s):
		count = 0
		while i < len(s) and s[i] == '|':
			i += 1
			count += 1
		t.append(count)
		i += 1
	(x, y, z) = t
	if x + y == z:
		return '|' * x + '+' + '|' * y + '=' + '|' * z
	if x + 1 + y == z - 1 and z > 1:
		return '|' * (x + 1) + '+' + '|' * y + '=' + '|' * (z - 1)
	if x - 1 + y == z + 1 and x > 1:
		return '|' * (x - 1) + '+' + '|' * y + '=' + '|' * (z + 1)
	if x + y - 1 == z + 1 and y > 1:
		return '|' * x + '+' + '|' * (y - 1) + '=' + '|' * (z + 1)
	return 'Impossible'
print(do())


def verify(a, b, c):
	if a == 0 or b == 0 or c == 0:
		return False
	return a + b == c

def get_expression(a, b, c):
	return '|' * a + '+' + '|' * b + '=' + '|' * c
expression = input()
a = expression.split('+')[0].count('|')
b = expression.split('+')[1].split('=')[0].count('|')
c = expression.split('=')[1].count('|')
if verify(a, b, c):
	print(get_expression(a, b, c))
elif verify(a + 1, b - 1, c):
	print(get_expression(a + 1, b - 1, c))
elif verify(a + 1, b, c - 1):
	print(get_expression(a + 1, b, c - 1))
elif verify(a - 1, b + 1, c):
	print(get_expression(a - 1, b + 1, c))
elif verify(a, b + 1, c - 1):
	print(get_expression(a, b + 1, c - 1))
elif verify(a - 1, b, c + 1):
	print(get_expression(a - 1, b, c + 1))
elif verify(a, b - 1, c + 1):
	print(get_expression(a, b - 1, c + 1))
else:
	print('Impossible')


def check(n1, n2, result):
	if n1 + n2 == result:
		return True
	else:
		return False

def convert_to_sticks(n1, n2, result):
	s = '|'
	n1 = n1 * s
	n2 = n2 * s
	result = result * s
	return [n1, n2, result]

def shift_check(n1, n2, result):
	if check(n1, n2, result):
		values = convert_to_sticks(n1, n2, result)
		return values
	if check(n1 + 1, n2, result - 1):
		n1 = n1 + 1
		result = result - 1
		values = convert_to_sticks(n1, n2, result)
		return values
	if check(n1 - 1, n2, result + 1):
		if n1 - 1 == 0:
			n2 = n2 - 1
		else:
			n1 = n1 - 1
		result = result + 1
		values = convert_to_sticks(n1, n2, result)
		return values
	else:
		print('Impossible')
		return
input_expression = input()
number1 = len(input_expression.split('=')[0].split('+')[0])
number2 = len(input_expression.split('=')[0].split('+')[1])
result = len(input_expression.split('=')[1])
output = shift_check(number1, number2, result)
if type(output) is list:
	print(output[0] + '+' + output[1] + '=' + output[2])


x = str(input())
for i in range(len(x)):
	if x[i] == '+':
		a = i
	if x[i] == '=':
		b = i
if b - 1 == len(x) - b - 1:
	print(x)
elif b - 1 == len(x) - b + 1:
	if a - 1 > 0:
		print('|' * (a - 1) + '+' + '|' * (b - a - 1) + '=' + '|' * (len(x) - b))
	else:
		print('|' * a + '+' + '|' * (b - a - 2) + '=' + '|' * (len(x) - b))
elif b - 1 == len(x) - b - 3:
	print('|' * (a + 1) + '+' + '|' * (b - a - 1) + '=' + '|' * (len(x) - b - 2))
else:
	print('Impossible')


str = input()
count = [0, 0, 0]
i = 0
for c in str:
	if c == '+':
		i += 1
	elif c == '=':
		i += 1
	elif c == '|':
		count[i] += 1
if count[0] + count[1] == count[2]:
	print(str)
elif count[0] + count[1] + 2 == count[2]:
	str = ''
	count[0] += 1
	count[2] -= 1
elif count[0] + count[1] == count[2] + 2:
	str = ''
	if count[0] != 1:
		count[0] -= 1
	else:
		count[1] -= 1
	count[2] += 1
else:
	print('Impossible')
if str == '':
	for step in range(len(count)):
		for k in range(count[step]):
			str += '|'
		if step == 0:
			str += '+'
		elif step == 1:
			str += '='
	print(str)


def sym_in_str(str):
	count = 0
	for i in str:
		count += 1
	return count
input_str = input()
one = input_str.split('+')
two = one[1].split('=')
numbers = [one[0], two[0], two[1]]
num_of_num = list()
for i in numbers:
	num_of_num.append(sym_in_str(i))
result_str = ''
if (num_of_num[0] + num_of_num[1]) % 2 == 0 and num_of_num[2] % 2 != 0 or ((num_of_num[0] + num_of_num[1]) % 2 != 0 and num_of_num[2] % 2 == 0):
	print('Impossible')
elif num_of_num[0] + num_of_num[1] + 1 == num_of_num[2] - 1:
	result_str = one[0] + '|+' + two[0] + '=' + two[1][:-1]
	print(result_str)
elif num_of_num[0] + num_of_num[1] - 1 == num_of_num[2] + 1:
	if num_of_num[0] > num_of_num[1] and num_of_num[0] > 1:
		result_str = one[0][:-1] + '+' + two[0] + '=' + two[1] + '|'
	elif num_of_num[1] > 1:
		result_str = one[0] + '+' + two[0][:-1] + '=' + two[1] + '|'
	print(result_str)
elif num_of_num[0] + num_of_num[1] == num_of_num[2]:
	result_str = input_str
	print(result_str)
else:
	print('Impossible')


s = input()
b = s
s = s.split('+')
s[1] = s[1].split('=')
a = s[1]
s.remove(s[1])
s = s + a
if len(s[0]) - 1 + len(s[1]) != len(s[2]) + 1 and len(s[0] + s[1]) > len(s[2]):
	print('Impossible')
elif len(s[0] + s[1]) == len(s[2]):
	print(b)
elif len(s[2]) - 2 - len(s[0] + s[1]) == 0:
	s[2] = s[2][:-1]
	print(s[0] + '|' + '+' + s[1] + '=' + s[2])
elif len(s[0]) - 1 + len(s[1]) == len(s[2]) + 1:
	if len(s[0]) == 1:
		print('|' * len(s[0]) + '+' + '|' * (len(s[1]) - 1) + '=' + '|' * (len(s[2]) + 1))
	else:
		print('|' * (len(s[0]) - 1) + '+' + '|' * len(s[1]) + '=' + '|' * (len(s[2]) + 1))
else:
	print('Impossible')


(ab, c) = input().split('=')
(a, b) = ab.split('+')
if a.count('|') + b.count('|') == c.count('|'):
	print(ab + '=' + c)
elif ab.count('|') + 1 == c.count('|') - 1:
	print(ab + '|=' + c.replace('|', '', 1))
elif ab.count('|') - 1 == c.count('|') + 1:
	if a.count('|') - 1 > 0:
		print(ab.replace('|', '', 1) + '=' + c + '|')
	else:
		print(a + '+' + b.replace('|', '', 1) + '=' + c + '|')
else:
	print('Impossible')


w = input()
(a, part2) = w.split('+')
(b, c) = part2.split('=')
(c1, c2, c3) = (a.count('|'), b.count('|'), c.count('|'))
if c1 + c2 == c3:
	print(c1 * '|' + '+' + c2 * '|' + '=' + c3 * '|')
elif c1 + c2 + 1 == c3 - 1:
	if c3 > 1:
		print((c1 + 1) * '|' + '+' + c2 * '|' + '=' + (c3 - 1) * '|')
	else:
		print('Impossible')
elif c1 + c2 - 1 == c3 + 1:
	if c1 > 1:
		print((c1 - 1) * '|' + '+' + c2 * '|' + '=' + (c3 + 1) * '|')
	elif c2 > 1:
		print(c1 * '|' + '+' + (c2 - 1) * '|' + '=' + (c3 + 1) * '|')
	else:
		print('Impossible')
else:
	print('Impossible')


try:
	lst = list(input())
	x = lst.count('|')
	if x % 2 != 0:
		print('Impossible')
	elif x == 0:
		print('Impossible')
	elif x == 1:
		print('Impossible')
	elif x == 2:
		print('Impossible')
	else:
		leftp = lst[:lst.index('+')].count('|')
		rightp = lst[lst.index('+') + 1:lst.index('=')].count('|')
		right = lst[lst.index('=') + 1:].count('|')
		if leftp + rightp == right:
			print(''.join(lst))
		elif leftp + rightp + 2 == right:
			print('|' * (leftp + 1), '+', '|' * rightp, '=', '|' * (right - 1), sep='')
		elif right + 2 == leftp + rightp:
			if rightp > leftp:
				print('|' * leftp, '+', '|' * (rightp - 1), '=', '|' * (right + 1), sep='')
			elif leftp > rightp:
				print('|' * (leftp - 1), '+', '|' * rightp, '=', '|' * (right + 1), sep='')
			elif rightp == leftp:
				print('|' * leftp, '+', '|' * (rightp - 1), '=', '|' * (right + 1), sep='')
			else:
				print('Impossible')
		else:
			print('Impossible')
except:
	pass


equation = input()
S1 = equation.split('+')
S2 = S1[1].split('=')
A = S1[0]
B = S2[0]
C = S2[1]
(Acount, Bcount, Ccount) = (A.count('|'), B.count('|'), C.count('|'))
if Acount + Bcount == Ccount:
	print('{}+{}={}'.format(A, B, C))
elif Acount + Bcount + 1 == Ccount - 1:
	A += '|'
	C = C.replace('|', '', 1)
	print('{}+{}={}'.format(A, B, C))
elif Acount + Bcount - 1 == Ccount + 1:
	if Acount > Bcount:
		A = A.replace('|', '', 1)
	else:
		B = B.replace('|', '', 1)
	C += '|'
	print('{}+{}={}'.format(A, B, C))
else:
	print('Impossible')


import math, sys
input = sys.stdin.readline

def insr():
	s = input()
	return list(s[:len(s) - 1])
abc = insr()
pl = abc.index('+')
eq = abc.index('=')
aa = abc[:pl]
bb = abc[pl + 1:eq]
cc = abc[eq + 1:]
a = len(aa)
b = len(bb)
c = len(cc)

def toStick(n):
	return '|' * n
if a + b == c:
	print(''.join(abc))
elif a + b > c:
	if a + b - 1 == c + 1:
		if a > 1:
			cc.append(aa.pop())
		else:
			cc.append(bb.pop())
		print('%s+%s=%s' % (''.join(aa), ''.join(bb), ''.join(cc)))
	else:
		print('Impossible')
elif a + b + 1 == c - 1:
	aa.append(cc.pop())
	print('%s+%s=%s' % (''.join(aa), ''.join(bb), ''.join(cc)))
else:
	print('Impossible')