## COCI '07 Regional #4 Jednakost

View as PDF

Points: 17 (partial)
Time limit: 0.6s
Memory limit: 64M

Problem types

While browsing a math book, Mirko found a strange equation of the form . What makes the equation strange is that and are not the same. Mirko realized that the left side of the equation should have addition operations between some pairs of digits in .

Write a program that inserts the smallest number of addition operations on the left side to make the equation correct. The numbers in the corrected equation may contain arbitrary amounts of leading zeros.

#### Input Specification

The first line contains the equation in the form .

and will both be positive integers without leading zeros. They will be different.

will contain at most digits.

will be less than or equal to .

Note: The input data will guarantee that a solution, although not necessarily unique, will always exist.

#### Output Specification

Output the corrected equation. If there are multiple solutions, output any of them.

#### Sample Input 1

143175=120

#### Sample Output 1

14+31+75=120

#### Sample Input 2

5025=30

#### Sample Output 2

5+025=30

#### Sample Input 3

999899=125

#### Sample Output 3

9+9+9+89+9=125