using System; using System.Collections.Generic; namespace ConsoleApp1 { class Program { static void Main(string[] args) { #if LocalDebug var exStdIn = new System.IO.StreamReader("stdin.txt"); System.Console.SetIn(exStdIn); #endif var Data = Console.ReadLine().Split(' '); var start = int.Parse(Data[0]); var end = int.Parse(Data[1]); for (var i = start; i <= end; i++) { if((i%3==0)||(i.ToString().IndexOf('3')>=0)) { Console.WriteLine(i); } } #if LocalDebug System.Console.ReadKey(); #endif } static int GetData() { return int.Parse(Console.ReadLine()); } } }