**Problem Description**

For this problem, you will read in descriptions of two rectangular claims, and determine which of the four cases is true.

**Input**

There will be multiple input sets. The first line of the input will be an integer n indicating the number of input sets. Each input set will consist of a single line containing 8 non-negative integers:

X

_{1A}Y_{1A}X_{2A}Y_{2A}X_{1B}Y_{1B}X_{2B}Y_{2B}where X

_{1A}, Y

_{1A}are the coordinates of the lower left corner of A's claim, and X

_{2A}, Y

_{2A}are the upper right corner of A's claim. The remaining four values are the corresponding corners of B's claim. All claims will have non-zero area (pretty ridiculous claim otherwise!).

**Output**

For each input set, output either the phrase "A surrounds B", "B surrounds A", "A and B overlap" or "A and B do not overlap". The two claims will never be identical.

**Sample Input**

3 10 10 20 20 12 0 14 18 0 0 5 5 0 0 6 6 0 0 5 5 0 5 5 10

**Sample Output**

A and B overlap B surrounds A A and B do not overlap

**Source**

East Central North America 2004, Practice