Language: Java

import java.*;
public class Main {
    public static final long mod = (long)1e9+7;
    public static final long INF = Long.MAX_VALUE/10;
    public static final int inf = Integer.MAX_VALUE/10;

    static void solve(InputReader in, PrintWriter out){
        int n = in.ni(), x, y, h, H;
        pair sp = new pair();
        pair[] p = new pair[n];
        boolean start = true, flag;
        for (int i = 0; i < n; i++) {
            x = in.ni(); y = in.ni(); h = in.ni();
            if(start&&h!=0){
                sp.x = x; sp.y = y; sp.h = h;
                start  = false;
            }
            p[i] = new pair();
            p[i].x = x; p[i].y = y; p[i].h = h;
        }
        out:for (int i = 0; i <= 100; i++) {
            for (int j = 0; j <= 100; j++) {
                flag = true;
                for(pair a: p){
                    H = sp.h+Math.abs(sp.x-i)+Math.abs(sp.y-j)-Math.abs(a.x-i)-Math.abs(a.y-j);
                    if(H>0&&H!=a.h || H<=0&&a.h!=0){
                        flag = false;
                        break;
                    }
                }
                if(flag){
                    out.printf("%d %d %d", i, j, h);
                    break out;
                }
            }
        }
    }
    public static class pair{ int x, y, h;}
    public static void main(String[] args) throws Exception{
        InputReader in = new InputReader(System.in);
        PrintWriter out = new PrintWriter(System.out);
        solve(in, out);
        out.close();
    }
    public static class InputReader{
        private BufferedReader br;
        private StringTokenizer st;
        public InputReader(InputStream is){
            br = new BufferedReader(new InputStreamReader(is));
            st = null;
        }
        public String ns(){
            if(st == null || !st.hasMoreTokens()){
                try{
                    st = new StringTokenizer(br.readLine());
                }catch (Exception e){
                    throw new RuntimeException(e);
                }
            }
            return st.nextToken();
        }
        public long nl(){
            return Long.parseLong(ns());
        }
        public int ni(){
            return Integer.parseInt(ns());
        }
        public Double nd(){
            return Double.parseDouble(ns());
        }
        public int[] ni(int n){
            int[] a = new int[n];
            for (int i = 0; i < n; i++) {
                a[i] = ni();
            }
            return a;
        }
        public long[] nl(int n){
            long[] a = new long[n];
            for (int i = 0; i < n; i++) {
                a[i] = nl();
            }
            return a;
        }
        public double[] nd(int n){
            double[] a = new double[n];
            for (int i = 0; i < n; i++) {
                a[i] = nd();
            }
            return a;
        }
    }
}

Compiler output:
Main.java:7: error: cannot find symbol
    static void solve(InputReader in, PrintWriter out){
                                      ^
  symbol:   class PrintWriter
  location: class Main
Main.java:46: error: cannot find symbol
        private BufferedReader br;
                ^
  symbol:   class BufferedReader
  location: class InputReader
Main.java:47: error: cannot find symbol
        private StringTokenizer st;
                ^
  symbol:   class StringTokenizer
  location: class InputReader
Main.java:48: error: cannot find symbol
        public InputReader(InputStream is){
                           ^
  symbol:   class InputStream
  location: class InputReader
Main.java:1: error: package java does not exist
import java.*;
^
Main.java:41: error: cannot find symbol
        PrintWriter out = new PrintWriter(System.out);
        ^
  symbol:   class PrintWriter
  location: class Main
Main.java:41: error: cannot find symbol
        PrintWriter out = new PrintWriter(System.out);
                              ^
  symbol:   class PrintWriter
  location: class Main
Main.java:49: error: cannot find symbol
            br = new BufferedReader(new InputStreamReader(is));
                     ^
  symbol:   class BufferedReader
  location: class InputReader
Main.java:49: error: cannot find symbol
            br = new BufferedReader(new InputStreamReader(is));
                                        ^
  symbol:   class InputStreamReader
  location: class InputReader
Main.java:55: error: cannot find symbol
                    st = new StringTokenizer(br.readLine());
                             ^
  symbol:   class StringTokenizer
  location: class InputReader
10 errors