#Lutece0446. Water Tanks

Water Tanks

Migrated from Lutece 446 Water Tanks

All parts of this problem, including description, images, samples, data and checker, might be broken. If you find bugs in this problem, please contact the admins.

Description

There is a system of water tanks. The water tanks are connected by pipes. Below are the illustration:

title

The water tanks above a certain level will be empty since the water will flow to lower ones.

Now given the height and dimensions of each water tank, as well as the total volume of water, can you calculate the level of water? To simplify the problem, water in pipes can be ignored.

The illustration describes the third case of sample input.

Input

The input contains multiple test cases.

The first line of input file is an integer kk, indicating the number of test cases.

For each test case:

The first line is an integer NN (1N10001 \leq N \leq 1000), indicating the number of water tanks;

Then NN lines are followed. In each line there will be 44 nonnegative integers: bb, ww, hh, dd, they are the base level of the cistern, its height, width and depth, measured in meters.

The last line contains a single integer VV (1V23111\leq V\leq 2^{31}-1), the total volume of water.

It is guaranteed that 0b100000\leq b\leq 10000 and 1w×h×d100001\leq w\times h\times d\leq 10000.

Output

For each test case, you should output a single line containing the level that the water will reach, measured in meters, and rounded up to two fractional digits

In case the volume of water exceeds the total capacity of the whole system, you should output the word OVERFLOW instead.

Samples

输入数据 1

3
2
0 1 1 1
2 1 1 1
1
4
11 7 5 1
15 6 2 2
5 8 5 1
19 4 8 1
132
4
11 7 5 1
15 6 2 2
5 8 5 1
19 4 8 1
78

输出数据 1

1.00
OVERFLOW
17.00

Resources

5th BUPT Programming Contest Final