using System; class Program { static void Main(string[] args) { var from = Convert.ToInt32(Console.ReadLine()); var to = Convert.ToInt32(Console.ReadLine()); foreach (var i in Enumerable.Range(from, to - from + 1)) { if (i.ToString().IndexOf("3") != -1 || i % 3 == 0) Console.WriteLine(i.ToString()); } } }