#define _CRT_SECURE_NO_WARNINGS #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; #define eps 0.000001 #define LONG_INF 10000000000000 #define GOLD 1.61803398874989484820458 #define seg_size 65536*4 #define REP(i,n) for(long long i = 0;i < n;++i) unsigned long xor128() { static unsigned long x = time(NULL), y = 362436069, z = 521288629, w = 88675123; unsigned long t = (x ^ (x << 11)); x = y; y = z; z = w; return (w = (w ^ (w >> 19)) ^ (t ^ (t >> 8))); } int main() { int a, b, c; cin >> a >> b >> c; for (int i = 1; i <= a + b*10; ++i) { for (int j = 0; j <= a; ++j) { for (int t = 0; t <= b; ++t) { int hoge = t * 10 + j; if (hoge < i) continue; int geko = hoge - i; int cnt = a + b - j - t; cnt += geko % 10; cnt += geko / 10; if (cnt == c) { cout << i << endl; return 0; } } } } cout << "Impossible" << endl; return 0; }