namespace System.Linq{class B{static void Main(){for(int i=1;i<10001;i++)if(i.ToString().ToCharArray().Distinct().Count()==2)Console.WriteLine(i);}}}