package pos1_2ahif.sample_safe;

public class Main {
    public static void main(String args[]) {
        System.out.println("hello test!");
    }
}

@@ -26,16 +26,164 @@
 _safe;%0A%0A
+import java.io.BufferedReader;%0Aimport java.io.IOException;%0Aimport java.io.InputStreamReader;%0Aimport java.util.Arrays;%0Aimport java.util.LinkedList;%0A%0A
 public c
@@ -194,20 +194,18 @@
  Main %7B%0A
-    
+%0A%09
 public s
@@ -239,57 +239,673 @@
 %5B%5D) 
-%7B%0A        System.out.println(%22hello test!%22);%0A    
+//%0A%09%09%09throws NumberFormatException, IOException %7B%0A%0A%09%09if (isCodeEnteredCorrectly(0001, 0002, 0003)) %7B%0A%09%09%09System.out.println(%22wrong!%22);%0A%09%09%7D else %7B%0A%09%09%09System.out.println(%22correct!%22);%0A%09%09%7D%0A%09%7D%0A%0A%09private static boolean isCodeEnteredCorrectly(int pin1, int pin2, int pin3)%0A%09%09%09throws NumberFormatException, IOException %7B%0A%0A%09%09LinkedList%3CInteger%3E code = new LinkedList%3CInteger%3E( //%0A%09%09%09%09Arrays.asList(pin1, pin2, pin3));%0A%0A%09%09try (InputStreamReader isr = new InputStreamReader(System.in);%0A%09%09%09%09BufferedReader br = new BufferedReader(isr)) %7B%0A%0A%09%09%09while (!code.isEmpty()) %7B%0A%09%09%09%09if (code.pop() != (Integer.valueOf(br.readLine()))) %7B%0A%09%09%09%09%09return false;%0A%09%09%09%09%7D%0A%09%09%09%7D%0A%09%09%09return true;%0A%0A%09%09%7D%0A%09
 %7D%0A%7D%0A

implement safe logic (are there any bugs?)