A, B, C = gets.split.map(&:to_i) MAX_G = A + 10 * B (1..MAX_G).each do |g| (0..A).each do |a| (0..B).each do |b| sum = a + 10 * b otsuri = sum - g next if otsuri < 0 ten, one = otsuri.divmod(10) total = (A - a) + (B - b) + ten + one next if total != C puts g exit end end end puts 'Impossible'