using System; using System.Collections.Generic; using System.Linq; using static System.Console; using static System.Convert; using static System.Math; //using Debug; //using static System.Globalization.CultureInfo; using System.Text; class Program { static void Main(string[] args) { Solve(); //WriteLine(Solve()); } static void Solve() { var abc = Input.ar; var val = abc[0] + 10 * abc[1]; var e = new List>() { new Pair(0, 0, 0) }; for (var i = 0; i < abc[0]; i++) e.Add(new Pair(i+1,i+1,0));var c = e.Count; for (var i = 0; i < c; i++) for (var j = 0; j < abc[1]; j++) e.Add(new Pair(e[i].v1 + 10 * (j + 1), e[i].v2, j + 1)); var v = e.Where(a => a.v2/10 + a.v3+a.v2%10 == abc[2] && a.v1 != val).Select(a => val - a.v1).OrderBy(a => a).FirstOrDefault(); if (v == 0) WriteLine("Impossible"); else WriteLine(v); } } public class Input { public static string read => ReadLine(); public static int[] ar => Array.ConvertAll(read.Split(' '), int.Parse); public static int num => ToInt32(read); public static long[] arL => Array.ConvertAll(read.Split(' '), long.Parse); public static long numL => ToInt64(read); public static char[][] gred(int h) => Enumerable.Repeat(0, h).Select(v => read.ToCharArray()).ToArray(); public static int[][] ar2D(int num) => Enumerable.Repeat(0, num).Select(_ => ar).ToArray(); public static long[][] arL2D(int num) => Enumerable.Repeat(0, num).Select(_ => arL).ToArray(); public static T getValue(string g) { var t = typeof(T); if (t == typeof(int)) return (T)(object)int.Parse(g); if (t == typeof(long)) return (T)(object)long.Parse(g); if (t == typeof(string)) return (T)(object)g; if (t == typeof(char)) return (T)(object)char.Parse(g); if (t == typeof(double)) return (T)(object)double.Parse(g); if (t == typeof(bool)) return (T)(object)bool.Parse(g); return default(T); } public const long Inf = (long)1e18; public const double eps = 1e-6; public const string alfa = "abcdefghijklmnopqrstuvwxyz"; public const int MOD = 1000000007; } public class Pair : IComparable> { public T1 v1 { get; set; } public T2 v2 { get; set; } public Pair() : this(default(T1), default(T2)) { } public Pair(T1 v1, T2 v2) => SetValue(v1, v2); public int CompareTo(Pair p) { var c = Comparer.Default.Compare(v1, p.v1); if (c == 0) c = Comparer.Default.Compare(v2, p.v2); return c; } public void SetValue(T1 v1,T2 v2) { this.v1 = v1;this.v2 = v2; } public static Pair makePair() { var r = ReadLine().Split(' '); return new Pair(Input.getValue(r[0]), Input.getValue(r[1])); } public override string ToString() => $"{v1.ToString()} {v2.ToString()}"; } public class Pair : Pair, IComparable> { public T3 v3 { get; set; } public Pair() : base() => v3 = default(T3); public Pair(T1 v1,T2 v2,T3 v3):base() => SetValue(v1, v2, v3); public int CompareTo(Pair p) { var c = base.CompareTo(p); if (c == 0) c = Comparer.Default.Compare(v3, p.v3); return c; } public void SetValue(T1 v1, T2 v2, T3 v3) { base.SetValue(v1, v2); this.v3 = v3; } public new static Pair makePair() { var r = ReadLine().Split(' '); return new Pair(Input.getValue(r[0]), Input.getValue(r[1]), Input.getValue(r[2])); } public override string ToString() => $"{base.ToString()} {v3.ToString()}"; }