#include using namespace std; using lint = long long; template using V = vector; template using VV = V< V >; int main() { cin.tie(nullptr); ios::sync_with_stdio(false); int a, b, c; cin >> a >> b >> c; for (int x = 1; x <= a + 10 * b; ++x) { for (int i = 0; i <= a; ++i) for (int j = 0; j <= b; ++j) { if (i + 10 * j < x) continue; int r = i + 10 * j - x; int p = r / 10, q = r % 10; if (a - i + b - j + p + q == c) return cout << x << '\n', 0; } } cout << "Impossible" << '\n'; }