@@ -0,0 +1,552 @@
+import java.util.Scanner;%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%0A        String ball = %22A%22;%0A%0A        while (sc.hasNext()) %7B%0A%0A            String%5B%5D input = sc.next().split(%22,%22);%0A%0A            String change1 = input%5B0%5D;%0A            String change2 = input%5B1%5D;%0A%0A            if (ball.equals(change1)) %7B%0A                ball = change2;%0A            %7D else if (ball.equals(change2)) %7B%0A                ball = change1;%0A            %7D%0A%0A        %7D%0A%0A        System.out.println(ball);%0A%0A    %7D%0A%0A%7D%0A

Create : 0047