Author:  A. Baranov  Time limit:  1 sec  
Input file:  input.txt  Memory limit:  256 Mb  
Output file:  output.txt 
Let us consider 3dimensional area that is split by uniform rectangular grid. Some cells contain ants. Each second every ant can either stay put or move to the neighboring cell in any of the six directions: up, down, right, left, forward and backward.
Your program must, given coordinates of starting cell for each ant, find minimum possible number of seconds (starting from zero) until any two ants meet in the same cell.
Input file contains integer N followed by N triples of integer indices X_{i}, Y_{i}, Z_{i} — coordinates of starting cells for each ant.
Output file must contain a single integer — minimal number of seconds until two ants meet.
−10^{6} ≤ (X_{i}, Y_{i}, Z_{i}) ≤ 10^{6}, 2 ≤ N ≤ 5 ⋅ 10^{4}
No.  Input file (input.txt ) 
Output file (output.txt ) 

1 


2 

