@@ -0,0 +1,464 @@
+import java.util.Scanner;%0Aimport java.util.Stack;%0A%0Apublic class Main %7B%0A%0A    public static void main(String%5B%5D args) %7B%0A%0A        Scanner sc = new Scanner(System.in);%0A        Stack%3CInteger%3E stack = new Stack%3CInteger%3E();%0A%0A        while (sc.hasNextInt()) %7B%0A%0A            int number = sc.nextInt();%0A%0A            if (number == 0) %7B%0A                System.out.println(stack.pop());%0A            %7D else %7B%0A                stack.push(number);%0A            %7D%0A%0A        %7D%0A%0A    %7D%0A%0A%7D%0A

Create : 0013