import java.io.PrintWriter; import java.util.*; public class No0207 { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); PrintWriter out = new PrintWriter(System.out); int a = scanner.nextInt(); int b = scanner.nextInt(); for(int i = a; i <= b; i++) { out.print(i); if (Integer.toString(i).contains("3") || i%3 == 0) { out.print("!"); out.println(""); continue; } out.println(""); } out.flush(); } }