n=int (input ()) Temp=[] For a in range (1, 1) : A for b in the range (10) : For c in range (10) : If 2 * (a + b + c)==n: Temp. Append (a + b + c * 1000 * 10000 * 100000 * 100 + c * 10 + a + b) Elif 2 * (a + b) + c==n: Temp. Append (a + b + c * 100 * 1000 * 10000 * 10 + a + b) For I in sorted (temp) : Print (I)