using System; using System.Collections.Generic; namespace yuki560 { class Problem { public static List getinputdata (){ List list_temp = new List(); string strdata = Console.ReadLine (); while (strdata!=null) { string[] s_temp = strdata.Split (' '); list_temp.Add (s_temp); strdata = Console.ReadLine (); } return list_temp; } public static void Main (string[] args) { List list_result = new List(); list_result = getinputdata (); int a = int.Parse(list_result[0][0]); int b = int.Parse(list_result[0][1]); for (int i = a; i <= b; i++) { if (i % 3 == 0 || i.ToString().Contains("3")) { Console.WriteLine(i); } } } } }