The input is a single test case in the following format.
A B C N
X1 Y1 Z1
...
XN YN ZN
The first line contains the integers A, B, C and N. A, B and C (1≤A,B,C≤106) give the size of the cuboid: it is A units wide from left to right, B units tall from bottom to top, and C units deep from front to back. N (0≤N≤20000, N≤A×B×C−1) is the number of cubes that are removed.
Each of the next N lines contains the integers Xi (0≤Xi≤A−1), Yi (0≤Yi≤B−1) and Zi (0≤Zi≤C−1). They mean that the cube Xi steps from the left, Yi steps from the bottom and Zi steps from the front is removed. Coordinates count from 0. All given positions are distinct.