Lasers
Never before the special agent Ivan Okhotnichii had been so close to a failure. It had seemed that to get into a secret laboratory through a ventilation hole in the ceiling and hack the computer would be no trouble. However, from above Ivan noticed that the laboratory was pierced by N laser beams. Touching any of them would activate the alarm system. The i^th beam was generated by an emitter located at the point (X_i, Y_i, Z_i) and was directed along the vector (u_i, v_i, w_i). Ivan examined the room and determined the numbers X_i and Y_i. He also computed the vectors (u_i,v_i, w_i). However, in order to plan his further actions, Ivan had to know the Z coordinates of the emitters as well.
Luckily, for some pairs of laser beams Ivan managed to determine that the first beam in the pair was above the second (that meant that there existed X, Y, Z_1, Z_2 such that the point (X, Y, Z_1) belonged to the first beam, the point (X, Y, Z_2) belonged to the second beam, and Z_1 was greater than Z_2). Help Ivan to find one of the possible arrangements of the lasers in space.
Input
The first line contains the number of lasers N (1 ≤ N ≤ 100). In each of the following N lines, there are the integers X_i, Y_i, u_i, v_i, w_i, which describe the i^th laser; these numbers are in the range from −100 to 100. In the next line, there is the number M of pairs of lasers for which their relative positions are known (0 ≤ M ≤ 10000). Each of the following M lines contains two different integers i and j, which mean that the i^th laser is above the j^th laser (1 ≤ i, j ≤ N). None of the laser beams is parallel to the OZ axis, and no two beams lie in the same vertical plane.
Output
Output N real numbers, one number per line, which are the coordinates Z_i. Their absolute values shouldn't exceed 10^6. The numbers must be given with the maximal possible accuracy. The existence of at least one arrangement of lasers complying with the input data is guaranteed.