using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; class P { static void Main(string[] args) { string[] CSL = Console.ReadLine().Split(); int A = int.Parse(CSL[0]); int B = int.Parse(CSL[1]); for (int i = A; i <= B; i++) { if (i % 3 == 0) { Console.WriteLine( i); continue; } foreach (char n in i.ToString()) { if (n == '3') { Console.WriteLine( i); break; } } } Console.ReadKey(); } }