Language: Java

import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.IOException;
public class Main{
????????public static void main(String[] args) throws IOException{
????????????????BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
????????????????StringBuilder sb = new StringBuilder();
????????????????String line = br.readLine();
????????????????int n = Integer.parseInt(line);
????????????????for(int i = 1; i <= n; i++){
????????????????????????int x = i;
????????????????????????if( x % 3 == 0 ){
????????????????????????????????sb.append(" ").append(i);
????????????????????????}else{
????????????????????????????????do{
????????????????????????????????????????if( x % 10 == 3 ){
????????????????????????????????????????????????sb.append(" ").append(i);
????????????????????????????????????????????????????????????????????????????????????????????????x = 0;
????????????????????????????????????????}
????????????????????????????????????????x /= 10;
????????????????????????????????}while( x != 0 );
????????????????????????}
????????????????}
????????????????sb.append("\n");
????????????????System.out.print(sb);
????????}
}

Compiler output:
Main.java:5: error: illegal start of type
????????public static void main(String[] args) throws IOException{
^
Main.java:6: error: illegal start of expression
????????????????BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
^
Main.java:6: error: illegal start of expression
????????????????BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
 ^
Main.java:6: error: illegal start of expression
????????????????BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
  ^
Main.java:6: error: illegal start of expression
????????????????BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
   ^
Main.java:6: error: illegal start of expression
????????????????BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    ^
Main.java:6: error: illegal start of expression
????????????????BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
     ^
Main.java:6: error: illegal start of expression
????????????????BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
      ^
Main.java:6: error: illegal start of expression
????????????????BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
       ^
Main.java:6: error: illegal start of expression
????????????????BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        ^
Main.java:6: error: illegal start of expression
????????????????BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
         ^
Main.java:6: error: illegal start of expression
????????????????BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
          ^
Main.java:6: error: illegal start of expression
????????????????BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
           ^
Main.java:6: error: illegal start of expression
????????????????BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
            ^
Main.java:6: error: illegal start of expression
????????????????BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
             ^
Main.java:6: error: illegal start of expression
????????????????BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
              ^
Main.java:6: error: illegal start of expression
????????????????BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
               ^
Main.java:6: error: : expected
????????????????BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
                              ^
Main.java:6: error: : expected
????????????????BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
                                                                                        ^
Main.java:7: error: illegal start of expression
????????????????StringBuilder sb = new StringBuilder();
^
Main.java:7: error: illegal start of expression
????????????????StringBuilder sb = new StringBuilder();
 ^
Main.java:7: error: illegal start of expression
????????????????StringBuilder sb = new StringBuilder();
  ^
Main.java:7: error: illegal start of expression
????????????????StringBuilder sb = new StringBuilder();
   ^
Main.java:7: error: illegal start of expression
????????????????StringBuilder sb = new StringBuilder();
    ^
Main.java:7: error: illegal start of expression
????????????????StringBuilder sb = new StringBuilder();
     ^
Main.java:7: error: illegal start of expression
????????????????StringBuilder sb = new StringBuilder();
      ^
Main.java:7: error: illegal start of expression
????????????????StringBuilder sb = new StringBuilder();
       ^
Main.java:7: error: illegal start of expression
????????????????StringBuilder sb = new StringBuilder();
        ^
Main.java:7: error: illegal start of expression
????????????????StringBuilder sb = new StringBuilder();
         ^
Main.java:7: error: illegal start of expression
????????????????StringBuilder sb = new StringBuilder();
          ^
Main.java:7: error: illegal start of expression
????????????????StringBuilder sb = new StringBuilder();
           ^
Main.java:7: error: illegal start of expression
????????????????StringBuilder sb = new StringBuilder();
            ^
Main.java:7: error: illegal start of expression
????????????????StringBuilder sb = new StringBuilder();
             ^
Main.java:7: error: illegal start of expression
????????????????StringBuilder sb = new StringBuilder();
              ^
Main.java:7: error: illegal start of expression
????????????????StringBuilder sb = new StringBuilder();
               ^
Main.java:7: error: : expected
????????????????StringBuilder sb = new StringBuilder();
                             ^
Main.java:7: error: : expected
????????????????StringBuilder sb = new StringBuilder();
                                                      ^
Main.java:8: error: illegal start of expression
????????????????String line = br.readLine();
^
Main.java:8: error: illegal start of expression
????????????????String line = br.readLine();
 ^
Main.java:8: error: illegal start of expression
????????????????String line = br.readLine();
  ^
Main.java:8: error: illegal start of expression
????????????????String line = br.readLine();
   ^
Main.java:8: error: illegal start of expression
????????????????String line = br.readLine();
    ^
Main.java:8: error: illegal start of expression
????????????????String line = br.readLine();
     ^
Main.java:8: error: illegal start of expression
????????????????String line = br.readLine();
      ^
Main.java:8: error: illegal start of expression
????????????????String line = br.readLine();
       ^
Main.java:8: error: illegal start of expression
????????????????String line = br.readLine();
        ^
Main.java:8: error: illegal start of expression
????????????????String line = br.readLine();
         ^
Main.java:8: error: illegal start of expression
????????????????String line = br.readLine();
          ^
Main.java:8: error: illegal start of expression
????????????????String line = br.readLine();
           ^
Main.java:8: error: illegal start of expression
????????????????String line = br.readLine();
            ^
Main.java:8: error: illegal start of expression
????????????????String line = br.readLine();
             ^
Main.java:8: error: illegal start of expression
????????????????String line = br.readLine();
              ^
Main.java:8: error: illegal start of expression
????????????????String line = br.readLine();
               ^
Main.java:8: error: : expected
????????????????String line = br.readLine();
                      ^
Main.java:8: error: : expected
????????????????String line = br.readLine();
                                           ^
Main.java:9: error: illegal start of expression
????????????????int n = Integer.parseInt(line);
^
Main.java:9: error: illegal start of expression
????????????????int n = Integer.parseInt(line);
 ^
Main.java:9: error: illegal start of expression
????????????????int n = Integer.parseInt(line);
  ^
Main.java:9: error: illegal start of expression
????????????????int n = Integer.parseInt(line);
   ^
Main.java:9: error: illegal start of expression
????????????????int n = Integer.parseInt(line);
    ^
Main.java:9: error: illegal start of expression
????????????????int n = Integer.parseInt(line);
     ^
Main.java:9: error: illegal start of expression
????????????????int n = Integer.parseInt(line);
      ^
Main.java:9: error: illegal start of expression
????????????????int n = Integer.parseInt(line);
       ^
Main.java:9: error: illegal start of expression
????????????????int n = Integer.parseInt(line);
        ^
Main.java:9: error: illegal start of expression
????????????????int n = Integer.parseInt(line);
         ^
Main.java:9: error: illegal start of expression
????????????????int n = Integer.parseInt(line);
          ^
Main.java:9: error: illegal start of expression
????????????????int n = Integer.parseInt(line);
           ^
Main.java:9: error: illegal start of expression
????????????????int n = Integer.parseInt(line);
            ^
Main.java:9: error: illegal start of expression
????????????????int n = Integer.parseInt(line);
             ^
Main.java:9: error: illegal start of expression
????????????????int n = Integer.parseInt(line);
              ^
Main.java:9: error: illegal start of expression
????????????????int n = Integer.parseInt(line);
               ^
Main.java:9: error: '.class' expected
????????????????int n = Integer.parseInt(line);
                    ^
Main.java:9: error: : expected
????????????????int n = Integer.parseInt(line);
                                              ^
Main.java:10: error: illegal start of expression
????????????????for(int i = 1; i <= n; i++){
^
Main.java:10: error: illegal start of expression
????????????????for(int i = 1; i <= n; i++){
 ^
Main.java:10: error: illegal start of expression
????????????????for(int i = 1; i <= n; i++){
  ^
Main.java:10: error: illegal start of expression
????????????????for(int i = 1; i <= n; i++){
   ^
Main.java:10: error: illegal start of expression
????????????????for(int i = 1; i <= n; i++){
    ^
Main.java:10: error: illegal start of expression
????????????????for(int i = 1; i <= n; i++){
     ^
Main.java:10: error: illegal start of expression
????????????????for(int i = 1; i <= n; i++){
      ^
Main.java:10: error: illegal start of expression
????????????????for(int i = 1; i <= n; i++){
       ^
Main.java:10: error: illegal start of expression
????????????????for(int i = 1; i <= n; i++){
        ^
Main.java:10: error: illegal start of expression
????????????????for(int i = 1; i <= n; i++){
         ^
Main.java:10: error: illegal start of expression
????????????????for(int i = 1; i <= n; i++){
          ^
Main.java:10: error: illegal start of expression
????????????????for(int i = 1; i <= n; i++){
           ^
Main.java:10: error: illegal start of expression
????????????????for(int i = 1; i <= n; i++){
            ^
Main.java:10: error: illegal start of expression
????????????????for(int i = 1; i <= n; i++){
             ^
Main.java:10: error: illegal start of expression
????????????????for(int i = 1; i <= n; i++){
              ^