using System; using System.Linq; class Program { static void Main() { int[] n = Console.ReadLine().Split().Select(int.Parse).ToArray(); var seq = Enumerable.Range(n[0], n[1] - n[0] + 1).Where(x => x % 3 == 0 || x.ToString().Contains("3")).ToList(); seq.ForEach(Console.WriteLine); } }