text: # Problem Polycarp plays a well-known computer game (we won't mention its name).Every object in this game consists of three-dimensional blocks — axis-aligned cubes of size 1 × 1 × 1.These blocks are unaffected by gravity, so they can float in the air without support.The blocks are placed in cells of size 1 × 1 × 1; each cell either contains exactly one block or is empty.Each cell is represented by its coordinates (x, y, z) (the cell with these coordinates is a cube with opposite corners in (x, y, z) and (x + 1, y + 1, z + 1)) and its contents a_{x, y, z}; if the cell is empty, then a_{x, y, z} = 0, otherwise a_{x, y, z} is equal to the type of the block placed in it (the types are integers from 1 to 2 ⋅ 10^5).Polycarp has built a large structure consisting of blocks.This structure can be enclosed in an axis-aligned rectangular parallelepiped of size n × m × k, containing all cells (x, y, z) such that x ∈ [1, n], y ∈ [1, m], and z ∈ [1, k].After that, Polycarp has installed 2nm + 2nk + 2mk sensors around this parallelepiped.A sensor is a special block that sends a ray in some direction and shows the type of the first block that was hit by this ray (except for other sensors).The sensors installed by Polycarp are adjacent to the borders of the parallelepiped, and the rays sent by them are parallel to one of the coordinate axes and directed inside the parallelepiped.