A space shuttle is drifting somewhere in empty space, and its exact position is unknown. To help locate it, the shuttle is equipped with three independent navigation systems.
Each system reports the shuttle's position as coordinates (x,y,z) together with a bound b on its measurement error. If a system is working correctly, the shuttle's true position lies within distance b of the reported point: it is some (x′,y′,z′) with (x−x′)2+(y−y′)2+(z−z′)2≤b. In other words, each system restricts the shuttle to a solid ball of radius b centered at its reported point (x,y,z).
At least one of the three systems is guaranteed to be working, but any of the others may be broken and report arbitrary, meaningless values. Since we do not know which systems are reliable, the shuttle may be located at any point that lies inside at least one of the three balls: if a point lies in some system's ball, then that system alone being the working one is a consistent explanation.
Compute the total volume of the region of all possible positions of the shuttle, which is the volume of the union of the three balls.
The first line contains a single positive integer Z (Z≤10000), the number of test cases. Each test case is given on three lines. Each of those lines describes one measurement with four integers x, y, z, and b separated by single spaces, where −109≤x,y,z≤109 and 1≤b≤109. Here (x,y,z) is the reported position and b is the error bound, i.e. the radius of that system's ball.
For each test case, print on its own line the volume of the union of the three balls, rounded to exactly six digits after the decimal point.