The first line of input contains a single integer T indicating the number of test cases. Each test case starts with number N of patches, and four integer numbers – the coordinates X and Y of Mothy’s position and coordinates U and V of his mother’s position, separated by white spaces (-10000 <= X, Y, U, V <= 10000). Each patch is described on a separate line starting with the number of vertices and followed by a pair of integer coordinates (-10000 <= Xi, Yi <= 10000) for each of the vertices of the patch, separated by white spaces. The total number of vertices of polygons will not exceed 300.