using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace yukicoderTest { class Program { static void Main(string[] args) { string[] input = Console.ReadLine().Split(' '); int start = int.Parse(input[0]); int end = int.Parse(input[1]); if (end - start < 100) { for (int i = start; i <= end; i++) { string temp = i.ToString(); int num = i; if (temp.Length > 2) { temp = temp.Substring(temp.Length - 2, 2); num = int.Parse(temp); } if (num != 0 && num % 3 == 0 || num % 10 == 3 || num / 10 == 3) { Console.WriteLine(i); } } } } } }