using System.Linq;class X{static void Main(){for(int i=9;i++<1e4;)if((i+"").Distinct().Count()==2)System.Console.WriteLine(i);}}