@@ -0,0 +1,2124 @@
+import java.util.ArrayList;%0Aimport java.io.*;%0A%0Apublic class HolidayCode10 %7B%0A%0A  public static void main(String%5B%5D args)%7B%09  %0A%0A    %0A    try%7B%0A        File file = new File(%22bots.txt%22);%0A  %09   FileReader fileReader = new FileReader(file);%0A  %09   BufferedReader input = new BufferedReader(fileReader);%0A        %0A        %0A        String line;%0A        ArrayList%3CInteger%3E values = new ArrayList%3CInteger%3E();%0A        for(int i = 0; i %3C 300; i++)%7B%0A        %09values.add(0);%0A        %7D%0A        %0A        %0A       %0A        while((line = input.readLine()) != null)%7B%0A        %0A        %09String%5B%5D parts = line.split(%22 %22);%0A        %09%0A        %09if(parts%5B0%5D.equals(%22value%22))%7B%0A        %09%09%0A        %09%09int value = Integer.parseInt(parts%5B1%5D);%0A        %09%09int bot = Integer.parseInt(parts%5B5%5D);%0A        %09%09%0A        %09%09values.set(value, bot);%0A        %09%09%0A        %09%7D else %7B%0A        %09%09//high-low bot thing%0A        %09%09int bot = Integer.parseInt(parts%5B1%5D);%0A        %09%09if(values.contains(bot))%7B%0A        %09%09%09//Valid command. 5 and 10 can be output or bot%0A        %09%09%09int lowIndex = values.indexOf(bot);%0A        %09%09%09int highIndex = values.lastIndexOf(bot);%0A        %09%09%09if(parts%5B5%5D.equals(%22output%22))%7B%0A        %09%09%09%09%0A        %09%09%09%09//Discard low value - goes back to 0 in value array%0A        %09%09%09%09values.set(lowIndex, 0);%0A        %09%09%09%09%0A        %09%09%09%7D else %7B%0A        %09%09%09%09%0A        %09%09%09%09int recipient = Integer.parseInt(parts%5B6%5D);%0A        %09%09%09%09values.set(lowIndex, recipient);%0A        %09%09%09%09%0A        %09%09%09%7D%0A        %09%09%09%0A        %09%09%09if(parts%5B10%5D.equals(%22output%22))%7B%0A        %09%09%09%09%0A        %09%09%09%09//Discard high value - goes back to 0 in value array%0A        %09%09%09%09values.set(highIndex, 0);%0A        %09%09%09%09%0A        %09%09%09%7D else %7B%0A        %09%09%09%09%0A        %09%09%09%09int recipient = Integer.parseInt(parts%5B11%5D);%0A        %09%09%09%09values.set(highIndex, recipient);%0A        %09%09%09%09%0A        %09%09%09%7D%0A        %09%09%09%0A        %09%09%7D        %09%09%0A        %09%7D%0A        %09%0A        %09if(values.get(61) == values.get(17) && values.get(17) != 0)%7B%0A        %09%09System.out.println(values.get(61));%0A        %09%09//break;%0A        %09%7D%0A        %09%0A        %7D%0A        %0A    %7D catch  (IOException error) %7B //Need this for using buffered readers%0A%09%09%09error.printStackTrace();%0A    %7D%0A    %0A  %7D%0A  %0A%7D%0A

Create HolidayCode10.java