The first line of input contains a single integer, the number of test cases to follow. Each test case begins with a line containing three integers N, M, Q, the number of intersections and roads in the city and the number of queries, respectively. The number of intersections is between 1 and 100, inclusive. The number of roads and the number of queries are each between 1 and 100000, inclusive. Intersections in the city are numbered from 1 to N. The first line of each test case is followed by M lines describing the roads. Each of these lines contains three integers X, Y, and Z. These integers indicate that a road exists from intersection X to intersection Y, and that when the bus travels on this road, a person who is Z centimetres tall gets on the bus, if Z is positive, or a person who is -Z centimetres tall gets off the bus, if Z is negative. For example, Z=170 indicates that a 170 cm tall person gets on the bus, and Z=-170 indicates that a 170 cm tall person gets off the bus. Each person is at least 40 cm and at most 220 cm tall. The lines describing the roads are followed by Q more lines, each describing a query. A line describing a query contains two integers, the beginning and ending intersections of the bus route.