def f() a,b,c = gets.split.map(&:to_i) if c > a + b return "Impossible" end s = 10**10 for i in 0..a do for j in 0..b do if i + j == 0 next end t = i + j * 10 for k in 1..t do r = t - k an, bn = a - i + r % 10, b - j + r / 10 if an + bn == c s = [s, t-r].min end end end end return s < 10**10 ? s : "Impossible" end puts f()