import sequtils template times*(n:int,body) = (for _ in 0.." ,discardable.} proc scan(): int = while true: let k = getchar_unlocked() if k < '0': return result = 10 * result + k.ord - '0'.ord proc solve(a,b,c:int):int = # A 10B -> A+B=C # 15 + 15*10 for x in 1..a+b*10: for ia in 0..a: for ib in 0..b: # x円のものを ia+ib*10円で払う let g = ia + ib*10 - x if g < 0 : continue let res = (a-ia) + (b-ib) + (g mod 10) + (g div 10) if res != c : continue return x return -1 # const ABC = ( # proc():seq[seq[seq[int]]] = # result = newSeqWith(21,newSeqWith(21,newSeqWith(101,0))) # for a in 0..20: # for b in 0..20: # for c in 0..100: # result[a][b][c] = solve(a,b,c) # )() let a = scan() let b = scan() let c = scan() let ans = solve(a,b,c) if ans == -1 : echo "Impossible" else: echo ans