INSERT INTO pagc_rules (id, rule) VALUES (2212, '0 18 22 3 6 6 18 -1 1 1 2 3 3 4 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2213, '0 18 22 3 6 6 18 0 -1 1 1 2 3 3 4 5 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2214, '0 18 22 3 6 6 18 18 -1 1 1 2 3 3 4 5 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2215, '0 18 22 11 6 0 -1 1 1 2 3 4 5 -1 1 17');
INSERT INTO pagc_rules (id, rule) VALUES (2216, '0 18 22 11 6 21 -1 1 1 2 3 4 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2217, '0 18 22 11 6 21 0 -1 1 1 2 3 4 5 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2218, '0 18 22 11 6 23 -1 1 1 2 3 4 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2219, '0 18 22 11 6 0 18 -1 1 1 2 3 4 5 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2220, '0 18 22 11 6 0 0 -1 1 1 2 3 4 5 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2221, '0 18 22 11 6 18 -1 1 1 2 3 4 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2222, '0 18 22 11 6 18 0 -1 1 1 2 3 4 5 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2223, '0 18 22 11 6 18 18 -1 1 1 2 3 4 5 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2224, '0 18 22 11 6 6 0 -1 1 1 2 3 3 4 5 -1 1 17');
INSERT INTO pagc_rules (id, rule) VALUES (2225, '0 18 22 11 6 6 21 -1 1 1 2 3 3 4 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2226, '0 18 22 11 6 6 21 0 -1 1 1 2 3 3 4 5 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2227, '0 18 22 11 6 6 23 -1 1 1 2 3 3 4 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2228, '0 18 22 11 6 6 0 18 -1 1 1 2 3 3 4 5 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2229, '0 18 22 11 6 6 0 0 -1 1 1 2 3 3 4 5 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2230, '0 18 22 11 6 6 18 -1 1 1 2 3 3 4 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2231, '0 18 22 11 6 6 18 0 -1 1 1 2 3 3 4 5 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2232, '0 18 22 11 6 6 18 18 -1 1 1 2 3 3 4 5 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2233, '0 18 22 3 11 6 0 -1 1 1 2 3 3 4 5 -1 1 17');
INSERT INTO pagc_rules (id, rule) VALUES (2234, '0 18 22 3 11 6 21 -1 1 1 2 3 3 4 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2235, '0 18 22 3 11 6 21 0 -1 1 1 2 3 3 4 5 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2236, '0 18 22 3 11 6 23 -1 1 1 2 3 3 4 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2237, '0 18 22 3 11 6 0 18 -1 1 1 2 3 3 4 5 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2238, '0 18 22 3 11 6 0 0 -1 1 1 2 3 3 4 5 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2239, '0 18 22 3 11 6 18 -1 1 1 2 3 3 4 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2240, '0 18 22 3 11 6 18 0 -1 1 1 2 3 3 4 5 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2241, '0 18 22 3 11 6 18 18 -1 1 1 2 3 3 4 5 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2242, '0 18 22 3 11 6 6 0 -1 1 1 2 3 3 3 4 5 -1 1 17');
INSERT INTO pagc_rules (id, rule) VALUES (2243, '0 18 22 3 11 6 6 21 -1 1 1 2 3 3 3 4 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2244, '0 18 22 3 11 6 6 21 0 -1 1 1 2 3 3 3 4 5 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2245, '0 18 22 3 11 6 6 23 -1 1 1 2 3 3 3 4 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2246, '0 18 22 3 11 6 6 0 18 -1 1 1 2 3 3 3 4 5 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2247, '0 18 22 3 11 6 6 0 0 -1 1 1 2 3 3 3 4 5 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2248, '0 18 22 3 11 6 6 18 -1 1 1 2 3 3 3 4 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2249, '0 18 22 3 11 6 6 18 0 -1 1 1 2 3 3 3 4 5 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2250, '0 18 22 3 11 6 6 18 18 -1 1 1 2 3 3 3 4 5 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2251, '0 25 6 0 -1 1 1 4 5 -1 1 17');
INSERT INTO pagc_rules (id, rule) VALUES (2252, '0 25 6 0 22 -1 1 1 4 5 7 -1 1 12');
INSERT INTO pagc_rules (id, rule) VALUES (2253, '0 25 6 21 -1 1 1 4 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2254, '0 25 6 21 22 -1 1 1 4 5 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2255, '0 25 6 21 0 -1 1 1 4 5 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2256, '0 25 6 21 0 22 -1 1 1 4 5 5 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2257, '0 25 6 23 -1 1 1 4 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2258, '0 25 6 23 22 -1 1 1 4 5 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2259, '0 25 6 0 18 -1 1 1 4 5 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2260, '0 25 6 0 18 22 -1 1 1 4 5 5 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2261, '0 25 6 0 0 -1 1 1 4 5 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2262, '0 25 6 0 0 22 -1 1 1 4 5 5 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2263, '0 25 6 18 -1 1 1 4 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2264, '0 25 6 18 22 -1 1 1 4 5 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2265, '0 25 6 18 0 -1 1 1 4 5 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2266, '0 25 6 18 0 22 -1 1 1 4 5 5 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2267, '0 25 6 18 18 -1 1 1 4 5 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2268, '0 25 6 18 18 22 -1 1 1 4 5 5 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2269, '0 25 6 6 0 -1 1 1 3 4 5 -1 1 17');
INSERT INTO pagc_rules (id, rule) VALUES (2270, '0 25 6 6 0 22 -1 1 1 3 4 5 7 -1 1 12');
INSERT INTO pagc_rules (id, rule) VALUES (2271, '0 25 6 6 21 -1 1 1 3 4 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2272, '0 25 6 6 21 22 -1 1 1 3 4 5 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2273, '0 25 6 6 21 0 -1 1 1 3 4 5 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2274, '0 25 6 6 21 0 22 -1 1 1 3 4 5 5 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2275, '0 25 6 6 23 -1 1 1 3 4 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2276, '0 25 6 6 23 22 -1 1 1 3 4 5 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2277, '0 25 6 6 0 18 -1 1 1 3 4 5 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2278, '0 25 6 6 0 18 22 -1 1 1 3 4 5 5 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2279, '0 25 6 6 0 0 -1 1 1 3 4 5 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2280, '0 25 6 6 0 0 22 -1 1 1 3 4 5 5 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2281, '0 25 6 6 18 -1 1 1 3 4 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2282, '0 25 6 6 18 22 -1 1 1 3 4 5 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2283, '0 25 6 6 18 0 -1 1 1 3 4 5 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2284, '0 25 6 6 18 0 22 -1 1 1 3 4 5 5 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2285, '0 25 6 6 18 18 -1 1 1 3 4 5 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2286, '0 25 6 6 18 18 22 -1 1 1 3 4 5 5 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2287, '0 25 3 6 0 -1 1 1 3 4 5 -1 1 17');
INSERT INTO pagc_rules (id, rule) VALUES (2288, '0 25 3 6 0 22 -1 1 1 3 4 5 7 -1 1 12');
INSERT INTO pagc_rules (id, rule) VALUES (2289, '0 25 3 6 21 -1 1 1 3 4 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2290, '0 25 3 6 21 22 -1 1 1 3 4 5 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2291, '0 25 3 6 21 0 -1 1 1 3 4 5 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2292, '0 25 3 6 21 0 22 -1 1 1 3 4 5 5 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2293, '0 25 3 6 23 -1 1 1 3 4 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2294, '0 25 3 6 23 22 -1 1 1 3 4 5 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2295, '0 25 3 6 0 18 -1 1 1 3 4 5 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2296, '0 25 3 6 0 18 22 -1 1 1 3 4 5 5 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2297, '0 25 3 6 0 0 -1 1 1 3 4 5 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2298, '0 25 3 6 0 0 22 -1 1 1 3 4 5 5 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2299, '0 25 3 6 18 -1 1 1 3 4 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2300, '0 25 3 6 18 22 -1 1 1 3 4 5 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2301, '0 25 3 6 18 0 -1 1 1 3 4 5 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2302, '0 25 3 6 18 0 22 -1 1 1 3 4 5 5 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2303, '0 25 3 6 18 18 -1 1 1 3 4 5 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2304, '0 25 3 6 18 18 22 -1 1 1 3 4 5 5 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2305, '0 25 3 6 6 0 -1 1 1 3 3 4 5 -1 1 17');
INSERT INTO pagc_rules (id, rule) VALUES (2306, '0 25 3 6 6 0 22 -1 1 1 3 3 4 5 7 -1 1 12');
INSERT INTO pagc_rules (id, rule) VALUES (2307, '0 25 3 6 6 21 -1 1 1 3 3 4 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2308, '0 25 3 6 6 21 22 -1 1 1 3 3 4 5 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2309, '0 25 3 6 6 21 0 -1 1 1 3 3 4 5 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2310, '0 25 3 6 6 21 0 22 -1 1 1 3 3 4 5 5 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2311, '0 25 3 6 6 23 -1 1 1 3 3 4 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2312, '0 25 3 6 6 23 22 -1 1 1 3 3 4 5 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2313, '0 25 3 6 6 0 18 -1 1 1 3 3 4 5 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2314, '0 25 3 6 6 0 18 22 -1 1 1 3 3 4 5 5 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2315, '0 25 3 6 6 0 0 -1 1 1 3 3 4 5 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2316, '0 25 3 6 6 0 0 22 -1 1 1 3 3 4 5 5 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2317, '0 25 3 6 6 18 -1 1 1 3 3 4 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2318, '0 25 3 6 6 18 22 -1 1 1 3 3 4 5 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2319, '0 25 3 6 6 18 0 -1 1 1 3 3 4 5 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2320, '0 25 3 6 6 18 0 22 -1 1 1 3 3 4 5 5 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2321, '0 25 3 6 6 18 18 -1 1 1 3 3 4 5 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2322, '0 25 3 6 6 18 18 22 -1 1 1 3 3 4 5 5 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2323, '0 25 11 6 0 -1 1 1 3 4 5 -1 1 17');
INSERT INTO pagc_rules (id, rule) VALUES (2324, '0 25 11 6 0 22 -1 1 1 3 4 5 7 -1 1 12');
INSERT INTO pagc_rules (id, rule) VALUES (2325, '0 25 11 6 21 -1 1 1 3 4 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2326, '0 25 11 6 21 22 -1 1 1 3 4 5 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2327, '0 25 11 6 21 0 -1 1 1 3 4 5 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2328, '0 25 11 6 21 0 22 -1 1 1 3 4 5 5 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2329, '0 25 11 6 23 -1 1 1 3 4 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2330, '0 25 11 6 23 22 -1 1 1 3 4 5 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2331, '0 25 11 6 0 18 -1 1 1 3 4 5 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2332, '0 25 11 6 0 18 22 -1 1 1 3 4 5 5 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2333, '0 25 11 6 0 0 -1 1 1 3 4 5 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2334, '0 25 11 6 0 0 22 -1 1 1 3 4 5 5 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2335, '0 25 11 6 18 -1 1 1 3 4 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2336, '0 25 11 6 18 22 -1 1 1 3 4 5 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2337, '0 25 11 6 18 0 -1 1 1 3 4 5 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2338, '0 25 11 6 18 0 22 -1 1 1 3 4 5 5 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2339, '0 25 11 6 18 18 -1 1 1 3 4 5 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2340, '0 25 11 6 18 18 22 -1 1 1 3 4 5 5 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2341, '0 25 11 6 6 0 -1 1 1 3 3 4 5 -1 1 17');
INSERT INTO pagc_rules (id, rule) VALUES (2342, '0 25 11 6 6 0 22 -1 1 1 3 3 4 5 7 -1 1 12');
INSERT INTO pagc_rules (id, rule) VALUES (2343, '0 25 11 6 6 21 -1 1 1 3 3 4 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2344, '0 25 11 6 6 21 22 -1 1 1 3 3 4 5 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2345, '0 25 11 6 6 21 0 -1 1 1 3 3 4 5 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2346, '0 25 11 6 6 21 0 22 -1 1 1 3 3 4 5 5 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2347, '0 25 11 6 6 23 -1 1 1 3 3 4 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2348, '0 25 11 6 6 23 22 -1 1 1 3 3 4 5 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2349, '0 25 11 6 6 0 18 -1 1 1 3 3 4 5 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2350, '0 25 11 6 6 0 18 22 -1 1 1 3 3 4 5 5 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2351, '0 25 11 6 6 0 0 -1 1 1 3 3 4 5 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2352, '0 25 11 6 6 0 0 22 -1 1 1 3 3 4 5 5 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2353, '0 25 11 6 6 18 -1 1 1 3 3 4 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2354, '0 25 11 6 6 18 22 -1 1 1 3 3 4 5 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2355, '0 25 11 6 6 18 0 -1 1 1 3 3 4 5 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2356, '0 25 11 6 6 18 0 22 -1 1 1 3 3 4 5 5 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2357, '0 25 11 6 6 18 18 -1 1 1 3 3 4 5 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2358, '0 25 11 6 6 18 18 22 -1 1 1 3 3 4 5 5 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2359, '0 25 3 11 6 0 -1 1 1 3 3 4 5 -1 1 17');
INSERT INTO pagc_rules (id, rule) VALUES (2360, '0 25 3 11 6 0 22 -1 1 1 3 3 4 5 7 -1 1 12');
INSERT INTO pagc_rules (id, rule) VALUES (2361, '0 25 3 11 6 21 -1 1 1 3 3 4 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2362, '0 25 3 11 6 21 22 -1 1 1 3 3 4 5 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2363, '0 25 3 11 6 21 0 -1 1 1 3 3 4 5 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2364, '0 25 3 11 6 21 0 22 -1 1 1 3 3 4 5 5 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2365, '0 25 3 11 6 23 -1 1 1 3 3 4 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2366, '0 25 3 11 6 23 22 -1 1 1 3 3 4 5 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2367, '0 25 3 11 6 0 18 -1 1 1 3 3 4 5 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2368, '0 25 3 11 6 0 18 22 -1 1 1 3 3 4 5 5 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2369, '0 25 3 11 6 0 0 -1 1 1 3 3 4 5 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2370, '0 25 3 11 6 0 0 22 -1 1 1 3 3 4 5 5 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2371, '0 25 3 11 6 18 -1 1 1 3 3 4 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2372, '0 25 3 11 6 18 22 -1 1 1 3 3 4 5 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2373, '0 25 3 11 6 18 0 -1 1 1 3 3 4 5 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2374, '0 25 3 11 6 18 0 22 -1 1 1 3 3 4 5 5 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2375, '0 25 3 11 6 18 18 -1 1 1 3 3 4 5 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2376, '0 25 3 11 6 18 18 22 -1 1 1 3 3 4 5 5 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2377, '0 25 3 11 6 6 0 -1 1 1 3 3 3 4 5 -1 1 17');
INSERT INTO pagc_rules (id, rule) VALUES (2378, '0 25 3 11 6 6 0 22 -1 1 1 3 3 3 4 5 7 -1 1 12');
INSERT INTO pagc_rules (id, rule) VALUES (2379, '0 25 3 11 6 6 21 -1 1 1 3 3 3 4 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2380, '0 25 3 11 6 6 21 22 -1 1 1 3 3 3 4 5 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2381, '0 25 3 11 6 6 21 0 -1 1 1 3 3 3 4 5 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2382, '0 25 3 11 6 6 21 0 22 -1 1 1 3 3 3 4 5 5 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2383, '0 25 3 11 6 6 23 -1 1 1 3 3 3 4 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2384, '0 25 3 11 6 6 23 22 -1 1 1 3 3 3 4 5 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2385, '0 25 3 11 6 6 0 18 -1 1 1 3 3 3 4 5 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2386, '0 25 3 11 6 6 0 18 22 -1 1 1 3 3 3 4 5 5 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2387, '0 25 3 11 6 6 0 0 -1 1 1 3 3 3 4 5 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2388, '0 25 3 11 6 6 0 0 22 -1 1 1 3 3 3 4 5 5 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2389, '0 25 3 11 6 6 18 -1 1 1 3 3 3 4 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2390, '0 25 3 11 6 6 18 22 -1 1 1 3 3 3 4 5 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2391, '0 25 3 11 6 6 18 0 -1 1 1 3 3 3 4 5 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2392, '0 25 3 11 6 6 18 0 22 -1 1 1 3 3 3 4 5 5 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2393, '0 25 3 11 6 6 18 18 -1 1 1 3 3 3 4 5 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2394, '0 25 3 11 6 6 18 18 22 -1 1 1 3 3 3 4 5 5 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2395, '0 25 22 6 0 -1 1 1 2 4 5 -1 1 17');
INSERT INTO pagc_rules (id, rule) VALUES (2396, '0 25 22 6 21 -1 1 1 2 4 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2397, '0 25 22 6 21 0 -1 1 1 2 4 5 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2398, '0 25 22 6 23 -1 1 1 2 4 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2399, '0 25 22 6 0 18 -1 1 1 2 4 5 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2400, '0 25 22 6 0 0 -1 1 1 2 4 5 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2401, '0 25 22 6 18 -1 1 1 2 4 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2402, '0 25 22 6 18 0 -1 1 1 2 4 5 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2403, '0 25 22 6 18 18 -1 1 1 2 4 5 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2404, '0 25 22 6 6 0 -1 1 1 2 3 4 5 -1 1 17');
INSERT INTO pagc_rules (id, rule) VALUES (2405, '0 25 22 6 6 21 -1 1 1 2 3 4 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2406, '0 25 22 6 6 21 0 -1 1 1 2 3 4 5 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2407, '0 25 22 6 6 23 -1 1 1 2 3 4 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2408, '0 25 22 6 6 0 18 -1 1 1 2 3 4 5 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2409, '0 25 22 6 6 0 0 -1 1 1 2 3 4 5 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2410, '0 25 22 6 6 18 -1 1 1 2 3 4 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2411, '0 25 22 6 6 18 0 -1 1 1 2 3 4 5 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2412, '0 25 22 6 6 18 18 -1 1 1 2 3 4 5 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2413, '0 25 22 3 6 0 -1 1 1 2 3 4 5 -1 1 17');
INSERT INTO pagc_rules (id, rule) VALUES (2414, '0 25 22 3 6 21 -1 1 1 2 3 4 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2415, '0 25 22 3 6 21 0 -1 1 1 2 3 4 5 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2416, '0 25 22 3 6 23 -1 1 1 2 3 4 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2417, '0 25 22 3 6 0 18 -1 1 1 2 3 4 5 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2418, '0 25 22 3 6 0 0 -1 1 1 2 3 4 5 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2419, '0 25 22 3 6 18 -1 1 1 2 3 4 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2420, '0 25 22 3 6 18 0 -1 1 1 2 3 4 5 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2421, '0 25 22 3 6 18 18 -1 1 1 2 3 4 5 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2422, '0 25 22 3 6 6 0 -1 1 1 2 3 3 4 5 -1 1 17');
INSERT INTO pagc_rules (id, rule) VALUES (2423, '0 25 22 3 6 6 21 -1 1 1 2 3 3 4 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2424, '0 25 22 3 6 6 21 0 -1 1 1 2 3 3 4 5 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2425, '0 25 22 3 6 6 23 -1 1 1 2 3 3 4 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2426, '0 25 22 3 6 6 0 18 -1 1 1 2 3 3 4 5 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2427, '0 25 22 3 6 6 0 0 -1 1 1 2 3 3 4 5 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2428, '0 25 22 3 6 6 18 -1 1 1 2 3 3 4 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2429, '0 25 22 3 6 6 18 0 -1 1 1 2 3 3 4 5 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2430, '0 25 22 3 6 6 18 18 -1 1 1 2 3 3 4 5 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2431, '0 25 22 11 6 0 -1 1 1 2 3 4 5 -1 1 17');
INSERT INTO pagc_rules (id, rule) VALUES (2432, '0 25 22 11 6 21 -1 1 1 2 3 4 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2433, '0 25 22 11 6 21 0 -1 1 1 2 3 4 5 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2434, '0 25 22 11 6 23 -1 1 1 2 3 4 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2435, '0 25 22 11 6 0 18 -1 1 1 2 3 4 5 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2436, '0 25 22 11 6 0 0 -1 1 1 2 3 4 5 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2437, '0 25 22 11 6 18 -1 1 1 2 3 4 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2438, '0 25 22 11 6 18 0 -1 1 1 2 3 4 5 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2439, '0 25 22 11 6 18 18 -1 1 1 2 3 4 5 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2440, '0 25 22 11 6 6 0 -1 1 1 2 3 3 4 5 -1 1 17');
INSERT INTO pagc_rules (id, rule) VALUES (2441, '0 25 22 11 6 6 21 -1 1 1 2 3 3 4 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2442, '0 25 22 11 6 6 21 0 -1 1 1 2 3 3 4 5 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2443, '0 25 22 11 6 6 23 -1 1 1 2 3 3 4 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2444, '0 25 22 11 6 6 0 18 -1 1 1 2 3 3 4 5 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2445, '0 25 22 11 6 6 0 0 -1 1 1 2 3 3 4 5 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2446, '0 25 22 11 6 6 18 -1 1 1 2 3 3 4 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2447, '0 25 22 11 6 6 18 0 -1 1 1 2 3 3 4 5 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2448, '0 25 22 11 6 6 18 18 -1 1 1 2 3 3 4 5 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2449, '0 25 22 3 11 6 0 -1 1 1 2 3 3 4 5 -1 1 17');
INSERT INTO pagc_rules (id, rule) VALUES (2450, '0 25 22 3 11 6 21 -1 1 1 2 3 3 4 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2451, '0 25 22 3 11 6 21 0 -1 1 1 2 3 3 4 5 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2452, '0 25 22 3 11 6 23 -1 1 1 2 3 3 4 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2453, '0 25 22 3 11 6 0 18 -1 1 1 2 3 3 4 5 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2454, '0 25 22 3 11 6 0 0 -1 1 1 2 3 3 4 5 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2455, '0 25 22 3 11 6 18 -1 1 1 2 3 3 4 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2456, '0 25 22 3 11 6 18 0 -1 1 1 2 3 3 4 5 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2457, '0 25 22 3 11 6 18 18 -1 1 1 2 3 3 4 5 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2458, '0 25 22 3 11 6 6 0 -1 1 1 2 3 3 3 4 5 -1 1 17');
INSERT INTO pagc_rules (id, rule) VALUES (2459, '0 25 22 3 11 6 6 21 -1 1 1 2 3 3 3 4 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2460, '0 25 22 3 11 6 6 21 0 -1 1 1 2 3 3 3 4 5 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2461, '0 25 22 3 11 6 6 23 -1 1 1 2 3 3 3 4 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2462, '0 25 22 3 11 6 6 0 18 -1 1 1 2 3 3 3 4 5 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2463, '0 25 22 3 11 6 6 0 0 -1 1 1 2 3 3 3 4 5 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2464, '0 25 22 3 11 6 6 18 -1 1 1 2 3 3 3 4 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2465, '0 25 22 3 11 6 6 18 0 -1 1 1 2 3 3 3 4 5 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2466, '0 25 22 3 11 6 6 18 18 -1 1 1 2 3 3 3 4 5 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2467, '25 6 0 -1 1 4 5 -1 1 17');
INSERT INTO pagc_rules (id, rule) VALUES (2468, '25 6 0 22 -1 1 4 5 7 -1 1 12');
INSERT INTO pagc_rules (id, rule) VALUES (2469, '25 6 21 -1 1 4 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2470, '25 6 21 22 -1 1 4 5 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2471, '25 6 21 0 -1 1 4 5 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2472, '25 6 21 0 22 -1 1 4 5 5 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2473, '25 6 23 -1 1 4 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2474, '25 6 23 22 -1 1 4 5 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2475, '25 6 0 18 -1 1 4 5 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2476, '25 6 0 18 22 -1 1 4 5 5 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2477, '25 6 0 0 -1 1 4 5 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2478, '25 6 0 0 22 -1 1 4 5 5 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2479, '25 6 18 -1 1 4 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2480, '25 6 18 22 -1 1 4 5 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2481, '25 6 18 0 -1 1 4 5 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2482, '25 6 18 0 22 -1 1 4 5 5 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2483, '25 6 18 18 -1 1 4 5 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2484, '25 6 18 18 22 -1 1 4 5 5 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2485, '25 6 6 0 -1 1 3 4 5 -1 1 17');
INSERT INTO pagc_rules (id, rule) VALUES (2486, '25 6 6 0 22 -1 1 3 4 5 7 -1 1 12');
INSERT INTO pagc_rules (id, rule) VALUES (2487, '25 6 6 21 -1 1 3 4 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2488, '25 6 6 21 22 -1 1 3 4 5 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2489, '25 6 6 21 0 -1 1 3 4 5 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2490, '25 6 6 21 0 22 -1 1 3 4 5 5 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2491, '25 6 6 23 -1 1 3 4 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2492, '25 6 6 23 22 -1 1 3 4 5 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2493, '25 6 6 0 18 -1 1 3 4 5 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2494, '25 6 6 0 18 22 -1 1 3 4 5 5 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2495, '25 6 6 0 0 -1 1 3 4 5 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2496, '25 6 6 0 0 22 -1 1 3 4 5 5 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2497, '25 6 6 18 -1 1 3 4 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2498, '25 6 6 18 22 -1 1 3 4 5 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2499, '25 6 6 18 0 -1 1 3 4 5 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2500, '25 6 6 18 0 22 -1 1 3 4 5 5 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2501, '25 6 6 18 18 -1 1 3 4 5 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2502, '25 6 6 18 18 22 -1 1 3 4 5 5 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2503, '25 3 6 0 -1 1 3 4 5 -1 1 17');
INSERT INTO pagc_rules (id, rule) VALUES (2504, '25 3 6 0 22 -1 1 3 4 5 7 -1 1 12');
INSERT INTO pagc_rules (id, rule) VALUES (2505, '25 3 6 21 -1 1 3 4 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2506, '25 3 6 21 22 -1 1 3 4 5 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2507, '25 3 6 21 0 -1 1 3 4 5 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2508, '25 3 6 21 0 22 -1 1 3 4 5 5 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2509, '25 3 6 23 -1 1 3 4 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2510, '25 3 6 23 22 -1 1 3 4 5 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2511, '25 3 6 0 18 -1 1 3 4 5 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2512, '25 3 6 0 18 22 -1 1 3 4 5 5 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2513, '25 3 6 0 0 -1 1 3 4 5 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2514, '25 3 6 0 0 22 -1 1 3 4 5 5 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2515, '25 3 6 18 -1 1 3 4 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2516, '25 3 6 18 22 -1 1 3 4 5 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2517, '25 3 6 18 0 -1 1 3 4 5 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2518, '25 3 6 18 0 22 -1 1 3 4 5 5 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2519, '25 3 6 18 18 -1 1 3 4 5 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2520, '25 3 6 18 18 22 -1 1 3 4 5 5 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2521, '25 3 6 6 0 -1 1 3 3 4 5 -1 1 17');
INSERT INTO pagc_rules (id, rule) VALUES (2522, '25 3 6 6 0 22 -1 1 3 3 4 5 7 -1 1 12');
INSERT INTO pagc_rules (id, rule) VALUES (2523, '25 3 6 6 21 -1 1 3 3 4 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2524, '25 3 6 6 21 22 -1 1 3 3 4 5 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2525, '25 3 6 6 21 0 -1 1 3 3 4 5 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2526, '25 3 6 6 21 0 22 -1 1 3 3 4 5 5 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2527, '25 3 6 6 23 -1 1 3 3 4 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2528, '25 3 6 6 23 22 -1 1 3 3 4 5 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2529, '25 3 6 6 0 18 -1 1 3 3 4 5 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2530, '25 3 6 6 0 18 22 -1 1 3 3 4 5 5 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2531, '25 3 6 6 0 0 -1 1 3 3 4 5 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2532, '25 3 6 6 0 0 22 -1 1 3 3 4 5 5 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2533, '25 3 6 6 18 -1 1 3 3 4 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2534, '25 3 6 6 18 22 -1 1 3 3 4 5 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2535, '25 3 6 6 18 0 -1 1 3 3 4 5 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2536, '25 3 6 6 18 0 22 -1 1 3 3 4 5 5 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2537, '25 3 6 6 18 18 -1 1 3 3 4 5 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2538, '25 3 6 6 18 18 22 -1 1 3 3 4 5 5 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2539, '25 11 6 0 -1 1 3 4 5 -1 1 17');
INSERT INTO pagc_rules (id, rule) VALUES (2540, '25 11 6 0 22 -1 1 3 4 5 7 -1 1 12');
INSERT INTO pagc_rules (id, rule) VALUES (2541, '25 11 6 21 -1 1 3 4 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2542, '25 11 6 21 22 -1 1 3 4 5 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2543, '25 11 6 21 0 -1 1 3 4 5 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2544, '25 11 6 21 0 22 -1 1 3 4 5 5 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2545, '25 11 6 23 -1 1 3 4 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2546, '25 11 6 23 22 -1 1 3 4 5 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2547, '25 11 6 0 18 -1 1 3 4 5 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2548, '25 11 6 0 18 22 -1 1 3 4 5 5 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2549, '25 11 6 0 0 -1 1 3 4 5 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2550, '25 11 6 0 0 22 -1 1 3 4 5 5 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2551, '25 11 6 18 -1 1 3 4 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2552, '25 11 6 18 22 -1 1 3 4 5 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2553, '25 11 6 18 0 -1 1 3 4 5 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2554, '25 11 6 18 0 22 -1 1 3 4 5 5 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2555, '25 11 6 18 18 -1 1 3 4 5 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2556, '25 11 6 18 18 22 -1 1 3 4 5 5 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2557, '25 11 6 6 0 -1 1 3 3 4 5 -1 1 17');
INSERT INTO pagc_rules (id, rule) VALUES (2558, '25 11 6 6 0 22 -1 1 3 3 4 5 7 -1 1 12');
INSERT INTO pagc_rules (id, rule) VALUES (2559, '25 11 6 6 21 -1 1 3 3 4 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2560, '25 11 6 6 21 22 -1 1 3 3 4 5 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2561, '25 11 6 6 21 0 -1 1 3 3 4 5 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2562, '25 11 6 6 21 0 22 -1 1 3 3 4 5 5 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2563, '25 11 6 6 23 -1 1 3 3 4 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2564, '25 11 6 6 23 22 -1 1 3 3 4 5 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2565, '25 11 6 6 0 18 -1 1 3 3 4 5 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2566, '25 11 6 6 0 18 22 -1 1 3 3 4 5 5 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2567, '25 11 6 6 0 0 -1 1 3 3 4 5 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2568, '25 11 6 6 0 0 22 -1 1 3 3 4 5 5 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2569, '25 11 6 6 18 -1 1 3 3 4 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2570, '25 11 6 6 18 22 -1 1 3 3 4 5 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2571, '25 11 6 6 18 0 -1 1 3 3 4 5 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2572, '25 11 6 6 18 0 22 -1 1 3 3 4 5 5 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2573, '25 11 6 6 18 18 -1 1 3 3 4 5 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2574, '25 11 6 6 18 18 22 -1 1 3 3 4 5 5 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2575, '25 3 11 6 0 -1 1 3 3 4 5 -1 1 17');
INSERT INTO pagc_rules (id, rule) VALUES (2576, '25 3 11 6 0 22 -1 1 3 3 4 5 7 -1 1 12');
INSERT INTO pagc_rules (id, rule) VALUES (2577, '25 3 11 6 21 -1 1 3 3 4 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2578, '25 3 11 6 21 22 -1 1 3 3 4 5 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2579, '25 3 11 6 21 0 -1 1 3 3 4 5 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2580, '25 3 11 6 21 0 22 -1 1 3 3 4 5 5 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2581, '25 3 11 6 23 -1 1 3 3 4 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2582, '25 3 11 6 23 22 -1 1 3 3 4 5 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2583, '25 3 11 6 0 18 -1 1 3 3 4 5 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2584, '25 3 11 6 0 18 22 -1 1 3 3 4 5 5 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2585, '25 3 11 6 0 0 -1 1 3 3 4 5 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2586, '25 3 11 6 0 0 22 -1 1 3 3 4 5 5 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2587, '25 3 11 6 18 -1 1 3 3 4 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2588, '25 3 11 6 18 22 -1 1 3 3 4 5 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2589, '25 3 11 6 18 0 -1 1 3 3 4 5 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2590, '25 3 11 6 18 0 22 -1 1 3 3 4 5 5 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2591, '25 3 11 6 18 18 -1 1 3 3 4 5 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2592, '25 3 11 6 18 18 22 -1 1 3 3 4 5 5 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2593, '25 3 11 6 6 0 -1 1 3 3 3 4 5 -1 1 17');
INSERT INTO pagc_rules (id, rule) VALUES (2594, '25 3 11 6 6 0 22 -1 1 3 3 3 4 5 7 -1 1 12');
INSERT INTO pagc_rules (id, rule) VALUES (2595, '25 3 11 6 6 21 -1 1 3 3 3 4 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2596, '25 3 11 6 6 21 22 -1 1 3 3 3 4 5 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2597, '25 3 11 6 6 21 0 -1 1 3 3 3 4 5 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2598, '25 3 11 6 6 21 0 22 -1 1 3 3 3 4 5 5 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2599, '25 3 11 6 6 23 -1 1 3 3 3 4 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2600, '25 3 11 6 6 23 22 -1 1 3 3 3 4 5 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2601, '25 3 11 6 6 0 18 -1 1 3 3 3 4 5 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2602, '25 3 11 6 6 0 18 22 -1 1 3 3 3 4 5 5 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2603, '25 3 11 6 6 0 0 -1 1 3 3 3 4 5 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2604, '25 3 11 6 6 0 0 22 -1 1 3 3 3 4 5 5 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2605, '25 3 11 6 6 18 -1 1 3 3 3 4 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2606, '25 3 11 6 6 18 22 -1 1 3 3 3 4 5 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2607, '25 3 11 6 6 18 0 -1 1 3 3 3 4 5 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2608, '25 3 11 6 6 18 0 22 -1 1 3 3 3 4 5 5 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2609, '25 3 11 6 6 18 18 -1 1 3 3 3 4 5 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2610, '25 3 11 6 6 18 18 22 -1 1 3 3 3 4 5 5 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2611, '25 22 6 0 -1 1 2 4 5 -1 1 17');
INSERT INTO pagc_rules (id, rule) VALUES (2612, '25 22 6 21 -1 1 2 4 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2613, '25 22 6 21 0 -1 1 2 4 5 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2614, '25 22 6 23 -1 1 2 4 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2615, '25 22 6 0 18 -1 1 2 4 5 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2616, '25 22 6 0 0 -1 1 2 4 5 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2617, '25 22 6 18 -1 1 2 4 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2618, '25 22 6 18 0 -1 1 2 4 5 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2619, '25 22 6 18 18 -1 1 2 4 5 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2620, '25 22 6 6 0 -1 1 2 3 4 5 -1 1 17');
INSERT INTO pagc_rules (id, rule) VALUES (2621, '25 22 6 6 21 -1 1 2 3 4 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2622, '25 22 6 6 21 0 -1 1 2 3 4 5 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2623, '25 22 6 6 23 -1 1 2 3 4 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2624, '25 22 6 6 0 18 -1 1 2 3 4 5 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2625, '25 22 6 6 0 0 -1 1 2 3 4 5 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2626, '25 22 6 6 18 -1 1 2 3 4 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2627, '25 22 6 6 18 0 -1 1 2 3 4 5 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2628, '25 22 6 6 18 18 -1 1 2 3 4 5 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2629, '25 22 3 6 0 -1 1 2 3 4 5 -1 1 17');
INSERT INTO pagc_rules (id, rule) VALUES (2630, '25 22 3 6 21 -1 1 2 3 4 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2631, '25 22 3 6 21 0 -1 1 2 3 4 5 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2632, '25 22 3 6 23 -1 1 2 3 4 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2633, '25 22 3 6 0 18 -1 1 2 3 4 5 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2634, '25 22 3 6 0 0 -1 1 2 3 4 5 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2635, '25 22 3 6 18 -1 1 2 3 4 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2636, '25 22 3 6 18 0 -1 1 2 3 4 5 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2637, '25 22 3 6 18 18 -1 1 2 3 4 5 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2638, '25 22 3 6 6 0 -1 1 2 3 3 4 5 -1 1 17');
INSERT INTO pagc_rules (id, rule) VALUES (2639, '25 22 3 6 6 21 -1 1 2 3 3 4 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2640, '25 22 3 6 6 21 0 -1 1 2 3 3 4 5 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2641, '25 22 3 6 6 23 -1 1 2 3 3 4 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2642, '25 22 3 6 6 0 18 -1 1 2 3 3 4 5 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2643, '25 22 3 6 6 0 0 -1 1 2 3 3 4 5 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2644, '25 22 3 6 6 18 -1 1 2 3 3 4 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2645, '25 22 3 6 6 18 0 -1 1 2 3 3 4 5 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2646, '25 22 3 6 6 18 18 -1 1 2 3 3 4 5 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2647, '25 22 11 6 0 -1 1 2 3 4 5 -1 1 17');
INSERT INTO pagc_rules (id, rule) VALUES (2648, '25 22 11 6 21 -1 1 2 3 4 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2649, '25 22 11 6 21 0 -1 1 2 3 4 5 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2650, '25 22 11 6 23 -1 1 2 3 4 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2651, '25 22 11 6 0 18 -1 1 2 3 4 5 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2652, '25 22 11 6 0 0 -1 1 2 3 4 5 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2653, '25 22 11 6 18 -1 1 2 3 4 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2654, '25 22 11 6 18 0 -1 1 2 3 4 5 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2655, '25 22 11 6 18 18 -1 1 2 3 4 5 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2656, '25 22 11 6 6 0 -1 1 2 3 3 4 5 -1 1 17');
INSERT INTO pagc_rules (id, rule) VALUES (2657, '25 22 11 6 6 21 -1 1 2 3 3 4 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2658, '25 22 11 6 6 21 0 -1 1 2 3 3 4 5 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2659, '25 22 11 6 6 23 -1 1 2 3 3 4 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2660, '25 22 11 6 6 0 18 -1 1 2 3 3 4 5 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2661, '25 22 11 6 6 0 0 -1 1 2 3 3 4 5 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2662, '25 22 11 6 6 18 -1 1 2 3 3 4 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2663, '25 22 11 6 6 18 0 -1 1 2 3 3 4 5 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2664, '25 22 11 6 6 18 18 -1 1 2 3 3 4 5 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2665, '25 22 3 11 6 0 -1 1 2 3 3 4 5 -1 1 17');
INSERT INTO pagc_rules (id, rule) VALUES (2666, '25 22 3 11 6 21 -1 1 2 3 3 4 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2667, '25 22 3 11 6 21 0 -1 1 2 3 3 4 5 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2668, '25 22 3 11 6 23 -1 1 2 3 3 4 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2669, '25 22 3 11 6 0 18 -1 1 2 3 3 4 5 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2670, '25 22 3 11 6 0 0 -1 1 2 3 3 4 5 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2671, '25 22 3 11 6 18 -1 1 2 3 3 4 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2672, '25 22 3 11 6 18 0 -1 1 2 3 3 4 5 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2673, '25 22 3 11 6 18 18 -1 1 2 3 3 4 5 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2674, '25 22 3 11 6 6 0 -1 1 2 3 3 3 4 5 -1 1 17');
INSERT INTO pagc_rules (id, rule) VALUES (2675, '25 22 3 11 6 6 21 -1 1 2 3 3 3 4 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2676, '25 22 3 11 6 6 21 0 -1 1 2 3 3 3 4 5 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2677, '25 22 3 11 6 6 23 -1 1 2 3 3 3 4 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2678, '25 22 3 11 6 6 0 18 -1 1 2 3 3 3 4 5 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2679, '25 22 3 11 6 6 0 0 -1 1 2 3 3 3 4 5 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2680, '25 22 3 11 6 6 18 -1 1 2 3 3 3 4 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2681, '25 22 3 11 6 6 18 0 -1 1 2 3 3 3 4 5 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2682, '25 22 3 11 6 6 18 18 -1 1 2 3 3 3 4 5 5 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2683, '0 22 -1 1 5 -1 1 5');
INSERT INTO pagc_rules (id, rule) VALUES (2684, '0 22 22 -1 1 5 7 -1 1 5');
INSERT INTO pagc_rules (id, rule) VALUES (2685, '0 22 1 -1 1 5 5 -1 1 5');
INSERT INTO pagc_rules (id, rule) VALUES (2686, '0 22 1 22 -1 1 5 5 7 -1 1 5');
INSERT INTO pagc_rules (id, rule) VALUES (2687, '0 15 -1 1 5 -1 1 5');
INSERT INTO pagc_rules (id, rule) VALUES (2688, '0 15 22 -1 1 5 7 -1 1 5');
INSERT INTO pagc_rules (id, rule) VALUES (2689, '0 18 18 1 -1 1 5 5 5 -1 1 5');
INSERT INTO pagc_rules (id, rule) VALUES (2690, '0 18 18 1 22 -1 1 5 5 5 7 -1 1 5');
INSERT INTO pagc_rules (id, rule) VALUES (2691, '0 18 1 -1 1 5 5 -1 1 5');
INSERT INTO pagc_rules (id, rule) VALUES (2692, '0 18 1 22 -1 1 5 5 7 -1 1 5');
INSERT INTO pagc_rules (id, rule) VALUES (2693, '0 2 -1 1 5 -1 1 5');
INSERT INTO pagc_rules (id, rule) VALUES (2694, '0 2 22 -1 1 5 7 -1 1 5');
INSERT INTO pagc_rules (id, rule) VALUES (2695, '0 1 13 1 -1 1 5 5 5 -1 1 5');
INSERT INTO pagc_rules (id, rule) VALUES (2696, '0 1 13 1 22 -1 1 5 5 5 7 -1 1 5');
INSERT INTO pagc_rules (id, rule) VALUES (2697, '0 1 18 -1 1 5 5 -1 1 5');
INSERT INTO pagc_rules (id, rule) VALUES (2698, '0 1 18 22 -1 1 5 5 7 -1 1 5');
INSERT INTO pagc_rules (id, rule) VALUES (2699, '0 1 18 1 -1 1 5 5 5 -1 1 5');
INSERT INTO pagc_rules (id, rule) VALUES (2700, '0 1 18 1 22 -1 1 5 5 5 7 -1 1 5');
INSERT INTO pagc_rules (id, rule) VALUES (2701, '0 22 22 -1 1 2 5 -1 1 5');
INSERT INTO pagc_rules (id, rule) VALUES (2702, '0 22 22 22 -1 1 2 5 7 -1 1 5');
INSERT INTO pagc_rules (id, rule) VALUES (2703, '0 22 22 1 -1 1 2 5 5 -1 1 5');
INSERT INTO pagc_rules (id, rule) VALUES (2704, '0 22 22 1 22 -1 1 2 5 5 7 -1 1 5');
INSERT INTO pagc_rules (id, rule) VALUES (2705, '0 22 15 -1 1 2 5 -1 1 5');
INSERT INTO pagc_rules (id, rule) VALUES (2706, '0 22 15 22 -1 1 2 5 7 -1 1 5');
INSERT INTO pagc_rules (id, rule) VALUES (2707, '0 22 18 18 1 -1 1 2 5 5 5 -1 1 5');
INSERT INTO pagc_rules (id, rule) VALUES (2708, '0 22 18 18 1 22 -1 1 2 5 5 5 7 -1 1 5');
INSERT INTO pagc_rules (id, rule) VALUES (2709, '0 22 18 1 -1 1 2 5 5 -1 1 5');
INSERT INTO pagc_rules (id, rule) VALUES (2710, '0 22 18 1 22 -1 1 2 5 5 7 -1 1 5');
INSERT INTO pagc_rules (id, rule) VALUES (2711, '0 22 2 -1 1 2 5 -1 1 5');
INSERT INTO pagc_rules (id, rule) VALUES (2712, '0 22 2 22 -1 1 2 5 7 -1 1 5');
INSERT INTO pagc_rules (id, rule) VALUES (2713, '0 22 1 13 1 -1 1 2 5 5 5 -1 1 5');
INSERT INTO pagc_rules (id, rule) VALUES (2714, '0 22 1 13 1 22 -1 1 2 5 5 5 7 -1 1 5');
INSERT INTO pagc_rules (id, rule) VALUES (2715, '0 22 1 18 -1 1 2 5 5 -1 1 5');
INSERT INTO pagc_rules (id, rule) VALUES (2716, '0 22 1 18 22 -1 1 2 5 5 7 -1 1 5');
INSERT INTO pagc_rules (id, rule) VALUES (2717, '0 22 1 18 1 -1 1 2 5 5 5 -1 1 5');
INSERT INTO pagc_rules (id, rule) VALUES (2718, '0 22 1 18 1 22 -1 1 2 5 5 5 7 -1 1 5');
INSERT INTO pagc_rules (id, rule) VALUES (2719, '0 18 22 -1 1 1 5 -1 1 5');
INSERT INTO pagc_rules (id, rule) VALUES (2720, '0 18 22 22 -1 1 1 5 7 -1 1 5');
INSERT INTO pagc_rules (id, rule) VALUES (2721, '0 18 22 1 -1 1 1 5 5 -1 1 5');
INSERT INTO pagc_rules (id, rule) VALUES (2722, '0 18 22 1 22 -1 1 1 5 5 7 -1 1 5');
INSERT INTO pagc_rules (id, rule) VALUES (2723, '0 18 15 -1 1 1 5 -1 1 5');
INSERT INTO pagc_rules (id, rule) VALUES (2724, '0 18 15 22 -1 1 1 5 7 -1 1 5');
INSERT INTO pagc_rules (id, rule) VALUES (2725, '0 18 18 18 1 -1 1 1 5 5 5 -1 1 5');
INSERT INTO pagc_rules (id, rule) VALUES (2726, '0 18 18 18 1 22 -1 1 1 5 5 5 7 -1 1 5');
INSERT INTO pagc_rules (id, rule) VALUES (2727, '0 18 18 1 -1 1 1 5 5 -1 1 5');
INSERT INTO pagc_rules (id, rule) VALUES (2728, '0 18 18 1 22 -1 1 1 5 5 7 -1 1 5');
INSERT INTO pagc_rules (id, rule) VALUES (2729, '0 18 2 -1 1 1 5 -1 1 5');
INSERT INTO pagc_rules (id, rule) VALUES (2730, '0 18 2 22 -1 1 1 5 7 -1 1 5');
INSERT INTO pagc_rules (id, rule) VALUES (2731, '0 18 1 13 1 -1 1 1 5 5 5 -1 1 5');
INSERT INTO pagc_rules (id, rule) VALUES (2732, '0 18 1 13 1 22 -1 1 1 5 5 5 7 -1 1 5');
INSERT INTO pagc_rules (id, rule) VALUES (2733, '0 18 1 18 -1 1 1 5 5 -1 1 5');
INSERT INTO pagc_rules (id, rule) VALUES (2734, '0 18 1 18 22 -1 1 1 5 5 7 -1 1 5');
INSERT INTO pagc_rules (id, rule) VALUES (2735, '0 18 1 18 1 -1 1 1 5 5 5 -1 1 5');
INSERT INTO pagc_rules (id, rule) VALUES (2736, '0 18 1 18 1 22 -1 1 1 5 5 5 7 -1 1 5');
INSERT INTO pagc_rules (id, rule) VALUES (2737, '0 18 22 22 -1 1 1 2 5 -1 1 5');
INSERT INTO pagc_rules (id, rule) VALUES (2738, '0 18 22 22 22 -1 1 1 2 5 7 -1 1 5');
INSERT INTO pagc_rules (id, rule) VALUES (2739, '0 18 22 22 1 -1 1 1 2 5 5 -1 1 5');
INSERT INTO pagc_rules (id, rule) VALUES (2740, '0 18 22 22 1 22 -1 1 1 2 5 5 7 -1 1 5');
INSERT INTO pagc_rules (id, rule) VALUES (2741, '0 18 22 15 -1 1 1 2 5 -1 1 5');
INSERT INTO pagc_rules (id, rule) VALUES (2742, '0 18 22 15 22 -1 1 1 2 5 7 -1 1 5');
INSERT INTO pagc_rules (id, rule) VALUES (2743, '0 18 22 18 18 1 -1 1 1 2 5 5 5 -1 1 5');
INSERT INTO pagc_rules (id, rule) VALUES (2744, '0 18 22 18 18 1 22 -1 1 1 2 5 5 5 7 -1 1 5');
INSERT INTO pagc_rules (id, rule) VALUES (2745, '0 18 22 18 1 -1 1 1 2 5 5 -1 1 5');
INSERT INTO pagc_rules (id, rule) VALUES (2746, '0 18 22 18 1 22 -1 1 1 2 5 5 7 -1 1 5');
INSERT INTO pagc_rules (id, rule) VALUES (2747, '0 18 22 2 -1 1 1 2 5 -1 1 5');
INSERT INTO pagc_rules (id, rule) VALUES (2748, '0 18 22 2 22 -1 1 1 2 5 7 -1 1 5');
INSERT INTO pagc_rules (id, rule) VALUES (2749, '0 18 22 1 13 1 -1 1 1 2 5 5 5 -1 1 5');
INSERT INTO pagc_rules (id, rule) VALUES (2750, '0 18 22 1 13 1 22 -1 1 1 2 5 5 5 7 -1 1 5');
INSERT INTO pagc_rules (id, rule) VALUES (2751, '0 18 22 1 18 -1 1 1 2 5 5 -1 1 5');
INSERT INTO pagc_rules (id, rule) VALUES (2752, '0 18 22 1 18 22 -1 1 1 2 5 5 7 -1 1 5');
INSERT INTO pagc_rules (id, rule) VALUES (2753, '0 18 22 1 18 1 -1 1 1 2 5 5 5 -1 1 5');
INSERT INTO pagc_rules (id, rule) VALUES (2754, '0 18 22 1 18 1 22 -1 1 1 2 5 5 5 7 -1 1 5');
INSERT INTO pagc_rules (id, rule) VALUES (2755, '0 25 22 -1 1 1 5 -1 1 5');
INSERT INTO pagc_rules (id, rule) VALUES (2756, '0 25 22 22 -1 1 1 5 7 -1 1 5');
INSERT INTO pagc_rules (id, rule) VALUES (2757, '0 25 22 1 -1 1 1 5 5 -1 1 5');
INSERT INTO pagc_rules (id, rule) VALUES (2758, '0 25 22 1 22 -1 1 1 5 5 7 -1 1 5');
INSERT INTO pagc_rules (id, rule) VALUES (2759, '0 25 15 -1 1 1 5 -1 1 5');
INSERT INTO pagc_rules (id, rule) VALUES (2760, '0 25 15 22 -1 1 1 5 7 -1 1 5');
INSERT INTO pagc_rules (id, rule) VALUES (2761, '0 25 18 18 1 -1 1 1 5 5 5 -1 1 5');
INSERT INTO pagc_rules (id, rule) VALUES (2762, '0 25 18 18 1 22 -1 1 1 5 5 5 7 -1 1 5');
INSERT INTO pagc_rules (id, rule) VALUES (2763, '0 25 18 1 -1 1 1 5 5 -1 1 5');
INSERT INTO pagc_rules (id, rule) VALUES (2764, '0 25 18 1 22 -1 1 1 5 5 7 -1 1 5');
INSERT INTO pagc_rules (id, rule) VALUES (2765, '0 25 2 -1 1 1 5 -1 1 5');
INSERT INTO pagc_rules (id, rule) VALUES (2766, '0 25 2 22 -1 1 1 5 7 -1 1 5');
INSERT INTO pagc_rules (id, rule) VALUES (2767, '0 25 1 13 1 -1 1 1 5 5 5 -1 1 5');
INSERT INTO pagc_rules (id, rule) VALUES (2768, '0 25 1 13 1 22 -1 1 1 5 5 5 7 -1 1 5');
INSERT INTO pagc_rules (id, rule) VALUES (2769, '0 25 1 18 -1 1 1 5 5 -1 1 5');
INSERT INTO pagc_rules (id, rule) VALUES (2770, '0 25 1 18 22 -1 1 1 5 5 7 -1 1 5');
INSERT INTO pagc_rules (id, rule) VALUES (2771, '0 25 1 18 1 -1 1 1 5 5 5 -1 1 5');
INSERT INTO pagc_rules (id, rule) VALUES (2772, '0 25 1 18 1 22 -1 1 1 5 5 5 7 -1 1 5');
INSERT INTO pagc_rules (id, rule) VALUES (2773, '0 25 22 22 -1 1 1 2 5 -1 1 5');
INSERT INTO pagc_rules (id, rule) VALUES (2774, '0 25 22 22 22 -1 1 1 2 5 7 -1 1 5');
INSERT INTO pagc_rules (id, rule) VALUES (2775, '0 25 22 22 1 -1 1 1 2 5 5 -1 1 5');
INSERT INTO pagc_rules (id, rule) VALUES (2776, '0 25 22 22 1 22 -1 1 1 2 5 5 7 -1 1 5');
INSERT INTO pagc_rules (id, rule) VALUES (2777, '0 25 22 15 -1 1 1 2 5 -1 1 5');
INSERT INTO pagc_rules (id, rule) VALUES (2778, '0 25 22 15 22 -1 1 1 2 5 7 -1 1 5');
INSERT INTO pagc_rules (id, rule) VALUES (2779, '0 25 22 18 18 1 -1 1 1 2 5 5 5 -1 1 5');
INSERT INTO pagc_rules (id, rule) VALUES (2780, '0 25 22 18 18 1 22 -1 1 1 2 5 5 5 7 -1 1 5');
INSERT INTO pagc_rules (id, rule) VALUES (2781, '0 25 22 18 1 -1 1 1 2 5 5 -1 1 5');
INSERT INTO pagc_rules (id, rule) VALUES (2782, '0 25 22 18 1 22 -1 1 1 2 5 5 7 -1 1 5');
INSERT INTO pagc_rules (id, rule) VALUES (2783, '0 25 22 2 -1 1 1 2 5 -1 1 5');
INSERT INTO pagc_rules (id, rule) VALUES (2784, '0 25 22 2 22 -1 1 1 2 5 7 -1 1 5');
INSERT INTO pagc_rules (id, rule) VALUES (2785, '0 25 22 1 13 1 -1 1 1 2 5 5 5 -1 1 5');
INSERT INTO pagc_rules (id, rule) VALUES (2786, '0 25 22 1 13 1 22 -1 1 1 2 5 5 5 7 -1 1 5');
INSERT INTO pagc_rules (id, rule) VALUES (2787, '0 25 22 1 18 -1 1 1 2 5 5 -1 1 5');
INSERT INTO pagc_rules (id, rule) VALUES (2788, '0 25 22 1 18 22 -1 1 1 2 5 5 7 -1 1 5');
INSERT INTO pagc_rules (id, rule) VALUES (2789, '0 25 22 1 18 1 -1 1 1 2 5 5 5 -1 1 5');
INSERT INTO pagc_rules (id, rule) VALUES (2790, '0 25 22 1 18 1 22 -1 1 1 2 5 5 5 7 -1 1 5');
INSERT INTO pagc_rules (id, rule) VALUES (2791, '25 22 -1 1 5 -1 1 5');
INSERT INTO pagc_rules (id, rule) VALUES (2792, '25 22 22 -1 1 5 7 -1 1 5');
INSERT INTO pagc_rules (id, rule) VALUES (2793, '25 22 1 -1 1 5 5 -1 1 5');
INSERT INTO pagc_rules (id, rule) VALUES (2794, '25 22 1 22 -1 1 5 5 7 -1 1 5');
INSERT INTO pagc_rules (id, rule) VALUES (2795, '25 15 -1 1 5 -1 1 5');
INSERT INTO pagc_rules (id, rule) VALUES (2796, '25 15 22 -1 1 5 7 -1 1 5');
INSERT INTO pagc_rules (id, rule) VALUES (2797, '25 18 18 1 -1 1 5 5 5 -1 1 5');
INSERT INTO pagc_rules (id, rule) VALUES (2798, '25 18 18 1 22 -1 1 5 5 5 7 -1 1 5');
INSERT INTO pagc_rules (id, rule) VALUES (2799, '25 18 1 -1 1 5 5 -1 1 5');
INSERT INTO pagc_rules (id, rule) VALUES (2800, '25 18 1 22 -1 1 5 5 7 -1 1 5');
INSERT INTO pagc_rules (id, rule) VALUES (2801, '25 2 -1 1 5 -1 1 5');
INSERT INTO pagc_rules (id, rule) VALUES (2802, '25 2 22 -1 1 5 7 -1 1 5');
INSERT INTO pagc_rules (id, rule) VALUES (2803, '25 1 13 1 -1 1 5 5 5 -1 1 5');
INSERT INTO pagc_rules (id, rule) VALUES (2804, '25 1 13 1 22 -1 1 5 5 5 7 -1 1 5');
INSERT INTO pagc_rules (id, rule) VALUES (2805, '25 1 18 -1 1 5 5 -1 1 5');
INSERT INTO pagc_rules (id, rule) VALUES (2806, '25 1 18 22 -1 1 5 5 7 -1 1 5');
INSERT INTO pagc_rules (id, rule) VALUES (2807, '25 1 18 1 -1 1 5 5 5 -1 1 5');
INSERT INTO pagc_rules (id, rule) VALUES (2808, '25 1 18 1 22 -1 1 5 5 5 7 -1 1 5');
INSERT INTO pagc_rules (id, rule) VALUES (2809, '25 22 22 -1 1 2 5 -1 1 5');
INSERT INTO pagc_rules (id, rule) VALUES (2810, '25 22 22 22 -1 1 2 5 7 -1 1 5');
INSERT INTO pagc_rules (id, rule) VALUES (2811, '25 22 22 1 -1 1 2 5 5 -1 1 5');
INSERT INTO pagc_rules (id, rule) VALUES (2812, '25 22 22 1 22 -1 1 2 5 5 7 -1 1 5');
INSERT INTO pagc_rules (id, rule) VALUES (2813, '25 22 15 -1 1 2 5 -1 1 5');
INSERT INTO pagc_rules (id, rule) VALUES (2814, '25 22 15 22 -1 1 2 5 7 -1 1 5');
INSERT INTO pagc_rules (id, rule) VALUES (2815, '25 22 18 18 1 -1 1 2 5 5 5 -1 1 5');
INSERT INTO pagc_rules (id, rule) VALUES (2816, '25 22 18 18 1 22 -1 1 2 5 5 5 7 -1 1 5');
INSERT INTO pagc_rules (id, rule) VALUES (2817, '25 22 18 1 -1 1 2 5 5 -1 1 5');
INSERT INTO pagc_rules (id, rule) VALUES (2818, '25 22 18 1 22 -1 1 2 5 5 7 -1 1 5');
INSERT INTO pagc_rules (id, rule) VALUES (2819, '25 22 2 -1 1 2 5 -1 1 5');
INSERT INTO pagc_rules (id, rule) VALUES (2820, '25 22 2 22 -1 1 2 5 7 -1 1 5');
INSERT INTO pagc_rules (id, rule) VALUES (2821, '25 22 1 13 1 -1 1 2 5 5 5 -1 1 5');
INSERT INTO pagc_rules (id, rule) VALUES (2822, '25 22 1 13 1 22 -1 1 2 5 5 5 7 -1 1 5');
INSERT INTO pagc_rules (id, rule) VALUES (2823, '25 22 1 18 -1 1 2 5 5 -1 1 5');
INSERT INTO pagc_rules (id, rule) VALUES (2824, '25 22 1 18 22 -1 1 2 5 5 7 -1 1 5');
INSERT INTO pagc_rules (id, rule) VALUES (2825, '25 22 1 18 1 -1 1 2 5 5 5 -1 1 5');
INSERT INTO pagc_rules (id, rule) VALUES (2826, '25 22 1 18 1 22 -1 1 2 5 5 5 7 -1 1 5');
INSERT INTO pagc_rules (id, rule) VALUES (2827, '0 2 1 18 -1 1 4 5 5 -1 1 11');
INSERT INTO pagc_rules (id, rule) VALUES (2828, '0 2 1 18 22 -1 1 4 5 5 7 -1 1 11');
INSERT INTO pagc_rules (id, rule) VALUES (2829, '0 2 1 18 1 -1 1 4 5 5 5 -1 1 11');
INSERT INTO pagc_rules (id, rule) VALUES (2830, '0 2 1 18 1 22 -1 1 4 5 5 5 7 -1 1 11');
INSERT INTO pagc_rules (id, rule) VALUES (2831, '0 2 0 18 -1 1 4 5 5 -1 1 8');
INSERT INTO pagc_rules (id, rule) VALUES (2832, '0 2 0 18 22 -1 1 4 5 5 7 -1 1 8');
INSERT INTO pagc_rules (id, rule) VALUES (2833, '0 2 0 1 -1 1 4 5 5 -1 1 8');
INSERT INTO pagc_rules (id, rule) VALUES (2834, '0 2 0 1 22 -1 1 4 5 5 7 -1 1 8');
INSERT INTO pagc_rules (id, rule) VALUES (2835, '0 2 18 1 -1 1 4 5 5 -1 1 8');
INSERT INTO pagc_rules (id, rule) VALUES (2836, '0 2 18 1 22 -1 1 4 5 5 7 -1 1 8');
INSERT INTO pagc_rules (id, rule) VALUES (2837, '0 2 18 18 1 -1 1 4 5 5 5 -1 1 8');
INSERT INTO pagc_rules (id, rule) VALUES (2838, '0 2 18 18 1 22 -1 1 4 5 5 5 7 -1 1 8');
INSERT INTO pagc_rules (id, rule) VALUES (2839, '0 18 2 1 18 -1 1 1 4 5 5 -1 1 11');
INSERT INTO pagc_rules (id, rule) VALUES (2840, '0 18 2 1 18 22 -1 1 1 4 5 5 7 -1 1 11');
INSERT INTO pagc_rules (id, rule) VALUES (2841, '0 18 2 1 18 1 -1 1 1 4 5 5 5 -1 1 11');
INSERT INTO pagc_rules (id, rule) VALUES (2842, '0 18 2 1 18 1 22 -1 1 1 4 5 5 5 7 -1 1 11');
INSERT INTO pagc_rules (id, rule) VALUES (2843, '0 18 2 0 18 -1 1 1 4 5 5 -1 1 11');
INSERT INTO pagc_rules (id, rule) VALUES (2844, '0 18 2 0 18 22 -1 1 1 4 5 5 7 -1 1 11');
INSERT INTO pagc_rules (id, rule) VALUES (2845, '0 18 2 0 1 -1 1 1 4 5 5 -1 1 8');
INSERT INTO pagc_rules (id, rule) VALUES (2846, '0 18 2 0 1 22 -1 1 1 4 5 5 7 -1 1 8');
INSERT INTO pagc_rules (id, rule) VALUES (2847, '0 18 2 18 1 -1 1 1 4 5 5 -1 1 8');
INSERT INTO pagc_rules (id, rule) VALUES (2848, '0 18 2 18 1 22 -1 1 1 4 5 5 7 -1 1 8');
INSERT INTO pagc_rules (id, rule) VALUES (2849, '0 18 2 18 18 1 -1 1 1 4 5 5 5 -1 1 8');
INSERT INTO pagc_rules (id, rule) VALUES (2850, '0 18 2 18 18 1 22 -1 1 1 4 5 5 5 7 -1 1 8');
INSERT INTO pagc_rules (id, rule) VALUES (2851, '0 25 2 1 18 -1 1 1 4 5 5 -1 1 11');
INSERT INTO pagc_rules (id, rule) VALUES (2852, '0 25 2 1 18 22 -1 1 1 4 5 5 7 -1 1 11');
INSERT INTO pagc_rules (id, rule) VALUES (2853, '0 25 2 1 18 1 -1 1 1 4 5 5 5 -1 1 11');
INSERT INTO pagc_rules (id, rule) VALUES (2854, '0 25 2 1 18 1 22 -1 1 1 4 5 5 5 7 -1 1 11');
INSERT INTO pagc_rules (id, rule) VALUES (2855, '0 25 2 0 18 -1 1 1 4 5 5 -1 1 8');
INSERT INTO pagc_rules (id, rule) VALUES (2856, '0 25 2 0 18 22 -1 1 1 4 5 5 7 -1 1 8');
INSERT INTO pagc_rules (id, rule) VALUES (2857, '0 25 2 0 1 -1 1 1 4 5 5 -1 1 8');
INSERT INTO pagc_rules (id, rule) VALUES (2858, '0 25 2 0 1 22 -1 1 1 4 5 5 7 -1 1 8');
INSERT INTO pagc_rules (id, rule) VALUES (2859, '0 25 2 18 1 -1 1 1 4 5 5 -1 1 8');
INSERT INTO pagc_rules (id, rule) VALUES (2860, '0 25 2 18 1 22 -1 1 1 4 5 5 7 -1 1 8');
INSERT INTO pagc_rules (id, rule) VALUES (2861, '0 25 2 18 18 1 -1 1 1 4 5 5 5 -1 1 8');
INSERT INTO pagc_rules (id, rule) VALUES (2862, '0 25 2 18 18 1 22 -1 1 1 4 5 5 5 7 -1 1 8');
INSERT INTO pagc_rules (id, rule) VALUES (2863, '25 2 1 18 -1 1 4 5 5 -1 1 11');
INSERT INTO pagc_rules (id, rule) VALUES (2864, '25 2 1 18 22 -1 1 4 5 5 7 -1 1 11');
INSERT INTO pagc_rules (id, rule) VALUES (2865, '25 2 1 18 1 -1 1 4 5 5 5 -1 1 11');
INSERT INTO pagc_rules (id, rule) VALUES (2866, '25 2 1 18 1 22 -1 1 4 5 5 5 7 -1 1 11');
INSERT INTO pagc_rules (id, rule) VALUES (2867, '25 2 0 18 -1 1 4 5 5 -1 1 8');
INSERT INTO pagc_rules (id, rule) VALUES (2868, '25 2 0 18 22 -1 1 4 5 5 7 -1 1 8');
INSERT INTO pagc_rules (id, rule) VALUES (2869, '25 2 0 1 -1 1 4 5 5 -1 1 8');
INSERT INTO pagc_rules (id, rule) VALUES (2870, '25 2 0 1 22 -1 1 4 5 5 7 -1 1 8');
INSERT INTO pagc_rules (id, rule) VALUES (2871, '25 2 18 1 -1 1 4 5 5 -1 1 8');
INSERT INTO pagc_rules (id, rule) VALUES (2872, '25 2 18 1 22 -1 1 4 5 5 7 -1 1 8');
INSERT INTO pagc_rules (id, rule) VALUES (2873, '25 2 18 18 1 -1 1 4 5 5 5 -1 1 8');
INSERT INTO pagc_rules (id, rule) VALUES (2874, '25 2 18 18 1 22 -1 1 4 5 5 5 7 -1 1 8');
INSERT INTO pagc_rules (id, rule) VALUES (2875, '0 14 2 -1 1 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2876, '0 14 2 22 -1 1 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2877, '0 15 1 2 -1 1 5 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2878, '0 15 1 2 22 -1 1 5 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2879, '0 24 2 -1 1 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2880, '0 24 2 22 -1 1 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2881, '0 24 24 2 -1 1 5 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2882, '0 24 24 2 22 -1 1 5 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2883, '0 24 2 2 -1 1 5 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2884, '0 24 2 2 22 -1 1 5 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2885, '0 24 1 2 -1 1 5 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2886, '0 24 1 2 22 -1 1 5 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2887, '0 22 2 -1 1 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2888, '0 22 2 22 -1 1 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2889, '0 22 1 2 -1 1 5 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2890, '0 22 1 2 22 -1 1 5 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2891, '0 25 2 -1 1 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2892, '0 25 2 22 -1 1 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2893, '0 0 25 2 -1 1 5 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2894, '0 0 25 2 22 -1 1 5 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2895, '0 15 2 -1 1 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2896, '0 15 2 22 -1 1 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2897, '0 18 18 18 2 -1 1 5 5 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2898, '0 18 18 18 2 22 -1 1 5 5 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2899, '0 18 18 1 2 -1 1 5 5 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2900, '0 18 18 1 2 22 -1 1 5 5 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2901, '0 18 2 2 -1 1 5 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2902, '0 18 2 2 22 -1 1 5 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2903, '0 18 1 2 -1 1 5 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2904, '0 18 1 2 22 -1 1 5 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2905, '0 2 2 -1 1 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2906, '0 2 2 22 -1 1 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2907, '0 2 0 2 -1 1 5 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2908, '0 2 0 2 22 -1 1 5 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2909, '0 2 1 2 -1 1 5 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2910, '0 2 1 2 22 -1 1 5 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2911, '0 16 0 2 -1 1 5 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2912, '0 16 0 2 22 -1 1 5 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2913, '0 1 13 1 2 -1 1 5 5 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2914, '0 1 13 1 2 22 -1 1 5 5 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2915, '0 1 15 2 -1 1 5 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2916, '0 1 15 2 22 -1 1 5 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2917, '0 1 24 2 -1 1 5 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2918, '0 1 24 2 22 -1 1 5 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2919, '0 1 24 24 2 -1 1 5 5 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2920, '0 1 24 24 2 22 -1 1 5 5 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2921, '0 1 24 1 2 -1 1 5 5 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2922, '0 1 24 1 2 22 -1 1 5 5 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2923, '0 1 22 2 -1 1 5 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2924, '0 1 22 2 22 -1 1 5 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2925, '0 1 22 1 2 -1 1 5 5 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2926, '0 1 22 1 2 22 -1 1 5 5 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2927, '0 1 25 2 -1 1 5 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2928, '0 1 25 2 22 -1 1 5 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2929, '0 1 0 2 -1 1 5 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2930, '0 1 0 2 22 -1 1 5 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2931, '0 1 18 2 -1 1 5 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2932, '0 1 18 2 22 -1 1 5 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2933, '0 1 18 2 2 -1 1 5 5 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2934, '0 1 18 2 2 22 -1 1 5 5 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2935, '0 1 18 1 2 -1 1 5 5 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2936, '0 1 18 1 2 22 -1 1 5 5 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2937, '0 1 2 2 -1 1 5 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2938, '0 1 2 2 22 -1 1 5 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2939, '0 1 2 2 2 -1 1 5 5 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2940, '0 1 2 2 2 22 -1 1 5 5 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2941, '0 21 2 -1 1 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2942, '0 21 2 22 -1 1 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2943, '0 22 14 2 -1 1 2 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2944, '0 22 14 2 22 -1 1 2 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2945, '0 22 15 1 2 -1 1 2 5 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2946, '0 22 15 1 2 22 -1 1 2 5 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2947, '0 22 24 2 -1 1 2 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2948, '0 22 24 2 22 -1 1 2 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2949, '0 22 24 24 2 -1 1 2 5 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2950, '0 22 24 24 2 22 -1 1 2 5 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2951, '0 22 24 2 2 -1 1 2 5 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2952, '0 22 24 2 2 22 -1 1 2 5 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2953, '0 22 24 1 2 -1 1 2 5 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2954, '0 22 24 1 2 22 -1 1 2 5 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2955, '0 22 22 2 -1 1 2 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2956, '0 22 22 2 22 -1 1 2 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2957, '0 22 22 1 2 -1 1 2 5 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2958, '0 22 22 1 2 22 -1 1 2 5 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2959, '0 22 25 2 -1 1 2 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2960, '0 22 25 2 22 -1 1 2 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2961, '0 22 0 25 2 -1 1 2 5 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2962, '0 22 0 25 2 22 -1 1 2 5 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2963, '0 22 15 2 -1 1 2 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2964, '0 22 15 2 22 -1 1 2 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2965, '0 22 18 18 18 2 -1 1 2 5 5 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2966, '0 22 18 18 18 2 22 -1 1 2 5 5 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2967, '0 22 18 18 1 2 -1 1 2 5 5 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2968, '0 22 18 18 1 2 22 -1 1 2 5 5 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2969, '0 22 18 2 2 -1 1 2 5 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2970, '0 22 18 2 2 22 -1 1 2 5 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2971, '0 22 18 1 2 -1 1 2 5 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2972, '0 22 18 1 2 22 -1 1 2 5 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2973, '0 22 2 2 -1 1 2 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2974, '0 22 2 2 22 -1 1 2 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2975, '0 22 2 0 2 -1 1 2 5 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2976, '0 22 2 0 2 22 -1 1 2 5 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2977, '0 22 2 1 2 -1 1 2 5 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2978, '0 22 2 1 2 22 -1 1 2 5 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2979, '0 22 16 0 2 -1 1 2 5 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2980, '0 22 16 0 2 22 -1 1 2 5 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2981, '0 22 1 13 1 2 -1 1 2 5 5 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2982, '0 22 1 13 1 2 22 -1 1 2 5 5 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2983, '0 22 1 15 2 -1 1 2 5 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2984, '0 22 1 15 2 22 -1 1 2 5 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2985, '0 22 1 24 2 -1 1 2 5 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2986, '0 22 1 24 2 22 -1 1 2 5 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2987, '0 22 1 24 24 2 -1 1 2 5 5 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2988, '0 22 1 24 24 2 22 -1 1 2 5 5 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2989, '0 22 1 24 1 2 -1 1 2 5 5 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2990, '0 22 1 24 1 2 22 -1 1 2 5 5 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2991, '0 22 1 22 2 -1 1 2 5 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2992, '0 22 1 22 2 22 -1 1 2 5 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2993, '0 22 1 22 1 2 -1 1 2 5 5 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2994, '0 22 1 22 1 2 22 -1 1 2 5 5 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2995, '0 22 1 25 2 -1 1 2 5 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2996, '0 22 1 25 2 22 -1 1 2 5 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2997, '0 22 1 0 2 -1 1 2 5 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2998, '0 22 1 0 2 22 -1 1 2 5 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (2999, '0 22 1 18 2 -1 1 2 5 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3000, '0 22 1 18 2 22 -1 1 2 5 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3001, '0 22 1 18 2 2 -1 1 2 5 5 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3002, '0 22 1 18 2 2 22 -1 1 2 5 5 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3003, '0 22 1 18 1 2 -1 1 2 5 5 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3004, '0 22 1 18 1 2 22 -1 1 2 5 5 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3005, '0 22 1 2 2 -1 1 2 5 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3006, '0 22 1 2 2 22 -1 1 2 5 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3007, '0 22 1 2 2 2 -1 1 2 5 5 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3008, '0 22 1 2 2 2 22 -1 1 2 5 5 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3009, '0 22 21 2 -1 1 2 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3010, '0 22 21 2 22 -1 1 2 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3011, '0 18 14 2 -1 1 1 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3012, '0 18 14 2 22 -1 1 1 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3013, '0 18 15 1 2 -1 1 1 5 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3014, '0 18 15 1 2 22 -1 1 1 5 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3015, '0 18 24 2 -1 1 1 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3016, '0 18 24 2 22 -1 1 1 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3017, '0 18 24 24 2 -1 1 1 5 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3018, '0 18 24 24 2 22 -1 1 1 5 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3019, '0 18 24 2 2 -1 1 1 5 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3020, '0 18 24 2 2 22 -1 1 1 5 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3021, '0 18 24 1 2 -1 1 1 5 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3022, '0 18 24 1 2 22 -1 1 1 5 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3023, '0 18 22 2 -1 1 1 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3024, '0 18 22 2 22 -1 1 1 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3025, '0 18 22 1 2 -1 1 1 5 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3026, '0 18 22 1 2 22 -1 1 1 5 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3027, '0 18 25 2 -1 1 1 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3028, '0 18 25 2 22 -1 1 1 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3029, '0 18 0 25 2 -1 1 1 5 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3030, '0 18 0 25 2 22 -1 1 1 5 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3031, '0 18 15 2 -1 1 1 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3032, '0 18 15 2 22 -1 1 1 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3033, '0 18 18 18 18 2 -1 1 1 5 5 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3034, '0 18 18 18 18 2 22 -1 1 1 5 5 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3035, '0 18 18 18 1 2 -1 1 1 5 5 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3036, '0 18 18 18 1 2 22 -1 1 1 5 5 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3037, '0 18 18 2 2 -1 1 1 5 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3038, '0 18 18 2 2 22 -1 1 1 5 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3039, '0 18 18 1 2 -1 1 1 5 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3040, '0 18 18 1 2 22 -1 1 1 5 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3041, '0 18 2 2 -1 1 1 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3042, '0 18 2 2 22 -1 1 1 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3043, '0 18 2 0 2 -1 1 1 5 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3044, '0 18 2 0 2 22 -1 1 1 5 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3045, '0 18 2 1 2 -1 1 1 5 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3046, '0 18 2 1 2 22 -1 1 1 5 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3047, '0 18 16 0 2 -1 1 1 5 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3048, '0 18 16 0 2 22 -1 1 1 5 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3049, '0 18 1 13 1 2 -1 1 1 5 5 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3050, '0 18 1 13 1 2 22 -1 1 1 5 5 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3051, '0 18 1 15 2 -1 1 1 5 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3052, '0 18 1 15 2 22 -1 1 1 5 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3053, '0 18 1 24 2 -1 1 1 5 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3054, '0 18 1 24 2 22 -1 1 1 5 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3055, '0 18 1 24 24 2 -1 1 1 5 5 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3056, '0 18 1 24 24 2 22 -1 1 1 5 5 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3057, '0 18 1 24 1 2 -1 1 1 5 5 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3058, '0 18 1 24 1 2 22 -1 1 1 5 5 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3059, '0 18 1 22 2 -1 1 1 5 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3060, '0 18 1 22 2 22 -1 1 1 5 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3061, '0 18 1 22 1 2 -1 1 1 5 5 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3062, '0 18 1 22 1 2 22 -1 1 1 5 5 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3063, '0 18 1 25 2 -1 1 1 5 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3064, '0 18 1 25 2 22 -1 1 1 5 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3065, '0 18 1 0 2 -1 1 1 5 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3066, '0 18 1 0 2 22 -1 1 1 5 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3067, '0 18 1 18 2 -1 1 1 5 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3068, '0 18 1 18 2 22 -1 1 1 5 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3069, '0 18 1 18 2 2 -1 1 1 5 5 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3070, '0 18 1 18 2 2 22 -1 1 1 5 5 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3071, '0 18 1 18 1 2 -1 1 1 5 5 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3072, '0 18 1 18 1 2 22 -1 1 1 5 5 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3073, '0 18 1 2 2 -1 1 1 5 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3074, '0 18 1 2 2 22 -1 1 1 5 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3075, '0 18 1 2 2 2 -1 1 1 5 5 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3076, '0 18 1 2 2 2 22 -1 1 1 5 5 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3077, '0 18 21 2 -1 1 1 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3078, '0 18 21 2 22 -1 1 1 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3079, '0 18 22 14 2 -1 1 1 2 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3080, '0 18 22 14 2 22 -1 1 1 2 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3081, '0 18 22 15 1 2 -1 1 1 2 5 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3082, '0 18 22 15 1 2 22 -1 1 1 2 5 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3083, '0 18 22 24 2 -1 1 1 2 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3084, '0 18 22 24 2 22 -1 1 1 2 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3085, '0 18 22 24 24 2 -1 1 1 2 5 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3086, '0 18 22 24 24 2 22 -1 1 1 2 5 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3087, '0 18 22 24 2 2 -1 1 1 2 5 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3088, '0 18 22 24 2 2 22 -1 1 1 2 5 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3089, '0 18 22 24 1 2 -1 1 1 2 5 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3090, '0 18 22 24 1 2 22 -1 1 1 2 5 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3091, '0 18 22 22 2 -1 1 1 2 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3092, '0 18 22 22 2 22 -1 1 1 2 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3093, '0 18 22 22 1 2 -1 1 1 2 5 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3094, '0 18 22 22 1 2 22 -1 1 1 2 5 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3095, '0 18 22 25 2 -1 1 1 2 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3096, '0 18 22 25 2 22 -1 1 1 2 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3097, '0 18 22 0 25 2 -1 1 1 2 5 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3098, '0 18 22 0 25 2 22 -1 1 1 2 5 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3099, '0 18 22 15 2 -1 1 1 2 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3100, '0 18 22 15 2 22 -1 1 1 2 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3101, '0 18 22 18 18 18 2 -1 1 1 2 5 5 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3102, '0 18 22 18 18 18 2 22 -1 1 1 2 5 5 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3103, '0 18 22 18 18 1 2 -1 1 1 2 5 5 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3104, '0 18 22 18 18 1 2 22 -1 1 1 2 5 5 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3105, '0 18 22 18 2 2 -1 1 1 2 5 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3106, '0 18 22 18 2 2 22 -1 1 1 2 5 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3107, '0 18 22 18 1 2 -1 1 1 2 5 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3108, '0 18 22 18 1 2 22 -1 1 1 2 5 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3109, '0 18 22 2 2 -1 1 1 2 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3110, '0 18 22 2 2 22 -1 1 1 2 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3111, '0 18 22 2 0 2 -1 1 1 2 5 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3112, '0 18 22 2 0 2 22 -1 1 1 2 5 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3113, '0 18 22 2 1 2 -1 1 1 2 5 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3114, '0 18 22 2 1 2 22 -1 1 1 2 5 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3115, '0 18 22 16 0 2 -1 1 1 2 5 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3116, '0 18 22 16 0 2 22 -1 1 1 2 5 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3117, '0 18 22 1 13 1 2 -1 1 1 2 5 5 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3118, '0 18 22 1 13 1 2 22 -1 1 1 2 5 5 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3119, '0 18 22 1 15 2 -1 1 1 2 5 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3120, '0 18 22 1 15 2 22 -1 1 1 2 5 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3121, '0 18 22 1 24 2 -1 1 1 2 5 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3122, '0 18 22 1 24 2 22 -1 1 1 2 5 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3123, '0 18 22 1 24 24 2 -1 1 1 2 5 5 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3124, '0 18 22 1 24 24 2 22 -1 1 1 2 5 5 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3125, '0 18 22 1 24 1 2 -1 1 1 2 5 5 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3126, '0 18 22 1 24 1 2 22 -1 1 1 2 5 5 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3127, '0 18 22 1 22 2 -1 1 1 2 5 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3128, '0 18 22 1 22 2 22 -1 1 1 2 5 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3129, '0 18 22 1 22 1 2 -1 1 1 2 5 5 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3130, '0 18 22 1 22 1 2 22 -1 1 1 2 5 5 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3131, '0 18 22 1 25 2 -1 1 1 2 5 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3132, '0 18 22 1 25 2 22 -1 1 1 2 5 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3133, '0 18 22 1 0 2 -1 1 1 2 5 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3134, '0 18 22 1 0 2 22 -1 1 1 2 5 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3135, '0 18 22 1 18 2 -1 1 1 2 5 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3136, '0 18 22 1 18 2 22 -1 1 1 2 5 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3137, '0 18 22 1 18 2 2 -1 1 1 2 5 5 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3138, '0 18 22 1 18 2 2 22 -1 1 1 2 5 5 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3139, '0 18 22 1 18 1 2 -1 1 1 2 5 5 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3140, '0 18 22 1 18 1 2 22 -1 1 1 2 5 5 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3141, '0 18 22 1 2 2 -1 1 1 2 5 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3142, '0 18 22 1 2 2 22 -1 1 1 2 5 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3143, '0 18 22 1 2 2 2 -1 1 1 2 5 5 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3144, '0 18 22 1 2 2 2 22 -1 1 1 2 5 5 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3145, '0 18 22 21 2 -1 1 1 2 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3146, '0 18 22 21 2 22 -1 1 1 2 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3147, '0 25 14 2 -1 1 1 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3148, '0 25 14 2 22 -1 1 1 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3149, '0 25 15 1 2 -1 1 1 5 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3150, '0 25 15 1 2 22 -1 1 1 5 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3151, '0 25 24 2 -1 1 1 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3152, '0 25 24 2 22 -1 1 1 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3153, '0 25 24 24 2 -1 1 1 5 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3154, '0 25 24 24 2 22 -1 1 1 5 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3155, '0 25 24 2 2 -1 1 1 5 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3156, '0 25 24 2 2 22 -1 1 1 5 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3157, '0 25 24 1 2 -1 1 1 5 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3158, '0 25 24 1 2 22 -1 1 1 5 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3159, '0 25 22 2 -1 1 1 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3160, '0 25 22 2 22 -1 1 1 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3161, '0 25 22 1 2 -1 1 1 5 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3162, '0 25 22 1 2 22 -1 1 1 5 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3163, '0 25 25 2 -1 1 1 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3164, '0 25 25 2 22 -1 1 1 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3165, '0 25 0 25 2 -1 1 1 5 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3166, '0 25 0 25 2 22 -1 1 1 5 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3167, '0 25 15 2 -1 1 1 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3168, '0 25 15 2 22 -1 1 1 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3169, '0 25 18 18 18 2 -1 1 1 5 5 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3170, '0 25 18 18 18 2 22 -1 1 1 5 5 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3171, '0 25 18 18 1 2 -1 1 1 5 5 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3172, '0 25 18 18 1 2 22 -1 1 1 5 5 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3173, '0 25 18 2 2 -1 1 1 5 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3174, '0 25 18 2 2 22 -1 1 1 5 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3175, '0 25 18 1 2 -1 1 1 5 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3176, '0 25 18 1 2 22 -1 1 1 5 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3177, '0 25 2 2 -1 1 1 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3178, '0 25 2 2 22 -1 1 1 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3179, '0 25 2 0 2 -1 1 1 5 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3180, '0 25 2 0 2 22 -1 1 1 5 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3181, '0 25 2 1 2 -1 1 1 5 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3182, '0 25 2 1 2 22 -1 1 1 5 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3183, '0 25 16 0 2 -1 1 1 5 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3184, '0 25 16 0 2 22 -1 1 1 5 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3185, '0 25 1 13 1 2 -1 1 1 5 5 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3186, '0 25 1 13 1 2 22 -1 1 1 5 5 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3187, '0 25 1 15 2 -1 1 1 5 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3188, '0 25 1 15 2 22 -1 1 1 5 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3189, '0 25 1 24 2 -1 1 1 5 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3190, '0 25 1 24 2 22 -1 1 1 5 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3191, '0 25 1 24 24 2 -1 1 1 5 5 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3192, '0 25 1 24 24 2 22 -1 1 1 5 5 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3193, '0 25 1 24 1 2 -1 1 1 5 5 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3194, '0 25 1 24 1 2 22 -1 1 1 5 5 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3195, '0 25 1 22 2 -1 1 1 5 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3196, '0 25 1 22 2 22 -1 1 1 5 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3197, '0 25 1 22 1 2 -1 1 1 5 5 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3198, '0 25 1 22 1 2 22 -1 1 1 5 5 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3199, '0 25 1 25 2 -1 1 1 5 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3200, '0 25 1 25 2 22 -1 1 1 5 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3201, '0 25 1 0 2 -1 1 1 5 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3202, '0 25 1 0 2 22 -1 1 1 5 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3203, '0 25 1 18 2 -1 1 1 5 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3204, '0 25 1 18 2 22 -1 1 1 5 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3205, '0 25 1 18 2 2 -1 1 1 5 5 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3206, '0 25 1 18 2 2 22 -1 1 1 5 5 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3207, '0 25 1 18 1 2 -1 1 1 5 5 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3208, '0 25 1 18 1 2 22 -1 1 1 5 5 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3209, '0 25 1 2 2 -1 1 1 5 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3210, '0 25 1 2 2 22 -1 1 1 5 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3211, '0 25 1 2 2 2 -1 1 1 5 5 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3212, '0 25 1 2 2 2 22 -1 1 1 5 5 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3213, '0 25 21 2 -1 1 1 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3214, '0 25 21 2 22 -1 1 1 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3215, '0 25 22 14 2 -1 1 1 2 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3216, '0 25 22 14 2 22 -1 1 1 2 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3217, '0 25 22 15 1 2 -1 1 1 2 5 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3218, '0 25 22 15 1 2 22 -1 1 1 2 5 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3219, '0 25 22 24 2 -1 1 1 2 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3220, '0 25 22 24 2 22 -1 1 1 2 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3221, '0 25 22 24 24 2 -1 1 1 2 5 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3222, '0 25 22 24 24 2 22 -1 1 1 2 5 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3223, '0 25 22 24 2 2 -1 1 1 2 5 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3224, '0 25 22 24 2 2 22 -1 1 1 2 5 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3225, '0 25 22 24 1 2 -1 1 1 2 5 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3226, '0 25 22 24 1 2 22 -1 1 1 2 5 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3227, '0 25 22 22 2 -1 1 1 2 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3228, '0 25 22 22 2 22 -1 1 1 2 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3229, '0 25 22 22 1 2 -1 1 1 2 5 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3230, '0 25 22 22 1 2 22 -1 1 1 2 5 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3231, '0 25 22 25 2 -1 1 1 2 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3232, '0 25 22 25 2 22 -1 1 1 2 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3233, '0 25 22 0 25 2 -1 1 1 2 5 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3234, '0 25 22 0 25 2 22 -1 1 1 2 5 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3235, '0 25 22 15 2 -1 1 1 2 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3236, '0 25 22 15 2 22 -1 1 1 2 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3237, '0 25 22 18 18 18 2 -1 1 1 2 5 5 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3238, '0 25 22 18 18 18 2 22 -1 1 1 2 5 5 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3239, '0 25 22 18 18 1 2 -1 1 1 2 5 5 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3240, '0 25 22 18 18 1 2 22 -1 1 1 2 5 5 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3241, '0 25 22 18 2 2 -1 1 1 2 5 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3242, '0 25 22 18 2 2 22 -1 1 1 2 5 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3243, '0 25 22 18 1 2 -1 1 1 2 5 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3244, '0 25 22 18 1 2 22 -1 1 1 2 5 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3245, '0 25 22 2 2 -1 1 1 2 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3246, '0 25 22 2 2 22 -1 1 1 2 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3247, '0 25 22 2 0 2 -1 1 1 2 5 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3248, '0 25 22 2 0 2 22 -1 1 1 2 5 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3249, '0 25 22 2 1 2 -1 1 1 2 5 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3250, '0 25 22 2 1 2 22 -1 1 1 2 5 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3251, '0 25 22 16 0 2 -1 1 1 2 5 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3252, '0 25 22 16 0 2 22 -1 1 1 2 5 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3253, '0 25 22 1 13 1 2 -1 1 1 2 5 5 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3254, '0 25 22 1 13 1 2 22 -1 1 1 2 5 5 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3255, '0 25 22 1 15 2 -1 1 1 2 5 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3256, '0 25 22 1 15 2 22 -1 1 1 2 5 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3257, '0 25 22 1 24 2 -1 1 1 2 5 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3258, '0 25 22 1 24 2 22 -1 1 1 2 5 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3259, '0 25 22 1 24 24 2 -1 1 1 2 5 5 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3260, '0 25 22 1 24 24 2 22 -1 1 1 2 5 5 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3261, '0 25 22 1 24 1 2 -1 1 1 2 5 5 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3262, '0 25 22 1 24 1 2 22 -1 1 1 2 5 5 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3263, '0 25 22 1 22 2 -1 1 1 2 5 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3264, '0 25 22 1 22 2 22 -1 1 1 2 5 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3265, '0 25 22 1 22 1 2 -1 1 1 2 5 5 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3266, '0 25 22 1 22 1 2 22 -1 1 1 2 5 5 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3267, '0 25 22 1 25 2 -1 1 1 2 5 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3268, '0 25 22 1 25 2 22 -1 1 1 2 5 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3269, '0 25 22 1 0 2 -1 1 1 2 5 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3270, '0 25 22 1 0 2 22 -1 1 1 2 5 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3271, '0 25 22 1 18 2 -1 1 1 2 5 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3272, '0 25 22 1 18 2 22 -1 1 1 2 5 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3273, '0 25 22 1 18 2 2 -1 1 1 2 5 5 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3274, '0 25 22 1 18 2 2 22 -1 1 1 2 5 5 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3275, '0 25 22 1 18 1 2 -1 1 1 2 5 5 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3276, '0 25 22 1 18 1 2 22 -1 1 1 2 5 5 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3277, '0 25 22 1 2 2 -1 1 1 2 5 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3278, '0 25 22 1 2 2 22 -1 1 1 2 5 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3279, '0 25 22 1 2 2 2 -1 1 1 2 5 5 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3280, '0 25 22 1 2 2 2 22 -1 1 1 2 5 5 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3281, '0 25 22 21 2 -1 1 1 2 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3282, '0 25 22 21 2 22 -1 1 1 2 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3283, '25 14 2 -1 1 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3284, '25 14 2 22 -1 1 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3285, '25 15 1 2 -1 1 5 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3286, '25 15 1 2 22 -1 1 5 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3287, '25 24 2 -1 1 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3288, '25 24 2 22 -1 1 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3289, '25 24 24 2 -1 1 5 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3290, '25 24 24 2 22 -1 1 5 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3291, '25 24 2 2 -1 1 5 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3292, '25 24 2 2 22 -1 1 5 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3293, '25 24 1 2 -1 1 5 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3294, '25 24 1 2 22 -1 1 5 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3295, '25 22 2 -1 1 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3296, '25 22 2 22 -1 1 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3297, '25 22 1 2 -1 1 5 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3298, '25 22 1 2 22 -1 1 5 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3299, '25 25 2 -1 1 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3300, '25 25 2 22 -1 1 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3301, '25 0 25 2 -1 1 5 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3302, '25 0 25 2 22 -1 1 5 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3303, '25 15 2 -1 1 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3304, '25 15 2 22 -1 1 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3305, '25 18 18 18 2 -1 1 5 5 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3306, '25 18 18 18 2 22 -1 1 5 5 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3307, '25 18 18 1 2 -1 1 5 5 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3308, '25 18 18 1 2 22 -1 1 5 5 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3309, '25 18 2 2 -1 1 5 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3310, '25 18 2 2 22 -1 1 5 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3311, '25 18 1 2 -1 1 5 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3312, '25 18 1 2 22 -1 1 5 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3313, '25 2 2 -1 1 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3314, '25 2 2 22 -1 1 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3315, '25 2 0 2 -1 1 5 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3316, '25 2 0 2 22 -1 1 5 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3317, '25 2 1 2 -1 1 5 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3318, '25 2 1 2 22 -1 1 5 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3319, '25 16 0 2 -1 1 5 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3320, '25 16 0 2 22 -1 1 5 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3321, '25 1 13 1 2 -1 1 5 5 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3322, '25 1 13 1 2 22 -1 1 5 5 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3323, '25 1 15 2 -1 1 5 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3324, '25 1 15 2 22 -1 1 5 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3325, '25 1 24 2 -1 1 5 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3326, '25 1 24 2 22 -1 1 5 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3327, '25 1 24 24 2 -1 1 5 5 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3328, '25 1 24 24 2 22 -1 1 5 5 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3329, '25 1 24 1 2 -1 1 5 5 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3330, '25 1 24 1 2 22 -1 1 5 5 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3331, '25 1 22 2 -1 1 5 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3332, '25 1 22 2 22 -1 1 5 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3333, '25 1 22 1 2 -1 1 5 5 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3334, '25 1 22 1 2 22 -1 1 5 5 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3335, '25 1 25 2 -1 1 5 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3336, '25 1 25 2 22 -1 1 5 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3337, '25 1 0 2 -1 1 5 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3338, '25 1 0 2 22 -1 1 5 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3339, '25 1 18 2 -1 1 5 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3340, '25 1 18 2 22 -1 1 5 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3341, '25 1 18 2 2 -1 1 5 5 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3342, '25 1 18 2 2 22 -1 1 5 5 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3343, '25 1 18 1 2 -1 1 5 5 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3344, '25 1 18 1 2 22 -1 1 5 5 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3345, '25 1 2 2 -1 1 5 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3346, '25 1 2 2 22 -1 1 5 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3347, '25 1 2 2 2 -1 1 5 5 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3348, '25 1 2 2 2 22 -1 1 5 5 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3349, '25 21 2 -1 1 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3350, '25 21 2 22 -1 1 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3351, '25 22 14 2 -1 1 2 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3352, '25 22 14 2 22 -1 1 2 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3353, '25 22 15 1 2 -1 1 2 5 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3354, '25 22 15 1 2 22 -1 1 2 5 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3355, '25 22 24 2 -1 1 2 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3356, '25 22 24 2 22 -1 1 2 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3357, '25 22 24 24 2 -1 1 2 5 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3358, '25 22 24 24 2 22 -1 1 2 5 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3359, '25 22 24 2 2 -1 1 2 5 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3360, '25 22 24 2 2 22 -1 1 2 5 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3361, '25 22 24 1 2 -1 1 2 5 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3362, '25 22 24 1 2 22 -1 1 2 5 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3363, '25 22 22 2 -1 1 2 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3364, '25 22 22 2 22 -1 1 2 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3365, '25 22 22 1 2 -1 1 2 5 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3366, '25 22 22 1 2 22 -1 1 2 5 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3367, '25 22 25 2 -1 1 2 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3368, '25 22 25 2 22 -1 1 2 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3369, '25 22 0 25 2 -1 1 2 5 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3370, '25 22 0 25 2 22 -1 1 2 5 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3371, '25 22 15 2 -1 1 2 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3372, '25 22 15 2 22 -1 1 2 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3373, '25 22 18 18 18 2 -1 1 2 5 5 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3374, '25 22 18 18 18 2 22 -1 1 2 5 5 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3375, '25 22 18 18 1 2 -1 1 2 5 5 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3376, '25 22 18 18 1 2 22 -1 1 2 5 5 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3377, '25 22 18 2 2 -1 1 2 5 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3378, '25 22 18 2 2 22 -1 1 2 5 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3379, '25 22 18 1 2 -1 1 2 5 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3380, '25 22 18 1 2 22 -1 1 2 5 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3381, '25 22 2 2 -1 1 2 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3382, '25 22 2 2 22 -1 1 2 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3383, '25 22 2 0 2 -1 1 2 5 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3384, '25 22 2 0 2 22 -1 1 2 5 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3385, '25 22 2 1 2 -1 1 2 5 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3386, '25 22 2 1 2 22 -1 1 2 5 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3387, '25 22 16 0 2 -1 1 2 5 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3388, '25 22 16 0 2 22 -1 1 2 5 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3389, '25 22 1 13 1 2 -1 1 2 5 5 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3390, '25 22 1 13 1 2 22 -1 1 2 5 5 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3391, '25 22 1 15 2 -1 1 2 5 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3392, '25 22 1 15 2 22 -1 1 2 5 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3393, '25 22 1 24 2 -1 1 2 5 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3394, '25 22 1 24 2 22 -1 1 2 5 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3395, '25 22 1 24 24 2 -1 1 2 5 5 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3396, '25 22 1 24 24 2 22 -1 1 2 5 5 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3397, '25 22 1 24 1 2 -1 1 2 5 5 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3398, '25 22 1 24 1 2 22 -1 1 2 5 5 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3399, '25 22 1 22 2 -1 1 2 5 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3400, '25 22 1 22 2 22 -1 1 2 5 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3401, '25 22 1 22 1 2 -1 1 2 5 5 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3402, '25 22 1 22 1 2 22 -1 1 2 5 5 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3403, '25 22 1 25 2 -1 1 2 5 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3404, '25 22 1 25 2 22 -1 1 2 5 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3405, '25 22 1 0 2 -1 1 2 5 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3406, '25 22 1 0 2 22 -1 1 2 5 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3407, '25 22 1 18 2 -1 1 2 5 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3408, '25 22 1 18 2 22 -1 1 2 5 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3409, '25 22 1 18 2 2 -1 1 2 5 5 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3410, '25 22 1 18 2 2 22 -1 1 2 5 5 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3411, '25 22 1 18 1 2 -1 1 2 5 5 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3412, '25 22 1 18 1 2 22 -1 1 2 5 5 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3413, '25 22 1 2 2 -1 1 2 5 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3414, '25 22 1 2 2 22 -1 1 2 5 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3415, '25 22 1 2 2 2 -1 1 2 5 5 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3416, '25 22 1 2 2 2 22 -1 1 2 5 5 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3417, '25 22 21 2 -1 1 2 5 6 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3418, '25 22 21 2 22 -1 1 2 5 6 7 -1 1 16');
INSERT INTO pagc_rules (id, rule) VALUES (3419, '0 -1 1 -1 3 17');
INSERT INTO pagc_rules (id, rule) VALUES (3420, '0 18 -1 1 1 -1 3 16');
INSERT INTO pagc_rules (id, rule) VALUES (3421, '0 25 -1 1 1 -1 3 16');
INSERT INTO pagc_rules (id, rule) VALUES (3422, '0 22 -1 1 1 -1 3 9');
INSERT INTO pagc_rules (id, rule) VALUES (3423, '22 0 -1 1 1 -1 3 9');
INSERT INTO pagc_rules (id, rule) VALUES (3424, '1 0 -1 1 1 -1 3 6');
INSERT INTO pagc_rules (id, rule) VALUES (3425, '18 0 -1 1 1 -1 3 12');
INSERT INTO pagc_rules (id, rule) VALUES (3426, '25 -1 1 -1 3 12');
INSERT INTO pagc_rules (id, rule) VALUES (3427, '21 0 -1 1 1 -1 3 12');
INSERT INTO pagc_rules (id, rule) VALUES (3428, '0 21 -1 1 1 -1 3 9');
INSERT INTO pagc_rules (id, rule) VALUES (3429, '0 0 -1 1 1 -1 3 15');
INSERT INTO pagc_rules (id, rule) VALUES (3430, '21 0 0 -1 1 1 1 -1 3 9');
INSERT INTO pagc_rules (id, rule) VALUES (3431, '0 0 21 -1 1 1 1 -1 3 9');
INSERT INTO pagc_rules (id, rule) VALUES (3432, '0 0 18 -1 1 1 1 -1 3 9');
INSERT INTO pagc_rules (id, rule) VALUES (3433, '18 0 -1 1 1 -1 3 9');
INSERT INTO pagc_rules (id, rule) VALUES (3434, '18 0 0 -1 1 1 1 -1 3 9');
INSERT INTO pagc_rules (id, rule) VALUES (3435, '0 0 18 -1 1 1 1 -1 3 9');
INSERT INTO pagc_rules (id, rule) VALUES (3436, '8 -1 8 -1 4 7');
INSERT INTO pagc_rules (id, rule) VALUES (3437, '8 23 -1 8 8 -1 4 16');
INSERT INTO pagc_rules (id, rule) VALUES (3438, '8 0 -1 8 8 -1 4 17');
INSERT INTO pagc_rules (id, rule) VALUES (3439, '8 0 18 -1 8 8 8 -1 4 16');
INSERT INTO pagc_rules (id, rule) VALUES (3440, '8 18 -1 8 8 -1 4 16');
INSERT INTO pagc_rules (id, rule) VALUES (3441, '8 18 0 -1 8 8 8 -1 4 16');
INSERT INTO pagc_rules (id, rule) VALUES (3442, '8 1 -1 8 8 -1 4 2');
INSERT INTO pagc_rules (id, rule) VALUES (3443, '14 -1 14 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3444, '14 21 -1 14 15 -1 4 16');
INSERT INTO pagc_rules (id, rule) VALUES (3445, '14 23 -1 14 15 -1 4 17');
INSERT INTO pagc_rules (id, rule) VALUES (3446, '14 0 -1 14 15 -1 4 17');
INSERT INTO pagc_rules (id, rule) VALUES (3447, '14 0 18 -1 14 15 15 -1 4 16');
INSERT INTO pagc_rules (id, rule) VALUES (3448, '14 0 18 0 -1 14 15 15 15 -1 4 16');
INSERT INTO pagc_rules (id, rule) VALUES (3449, '14 18 -1 14 15 -1 4 16');
INSERT INTO pagc_rules (id, rule) VALUES (3450, '14 18 0 -1 14 15 15 -1 4 16');
INSERT INTO pagc_rules (id, rule) VALUES (3451, '14 1 -1 14 15 -1 4 2');
INSERT INTO pagc_rules (id, rule) VALUES (3452, '1 24 -1 0 0 -1 4 15');
INSERT INTO pagc_rules (id, rule) VALUES (3453, '14 24 -1 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3454, '24 24 -1 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3455, '24 24 24 -1 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3456, '24 22 24 -1 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3457, '24 18 24 -1 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3458, '24 2 24 -1 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3459, '24 1 24 -1 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3460, '22 24 -1 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3461, '22 24 24 -1 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3462, '22 24 24 24 -1 0 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3463, '22 24 1 24 -1 0 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3464, '22 22 24 -1 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3465, '22 2 24 -1 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3466, '22 1 24 -1 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3467, '18 24 -1 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3468, '18 13 18 24 -1 0 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3469, '18 24 24 -1 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3470, '18 18 24 -1 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3471, '18 18 18 24 -1 0 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3472, '18 18 2 24 -1 0 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3473, '18 18 1 24 -1 0 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3474, '18 2 24 -1 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3475, '18 1 24 -1 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3476, '18 1 24 24 -1 0 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3477, '2 24 -1 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3478, '2 22 24 -1 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3479, '2 0 24 -1 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3480, '2 18 24 -1 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3481, '2 2 24 -1 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3482, '2 1 24 -1 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3483, '1 13 1 24 -1 0 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3484, '1 24 24 24 -1 0 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3485, '1 24 22 24 -1 0 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3486, '1 24 2 24 -1 0 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3487, '1 24 1 24 -1 0 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3488, '1 22 24 -1 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3489, '1 22 24 24 -1 0 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3490, '1 0 24 -1 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3491, '1 0 24 24 -1 0 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3492, '1 0 1 24 -1 0 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3493, '1 18 24 -1 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3494, '1 18 1 24 -1 0 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3495, '1 2 24 -1 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3496, '1 2 1 24 -1 0 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3497, '0 1 24 -1 0 0 0 -1 4 15');
INSERT INTO pagc_rules (id, rule) VALUES (3498, '0 14 24 -1 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3499, '0 24 24 -1 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3500, '0 24 24 24 -1 0 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3501, '0 24 22 24 -1 0 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3502, '0 24 18 24 -1 0 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3503, '0 24 2 24 -1 0 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3504, '0 24 1 24 -1 0 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3505, '0 22 24 -1 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3506, '0 22 24 24 -1 0 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3507, '0 22 24 24 24 -1 0 0 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3508, '0 22 24 1 24 -1 0 0 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3509, '0 22 22 24 -1 0 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3510, '0 22 2 24 -1 0 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3511, '0 22 1 24 -1 0 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3512, '0 18 24 -1 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3513, '0 18 13 18 24 -1 0 0 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3514, '0 18 24 24 -1 0 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3515, '0 18 18 24 -1 0 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3516, '0 18 18 18 24 -1 0 0 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3517, '0 18 18 2 24 -1 0 0 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3518, '0 18 18 1 24 -1 0 0 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3519, '0 18 2 24 -1 0 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3520, '0 18 1 24 -1 0 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3521, '0 18 1 24 24 -1 0 0 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3522, '0 2 24 -1 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3523, '0 2 22 24 -1 0 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3524, '0 2 0 24 -1 0 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3525, '0 2 18 24 -1 0 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3526, '0 2 2 24 -1 0 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3527, '0 2 1 24 -1 0 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3528, '0 1 13 1 24 -1 0 0 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3529, '0 1 24 24 24 -1 0 0 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3530, '0 1 24 22 24 -1 0 0 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3531, '0 1 24 2 24 -1 0 0 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3532, '0 1 24 1 24 -1 0 0 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3533, '0 1 22 24 -1 0 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3534, '0 1 22 24 24 -1 0 0 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3535, '0 1 0 24 -1 0 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3536, '0 1 0 24 24 -1 0 0 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3537, '0 1 0 1 24 -1 0 0 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3538, '0 1 18 24 -1 0 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3539, '0 1 18 1 24 -1 0 0 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3540, '0 1 2 24 -1 0 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3541, '0 1 2 1 24 -1 0 0 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3542, '0 18 1 24 -1 0 0 0 0 -1 4 15');
INSERT INTO pagc_rules (id, rule) VALUES (3543, '0 18 14 24 -1 0 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3544, '0 18 24 24 -1 0 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3545, '0 18 24 24 24 -1 0 0 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3546, '0 18 24 22 24 -1 0 0 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3547, '0 18 24 18 24 -1 0 0 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3548, '0 18 24 2 24 -1 0 0 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3549, '0 18 24 1 24 -1 0 0 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3550, '0 18 22 24 -1 0 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3551, '0 18 22 24 24 -1 0 0 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3552, '0 18 22 24 24 24 -1 0 0 0 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3553, '0 18 22 24 1 24 -1 0 0 0 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3554, '0 18 22 22 24 -1 0 0 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3555, '0 18 22 2 24 -1 0 0 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3556, '0 18 22 1 24 -1 0 0 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3557, '0 18 18 24 -1 0 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3558, '0 18 18 13 18 24 -1 0 0 0 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3559, '0 18 18 24 24 -1 0 0 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3560, '0 18 18 18 24 -1 0 0 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3561, '0 18 18 18 18 24 -1 0 0 0 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3562, '0 18 18 18 2 24 -1 0 0 0 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3563, '0 18 18 18 1 24 -1 0 0 0 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3564, '0 18 18 2 24 -1 0 0 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3565, '0 18 18 1 24 -1 0 0 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3566, '0 18 18 1 24 24 -1 0 0 0 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3567, '0 18 2 24 -1 0 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3568, '0 18 2 22 24 -1 0 0 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3569, '0 18 2 0 24 -1 0 0 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3570, '0 18 2 18 24 -1 0 0 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3571, '0 18 2 2 24 -1 0 0 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3572, '0 18 2 1 24 -1 0 0 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3573, '0 18 1 13 1 24 -1 0 0 0 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3574, '0 18 1 24 24 24 -1 0 0 0 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3575, '0 18 1 24 22 24 -1 0 0 0 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3576, '0 18 1 24 2 24 -1 0 0 0 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3577, '0 18 1 24 1 24 -1 0 0 0 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3578, '0 18 1 22 24 -1 0 0 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3579, '0 18 1 22 24 24 -1 0 0 0 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3580, '0 18 1 0 24 -1 0 0 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3581, '0 18 1 0 24 24 -1 0 0 0 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3582, '0 18 1 0 1 24 -1 0 0 0 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3583, '0 18 1 18 24 -1 0 0 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3584, '0 18 1 18 1 24 -1 0 0 0 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3585, '0 18 1 2 24 -1 0 0 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3586, '0 18 1 2 1 24 -1 0 0 0 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3587, '0 25 1 24 -1 0 0 0 0 -1 4 15');
INSERT INTO pagc_rules (id, rule) VALUES (3588, '0 25 14 24 -1 0 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3589, '0 25 24 24 -1 0 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3590, '0 25 24 24 24 -1 0 0 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3591, '0 25 24 22 24 -1 0 0 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3592, '0 25 24 18 24 -1 0 0 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3593, '0 25 24 2 24 -1 0 0 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3594, '0 25 24 1 24 -1 0 0 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3595, '0 25 22 24 -1 0 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3596, '0 25 22 24 24 -1 0 0 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3597, '0 25 22 24 24 24 -1 0 0 0 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3598, '0 25 22 24 1 24 -1 0 0 0 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3599, '0 25 22 22 24 -1 0 0 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3600, '0 25 22 2 24 -1 0 0 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3601, '0 25 22 1 24 -1 0 0 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3602, '0 25 18 24 -1 0 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3603, '0 25 18 13 18 24 -1 0 0 0 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3604, '0 25 18 24 24 -1 0 0 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3605, '0 25 18 18 24 -1 0 0 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3606, '0 25 18 18 18 24 -1 0 0 0 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3607, '0 25 18 18 2 24 -1 0 0 0 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3608, '0 25 18 18 1 24 -1 0 0 0 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3609, '0 25 18 2 24 -1 0 0 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3610, '0 25 18 1 24 -1 0 0 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3611, '0 25 18 1 24 24 -1 0 0 0 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3612, '0 25 2 24 -1 0 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3613, '0 25 2 22 24 -1 0 0 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3614, '0 25 2 0 24 -1 0 0 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3615, '0 25 2 18 24 -1 0 0 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3616, '0 25 2 2 24 -1 0 0 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3617, '0 25 2 1 24 -1 0 0 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3618, '0 25 1 13 1 24 -1 0 0 0 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3619, '0 25 1 24 24 24 -1 0 0 0 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3620, '0 25 1 24 22 24 -1 0 0 0 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3621, '0 25 1 24 2 24 -1 0 0 0 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3622, '0 25 1 24 1 24 -1 0 0 0 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3623, '0 25 1 22 24 -1 0 0 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3624, '0 25 1 22 24 24 -1 0 0 0 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3625, '0 25 1 0 24 -1 0 0 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3626, '0 25 1 0 24 24 -1 0 0 0 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3627, '0 25 1 0 1 24 -1 0 0 0 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3628, '0 25 1 18 24 -1 0 0 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3629, '0 25 1 18 1 24 -1 0 0 0 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3630, '0 25 1 2 24 -1 0 0 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3631, '0 25 1 2 1 24 -1 0 0 0 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3632, '18 0 1 24 -1 0 0 0 0 -1 4 15');
INSERT INTO pagc_rules (id, rule) VALUES (3633, '18 0 14 24 -1 0 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3634, '18 0 24 24 -1 0 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3635, '18 0 24 24 24 -1 0 0 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3636, '18 0 24 22 24 -1 0 0 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3637, '18 0 24 18 24 -1 0 0 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3638, '18 0 24 2 24 -1 0 0 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3639, '18 0 24 1 24 -1 0 0 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3640, '18 0 22 24 -1 0 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3641, '18 0 22 24 24 -1 0 0 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3642, '18 0 22 24 24 24 -1 0 0 0 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3643, '18 0 22 24 1 24 -1 0 0 0 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3644, '18 0 22 22 24 -1 0 0 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3645, '18 0 22 2 24 -1 0 0 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3646, '18 0 22 1 24 -1 0 0 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3647, '18 0 18 24 -1 0 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3648, '18 0 18 13 18 24 -1 0 0 0 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3649, '18 0 18 24 24 -1 0 0 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3650, '18 0 18 18 24 -1 0 0 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3651, '18 0 18 18 18 24 -1 0 0 0 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3652, '18 0 18 18 2 24 -1 0 0 0 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3653, '18 0 18 18 1 24 -1 0 0 0 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3654, '18 0 18 2 24 -1 0 0 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3655, '18 0 18 1 24 -1 0 0 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3656, '18 0 18 1 24 24 -1 0 0 0 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3657, '18 0 2 24 -1 0 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3658, '18 0 2 22 24 -1 0 0 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3659, '18 0 2 0 24 -1 0 0 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3660, '18 0 2 18 24 -1 0 0 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3661, '18 0 2 2 24 -1 0 0 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3662, '18 0 2 1 24 -1 0 0 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3663, '18 0 1 13 1 24 -1 0 0 0 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3664, '18 0 1 24 24 24 -1 0 0 0 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3665, '18 0 1 24 22 24 -1 0 0 0 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3666, '18 0 1 24 2 24 -1 0 0 0 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3667, '18 0 1 24 1 24 -1 0 0 0 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3668, '18 0 1 22 24 -1 0 0 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3669, '18 0 1 22 24 24 -1 0 0 0 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3670, '18 0 1 0 24 -1 0 0 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3671, '18 0 1 0 24 24 -1 0 0 0 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3672, '18 0 1 0 1 24 -1 0 0 0 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3673, '18 0 1 18 24 -1 0 0 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3674, '18 0 1 18 1 24 -1 0 0 0 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3675, '18 0 1 2 24 -1 0 0 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3676, '18 0 1 2 1 24 -1 0 0 0 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3677, '19 -1 0 -1 4 2');
INSERT INTO pagc_rules (id, rule) VALUES (3678, '19 1 -1 0 0 -1 4 6');
INSERT INTO pagc_rules (id, rule) VALUES (3679, '19 24 1 -1 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3680, '19 24 1 0 -1 0 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3681, '19 23 -1 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3682, '19 0 -1 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3683, '19 0 24 -1 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3684, '19 0 1 -1 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3685, '19 18 -1 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3686, '19 2 0 -1 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3687, '19 1 0 -1 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3688, '0 19 -1 0 0 -1 4 2');
INSERT INTO pagc_rules (id, rule) VALUES (3689, '0 19 1 -1 0 0 0 -1 4 6');
INSERT INTO pagc_rules (id, rule) VALUES (3690, '0 19 24 1 -1 0 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3691, '0 19 24 1 0 -1 0 0 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3692, '0 19 23 -1 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3693, '0 19 0 -1 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3694, '0 19 0 24 -1 0 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3695, '0 19 0 1 -1 0 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3696, '0 19 18 -1 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3697, '0 19 2 0 -1 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3698, '0 19 1 0 -1 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3699, '0 18 19 -1 0 0 0 -1 4 2');
INSERT INTO pagc_rules (id, rule) VALUES (3700, '0 18 19 1 -1 0 0 0 0 -1 4 6');
INSERT INTO pagc_rules (id, rule) VALUES (3701, '0 18 19 24 1 -1 0 0 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3702, '0 18 19 24 1 0 -1 0 0 0 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3703, '0 18 19 23 -1 0 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3704, '0 18 19 0 -1 0 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3705, '0 18 19 0 24 -1 0 0 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3706, '0 18 19 0 1 -1 0 0 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3707, '0 18 19 18 -1 0 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3708, '0 18 19 2 0 -1 0 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3709, '0 18 19 1 0 -1 0 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3710, '0 25 19 -1 0 0 0 -1 4 2');
INSERT INTO pagc_rules (id, rule) VALUES (3711, '0 25 19 1 -1 0 0 0 0 -1 4 6');
INSERT INTO pagc_rules (id, rule) VALUES (3712, '0 25 19 24 1 -1 0 0 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3713, '0 25 19 24 1 0 -1 0 0 0 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3714, '0 25 19 23 -1 0 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3715, '0 25 19 0 -1 0 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3716, '0 25 19 0 24 -1 0 0 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3717, '0 25 19 0 1 -1 0 0 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3718, '0 25 19 18 -1 0 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3719, '0 25 19 2 0 -1 0 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3720, '0 25 19 1 0 -1 0 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3721, '18 0 19 -1 0 0 0 -1 4 2');
INSERT INTO pagc_rules (id, rule) VALUES (3722, '18 0 19 1 -1 0 0 0 0 -1 4 6');
INSERT INTO pagc_rules (id, rule) VALUES (3723, '18 0 19 24 1 -1 0 0 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3724, '18 0 19 24 1 0 -1 0 0 0 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3725, '18 0 19 23 -1 0 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3726, '18 0 19 0 -1 0 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3727, '18 0 19 0 24 -1 0 0 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3728, '18 0 19 0 1 -1 0 0 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3729, '18 0 19 18 -1 0 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3730, '18 0 19 2 0 -1 0 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3731, '18 0 19 1 0 -1 0 0 0 0 -1 4 10');
INSERT INTO pagc_rules (id, rule) VALUES (3732, '23 -1 17 -1 4 7');
INSERT INTO pagc_rules (id, rule) VALUES (3733, '0 -1 17 -1 4 7');
INSERT INTO pagc_rules (id, rule) VALUES (3734, '18 -1 17 -1 4 7');
INSERT INTO pagc_rules (id, rule) VALUES (3735, '18 0 -1 17 17 -1 4 7');
INSERT INTO pagc_rules (id, rule) VALUES (3736, '18 18 -1 17 17 -1 4 7');
INSERT INTO pagc_rules (id, rule) VALUES (3737, '18 0 18 -1 17 17 17 -1 4 7');
INSERT INTO pagc_rules (id, rule) VALUES (3738, '21 -1 17 -1 4 7');
INSERT INTO pagc_rules (id, rule) VALUES (3739, '21 0 -1 17 17 -1 4 7');
INSERT INTO pagc_rules (id, rule) VALUES (3740, '25 -1 17 -1 4 7');
INSERT INTO pagc_rules (id, rule) VALUES (3741, '0 21 -1 17 17 -1 4 7');
INSERT INTO pagc_rules (id, rule) VALUES (3742, '0 0 -1 17 17 -1 4 7');
INSERT INTO pagc_rules (id, rule) VALUES (3743, '0 18 -1 17 17 -1 4 7');
INSERT INTO pagc_rules (id, rule) VALUES (3744, '0 1 -1 17 17 -1 4 7');
INSERT INTO pagc_rules (id, rule) VALUES (3745, '1 -1 17 -1 4 7');
INSERT INTO pagc_rules (id, rule) VALUES (3746, '16 -1 16 -1 4 7');
INSERT INTO pagc_rules (id, rule) VALUES (3747, '16 23 -1 16 17 -1 4 17');
INSERT INTO pagc_rules (id, rule) VALUES (3748, '16 0 -1 16 17 -1 4 17');
INSERT INTO pagc_rules (id, rule) VALUES (3749, '16 18 -1 16 17 -1 4 11');
INSERT INTO pagc_rules (id, rule) VALUES (3750, '16 18 0 -1 16 17 17 -1 4 7');
INSERT INTO pagc_rules (id, rule) VALUES (3751, '16 18 18 -1 16 17 17 -1 4 7');
INSERT INTO pagc_rules (id, rule) VALUES (3752, '16 18 0 18 -1 16 17 17 17 -1 4 7');
INSERT INTO pagc_rules (id, rule) VALUES (3753, '16 21 -1 16 17 -1 4 7');
INSERT INTO pagc_rules (id, rule) VALUES (3754, '16 21 0 -1 16 17 17 -1 4 7');
INSERT INTO pagc_rules (id, rule) VALUES (3755, '16 25 -1 16 17 -1 4 7');
INSERT INTO pagc_rules (id, rule) VALUES (3756, '16 0 21 -1 16 17 17 -1 4 7');
INSERT INTO pagc_rules (id, rule) VALUES (3757, '16 0 0 -1 16 17 17 -1 4 7');
INSERT INTO pagc_rules (id, rule) VALUES (3758, '16 0 18 -1 16 17 17 -1 4 7');
INSERT INTO pagc_rules (id, rule) VALUES (3759, '16 0 1 -1 16 17 17 -1 4 7');
INSERT INTO pagc_rules (id, rule) VALUES (3760, '16 1 -1 16 17 -1 4 7');
INSERT INTO pagc_rules (id, rule) VALUES (3761, '16 16 -1 16 16 -1 4 7');
INSERT INTO pagc_rules (id, rule) VALUES (3762, '16 16 23 -1 16 16 17 -1 4 17');
INSERT INTO pagc_rules (id, rule) VALUES (3763, '16 16 0 -1 16 16 17 -1 4 17');
INSERT INTO pagc_rules (id, rule) VALUES (3764, '16 16 18 -1 16 16 17 -1 4 11');
INSERT INTO pagc_rules (id, rule) VALUES (3765, '16 16 18 0 -1 16 16 17 17 -1 4 7');
INSERT INTO pagc_rules (id, rule) VALUES (3766, '16 16 18 18 -1 16 16 17 17 -1 4 7');
INSERT INTO pagc_rules (id, rule) VALUES (3767, '16 16 18 0 18 -1 16 16 17 17 17 -1 4 7');
INSERT INTO pagc_rules (id, rule) VALUES (3768, '16 16 21 -1 16 16 17 -1 4 7');
INSERT INTO pagc_rules (id, rule) VALUES (3769, '16 16 21 0 -1 16 16 17 17 -1 4 7');
INSERT INTO pagc_rules (id, rule) VALUES (3770, '16 16 25 -1 16 16 17 -1 4 7');
INSERT INTO pagc_rules (id, rule) VALUES (3771, '16 16 0 21 -1 16 16 17 17 -1 4 7');
INSERT INTO pagc_rules (id, rule) VALUES (3772, '16 16 0 0 -1 16 16 17 17 -1 4 7');
INSERT INTO pagc_rules (id, rule) VALUES (3773, '16 16 0 18 -1 16 16 17 17 -1 4 7');
INSERT INTO pagc_rules (id, rule) VALUES (3774, '16 16 0 1 -1 16 16 17 17 -1 4 7');
INSERT INTO pagc_rules (id, rule) VALUES (3775, '16 16 1 -1 16 16 17 -1 4 7');
INSERT INTO pagc_rules (id, rule) VALUES (3776, '17 -1 17 -1 4 17');
INSERT INTO pagc_rules (id, rule) VALUES (3777, '17 23 -1 17 17 -1 4 17');
INSERT INTO pagc_rules (id, rule) VALUES (3778, '17 0 -1 17 17 -1 4 17');
INSERT INTO pagc_rules (id, rule) VALUES (3779, '17 18 -1 17 17 -1 4 17');
INSERT INTO pagc_rules (id, rule) VALUES (3780, '17 18 0 -1 17 17 17 -1 4 17');
INSERT INTO pagc_rules (id, rule) VALUES (3781, '17 18 18 -1 17 17 17 -1 4 17');
INSERT INTO pagc_rules (id, rule) VALUES (3782, '17 18 0 18 -1 17 17 17 17 -1 4 17');
INSERT INTO pagc_rules (id, rule) VALUES (3783, '17 21 -1 17 17 -1 4 17');
INSERT INTO pagc_rules (id, rule) VALUES (3784, '17 21 0 -1 17 17 17 -1 4 17');
INSERT INTO pagc_rules (id, rule) VALUES (3785, '17 25 -1 17 17 -1 4 17');
INSERT INTO pagc_rules (id, rule) VALUES (3786, '17 0 21 -1 17 17 17 -1 4 17');
INSERT INTO pagc_rules (id, rule) VALUES (3787, '17 0 0 -1 17 17 17 -1 4 17');
INSERT INTO pagc_rules (id, rule) VALUES (3788, '17 0 18 -1 17 17 17 -1 4 17');
INSERT INTO pagc_rules (id, rule) VALUES (3789, '17 0 1 -1 17 17 17 -1 4 17');
INSERT INTO pagc_rules (id, rule) VALUES (3790, '17 1 -1 17 17 -1 4 17');
INSERT INTO pagc_rules (id, rule) VALUES (3791, '17 16 -1 17 16 -1 4 17');
INSERT INTO pagc_rules (id, rule) VALUES (3792, '17 16 23 -1 17 16 17 -1 4 17');
INSERT INTO pagc_rules (id, rule) VALUES (3793, '17 16 0 -1 17 16 17 -1 4 17');
INSERT INTO pagc_rules (id, rule) VALUES (3794, '17 16 18 -1 17 16 17 -1 4 17');
INSERT INTO pagc_rules (id, rule) VALUES (3795, '17 16 18 0 -1 17 16 17 17 -1 4 17');
INSERT INTO pagc_rules (id, rule) VALUES (3796, '17 16 18 18 -1 17 16 17 17 -1 4 17');
INSERT INTO pagc_rules (id, rule) VALUES (3797, '17 16 18 0 18 -1 17 16 17 17 17 -1 4 17');
INSERT INTO pagc_rules (id, rule) VALUES (3798, '17 16 21 -1 17 16 17 -1 4 17');
INSERT INTO pagc_rules (id, rule) VALUES (3799, '17 16 21 0 -1 17 16 17 17 -1 4 17');
INSERT INTO pagc_rules (id, rule) VALUES (3800, '17 16 25 -1 17 16 17 -1 4 17');
INSERT INTO pagc_rules (id, rule) VALUES (3801, '17 16 0 21 -1 17 16 17 17 -1 4 17');
INSERT INTO pagc_rules (id, rule) VALUES (3802, '17 16 0 0 -1 17 16 17 17 -1 4 17');
INSERT INTO pagc_rules (id, rule) VALUES (3803, '17 16 0 18 -1 17 16 17 17 -1 4 17');
INSERT INTO pagc_rules (id, rule) VALUES (3804, '17 16 0 1 -1 17 16 17 17 -1 4 17');
INSERT INTO pagc_rules (id, rule) VALUES (3805, '17 16 1 -1 17 16 17 -1 4 17');
INSERT INTO pagc_rules (id, rule) VALUES (3806, '17 16 16 -1 17 16 16 -1 4 17');
INSERT INTO pagc_rules (id, rule) VALUES (3807, '17 16 16 23 -1 17 16 16 17 -1 4 17');
INSERT INTO pagc_rules (id, rule) VALUES (3808, '17 16 16 0 -1 17 16 16 17 -1 4 17');
INSERT INTO pagc_rules (id, rule) VALUES (3809, '17 16 16 18 -1 17 16 16 17 -1 4 17');
INSERT INTO pagc_rules (id, rule) VALUES (3810, '17 16 16 18 0 -1 17 16 16 17 17 -1 4 17');
INSERT INTO pagc_rules (id, rule) VALUES (3811, '17 16 16 18 18 -1 17 16 16 17 17 -1 4 17');
INSERT INTO pagc_rules (id, rule) VALUES (3812, '17 16 16 18 0 18 -1 17 16 16 17 17 17 -1 4 17');
INSERT INTO pagc_rules (id, rule) VALUES (3813, '17 16 16 21 -1 17 16 16 17 -1 4 17');
INSERT INTO pagc_rules (id, rule) VALUES (3814, '17 16 16 21 0 -1 17 16 16 17 17 -1 4 17');
INSERT INTO pagc_rules (id, rule) VALUES (3815, '17 16 16 25 -1 17 16 16 17 -1 4 17');
INSERT INTO pagc_rules (id, rule) VALUES (3816, '17 16 16 0 21 -1 17 16 16 17 17 -1 4 17');
INSERT INTO pagc_rules (id, rule) VALUES (3817, '17 16 16 0 0 -1 17 16 16 17 17 -1 4 17');
INSERT INTO pagc_rules (id, rule) VALUES (3818, '17 16 16 0 18 -1 17 16 16 17 17 -1 4 17');
INSERT INTO pagc_rules (id, rule) VALUES (3819, '17 16 16 0 1 -1 17 16 16 17 17 -1 4 17');
INSERT INTO pagc_rules (id, rule) VALUES (3820, '17 16 16 1 -1 17 16 16 17 -1 4 17');
INSERT INTO pagc_rules (id, rule) VALUES (3821, '15 17 -1 17 17 -1 4 8');
INSERT INTO pagc_rules (id, rule) VALUES (3822, '15 17 23 -1 17 17 17 -1 4 8');
INSERT INTO pagc_rules (id, rule) VALUES (3823, '15 17 0 -1 17 17 17 -1 4 8');
INSERT INTO pagc_rules (id, rule) VALUES (3824, '15 17 18 -1 17 17 17 -1 4 8');
INSERT INTO pagc_rules (id, rule) VALUES (3825, '15 17 18 0 -1 17 17 17 17 -1 4 8');
INSERT INTO pagc_rules (id, rule) VALUES (3826, '15 17 18 18 -1 17 17 17 17 -1 4 8');
INSERT INTO pagc_rules (id, rule) VALUES (3827, '15 17 18 0 18 -1 17 17 17 17 17 -1 4 8');
INSERT INTO pagc_rules (id, rule) VALUES (3828, '15 17 21 -1 17 17 17 -1 4 8');
INSERT INTO pagc_rules (id, rule) VALUES (3829, '15 17 21 0 -1 17 17 17 17 -1 4 8');
INSERT INTO pagc_rules (id, rule) VALUES (3830, '15 17 25 -1 17 17 17 -1 4 8');
INSERT INTO pagc_rules (id, rule) VALUES (3831, '15 17 0 21 -1 17 17 17 17 -1 4 8');
INSERT INTO pagc_rules (id, rule) VALUES (3832, '15 17 0 0 -1 17 17 17 17 -1 4 8');
INSERT INTO pagc_rules (id, rule) VALUES (3833, '15 17 0 18 -1 17 17 17 17 -1 4 8');
INSERT INTO pagc_rules (id, rule) VALUES (3834, '15 17 0 1 -1 17 17 17 17 -1 4 8');
INSERT INTO pagc_rules (id, rule) VALUES (3835, '15 17 1 -1 17 17 17 -1 4 8');
INSERT INTO pagc_rules (id, rule) VALUES (3836, '15 17 16 -1 17 17 16 -1 4 8');
INSERT INTO pagc_rules (id, rule) VALUES (3837, '15 17 16 23 -1 17 17 16 17 -1 4 8');
INSERT INTO pagc_rules (id, rule) VALUES (3838, '15 17 16 0 -1 17 17 16 17 -1 4 8');
INSERT INTO pagc_rules (id, rule) VALUES (3839, '15 17 16 18 -1 17 17 16 17 -1 4 8');
INSERT INTO pagc_rules (id, rule) VALUES (3840, '15 17 16 18 0 -1 17 17 16 17 17 -1 4 8');
INSERT INTO pagc_rules (id, rule) VALUES (3841, '15 17 16 18 18 -1 17 17 16 17 17 -1 4 8');
INSERT INTO pagc_rules (id, rule) VALUES (3842, '15 17 16 18 0 18 -1 17 17 16 17 17 17 -1 4 8');
INSERT INTO pagc_rules (id, rule) VALUES (3843, '15 17 16 21 -1 17 17 16 17 -1 4 8');
INSERT INTO pagc_rules (id, rule) VALUES (3844, '15 17 16 21 0 -1 17 17 16 17 17 -1 4 8');
INSERT INTO pagc_rules (id, rule) VALUES (3845, '15 17 16 25 -1 17 17 16 17 -1 4 8');
INSERT INTO pagc_rules (id, rule) VALUES (3846, '15 17 16 0 21 -1 17 17 16 17 17 -1 4 8');
INSERT INTO pagc_rules (id, rule) VALUES (3847, '15 17 16 0 0 -1 17 17 16 17 17 -1 4 8');
INSERT INTO pagc_rules (id, rule) VALUES (3848, '15 17 16 0 18 -1 17 17 16 17 17 -1 4 8');
INSERT INTO pagc_rules (id, rule) VALUES (3849, '15 17 16 0 1 -1 17 17 16 17 17 -1 4 8');
INSERT INTO pagc_rules (id, rule) VALUES (3850, '15 17 16 1 -1 17 17 16 17 -1 4 8');
INSERT INTO pagc_rules (id, rule) VALUES (3851, '15 17 16 16 -1 17 17 16 16 -1 4 8');
INSERT INTO pagc_rules (id, rule) VALUES (3852, '15 17 16 16 23 -1 17 17 16 16 17 -1 4 8');
INSERT INTO pagc_rules (id, rule) VALUES (3853, '15 17 16 16 0 -1 17 17 16 16 17 -1 4 8');
INSERT INTO pagc_rules (id, rule) VALUES (3854, '15 17 16 16 18 -1 17 17 16 16 17 -1 4 8');
INSERT INTO pagc_rules (id, rule) VALUES (3855, '15 17 16 16 18 0 -1 17 17 16 16 17 17 -1 4 8');
INSERT INTO pagc_rules (id, rule) VALUES (3856, '15 17 16 16 18 18 -1 17 17 16 16 17 17 -1 4 8');
INSERT INTO pagc_rules (id, rule) VALUES (3857, '15 17 16 16 18 0 18 -1 17 17 16 16 17 17 17 -1 4 8');
INSERT INTO pagc_rules (id, rule) VALUES (3858, '15 17 16 16 21 -1 17 17 16 16 17 -1 4 8');
INSERT INTO pagc_rules (id, rule) VALUES (3859, '15 17 16 16 21 0 -1 17 17 16 16 17 17 -1 4 8');
INSERT INTO pagc_rules (id, rule) VALUES (3860, '15 17 16 16 25 -1 17 17 16 16 17 -1 4 8');
INSERT INTO pagc_rules (id, rule) VALUES (3861, '15 17 16 16 0 21 -1 17 17 16 16 17 17 -1 4 8');
INSERT INTO pagc_rules (id, rule) VALUES (3862, '15 17 16 16 0 0 -1 17 17 16 16 17 17 -1 4 8');
INSERT INTO pagc_rules (id, rule) VALUES (3863, '15 17 16 16 0 18 -1 17 17 16 16 17 17 -1 4 8');
INSERT INTO pagc_rules (id, rule) VALUES (3864, '15 17 16 16 0 1 -1 17 17 16 16 17 17 -1 4 8');
INSERT INTO pagc_rules (id, rule) VALUES (3865, '15 17 16 16 1 -1 17 17 16 16 17 -1 4 8');
INSERT INTO pagc_rules (id, rule) VALUES (3866, '17 17 -1 17 17 -1 4 16');
INSERT INTO pagc_rules (id, rule) VALUES (3867, '17 17 23 -1 17 17 17 -1 4 16');
INSERT INTO pagc_rules (id, rule) VALUES (3868, '17 17 0 -1 17 17 17 -1 4 16');
INSERT INTO pagc_rules (id, rule) VALUES (3869, '17 17 18 -1 17 17 17 -1 4 16');
INSERT INTO pagc_rules (id, rule) VALUES (3870, '17 17 18 0 -1 17 17 17 17 -1 4 16');
INSERT INTO pagc_rules (id, rule) VALUES (3871, '17 17 18 18 -1 17 17 17 17 -1 4 16');
INSERT INTO pagc_rules (id, rule) VALUES (3872, '17 17 18 0 18 -1 17 17 17 17 17 -1 4 16');
INSERT INTO pagc_rules (id, rule) VALUES (3873, '17 17 21 -1 17 17 17 -1 4 16');
INSERT INTO pagc_rules (id, rule) VALUES (3874, '17 17 21 0 -1 17 17 17 17 -1 4 16');
INSERT INTO pagc_rules (id, rule) VALUES (3875, '17 17 25 -1 17 17 17 -1 4 16');
INSERT INTO pagc_rules (id, rule) VALUES (3876, '17 17 0 21 -1 17 17 17 17 -1 4 16');
INSERT INTO pagc_rules (id, rule) VALUES (3877, '17 17 0 0 -1 17 17 17 17 -1 4 16');
INSERT INTO pagc_rules (id, rule) VALUES (3878, '17 17 0 18 -1 17 17 17 17 -1 4 16');
INSERT INTO pagc_rules (id, rule) VALUES (3879, '17 17 0 1 -1 17 17 17 17 -1 4 16');
INSERT INTO pagc_rules (id, rule) VALUES (3880, '17 17 1 -1 17 17 17 -1 4 16');
INSERT INTO pagc_rules (id, rule) VALUES (3881, '17 17 16 -1 17 17 16 -1 4 16');
INSERT INTO pagc_rules (id, rule) VALUES (3882, '17 17 16 23 -1 17 17 16 17 -1 4 16');
INSERT INTO pagc_rules (id, rule) VALUES (3883, '17 17 16 0 -1 17 17 16 17 -1 4 16');
INSERT INTO pagc_rules (id, rule) VALUES (3884, '17 17 16 18 -1 17 17 16 17 -1 4 16');
INSERT INTO pagc_rules (id, rule) VALUES (3885, '17 17 16 18 0 -1 17 17 16 17 17 -1 4 16');
INSERT INTO pagc_rules (id, rule) VALUES (3886, '17 17 16 18 18 -1 17 17 16 17 17 -1 4 16');
INSERT INTO pagc_rules (id, rule) VALUES (3887, '17 17 16 18 0 18 -1 17 17 16 17 17 17 -1 4 16');
INSERT INTO pagc_rules (id, rule) VALUES (3888, '17 17 16 21 -1 17 17 16 17 -1 4 16');
INSERT INTO pagc_rules (id, rule) VALUES (3889, '17 17 16 21 0 -1 17 17 16 17 17 -1 4 16');
INSERT INTO pagc_rules (id, rule) VALUES (3890, '17 17 16 25 -1 17 17 16 17 -1 4 16');
INSERT INTO pagc_rules (id, rule) VALUES (3891, '17 17 16 0 21 -1 17 17 16 17 17 -1 4 16');
INSERT INTO pagc_rules (id, rule) VALUES (3892, '17 17 16 0 0 -1 17 17 16 17 17 -1 4 16');
INSERT INTO pagc_rules (id, rule) VALUES (3893, '17 17 16 0 18 -1 17 17 16 17 17 -1 4 16');
INSERT INTO pagc_rules (id, rule) VALUES (3894, '17 17 16 0 1 -1 17 17 16 17 17 -1 4 16');
INSERT INTO pagc_rules (id, rule) VALUES (3895, '17 17 16 1 -1 17 17 16 17 -1 4 16');
INSERT INTO pagc_rules (id, rule) VALUES (3896, '17 17 16 16 -1 17 17 16 16 -1 4 16');
INSERT INTO pagc_rules (id, rule) VALUES (3897, '17 17 16 16 23 -1 17 17 16 16 17 -1 4 16');
INSERT INTO pagc_rules (id, rule) VALUES (3898, '17 17 16 16 0 -1 17 17 16 16 17 -1 4 16');
INSERT INTO pagc_rules (id, rule) VALUES (3899, '17 17 16 16 18 -1 17 17 16 16 17 -1 4 16');
INSERT INTO pagc_rules (id, rule) VALUES (3900, '17 17 16 16 18 0 -1 17 17 16 16 17 17 -1 4 16');
INSERT INTO pagc_rules (id, rule) VALUES (3901, '17 17 16 16 18 18 -1 17 17 16 16 17 17 -1 4 16');
INSERT INTO pagc_rules (id, rule) VALUES (3902, '17 17 16 16 18 0 18 -1 17 17 16 16 17 17 17 -1 4 16');
INSERT INTO pagc_rules (id, rule) VALUES (3903, '17 17 16 16 21 -1 17 17 16 16 17 -1 4 16');
INSERT INTO pagc_rules (id, rule) VALUES (3904, '17 17 16 16 21 0 -1 17 17 16 16 17 17 -1 4 16');
INSERT INTO pagc_rules (id, rule) VALUES (3905, '17 17 16 16 25 -1 17 17 16 16 17 -1 4 16');
INSERT INTO pagc_rules (id, rule) VALUES (3906, '17 17 16 16 0 21 -1 17 17 16 16 17 17 -1 4 16');
INSERT INTO pagc_rules (id, rule) VALUES (3907, '17 17 16 16 0 0 -1 17 17 16 16 17 17 -1 4 16');
INSERT INTO pagc_rules (id, rule) VALUES (3908, '17 17 16 16 0 18 -1 17 17 16 16 17 17 -1 4 16');
INSERT INTO pagc_rules (id, rule) VALUES (3909, '17 17 16 16 0 1 -1 17 17 16 16 17 17 -1 4 16');
INSERT INTO pagc_rules (id, rule) VALUES (3910, '17 17 16 16 1 -1 17 17 16 16 17 -1 4 16');
INSERT INTO pagc_rules (id, rule) VALUES (3911, '17 -1 17 -1 4 8');
INSERT INTO pagc_rules (id, rule) VALUES (3912, '15 17 -1 17 17 -1 4 8');
INSERT INTO pagc_rules (id, rule) VALUES (3913, '17 17 -1 17 17 -1 4 8');
INSERT INTO pagc_rules (id, rule) VALUES (3914, '23 17 -1 17 17 -1 4 8');
INSERT INTO pagc_rules (id, rule) VALUES (3915, '23 15 17 -1 17 17 17 -1 4 8');
INSERT INTO pagc_rules (id, rule) VALUES (3916, '23 17 17 -1 17 17 17 -1 4 8');
INSERT INTO pagc_rules (id, rule) VALUES (3917, '0 17 -1 17 17 -1 4 8');
INSERT INTO pagc_rules (id, rule) VALUES (3918, '0 15 17 -1 17 17 17 -1 4 8');
INSERT INTO pagc_rules (id, rule) VALUES (3919, '0 17 17 -1 17 17 17 -1 4 8');
INSERT INTO pagc_rules (id, rule) VALUES (3920, '18 17 -1 17 17 -1 4 8');
INSERT INTO pagc_rules (id, rule) VALUES (3921, '18 15 17 -1 17 17 17 -1 4 8');
INSERT INTO pagc_rules (id, rule) VALUES (3922, '18 17 17 -1 17 17 17 -1 4 8');
INSERT INTO pagc_rules (id, rule) VALUES (3923, '18 0 17 -1 17 17 17 -1 4 8');
INSERT INTO pagc_rules (id, rule) VALUES (3924, '18 0 15 17 -1 17 17 17 17 -1 4 8');
INSERT INTO pagc_rules (id, rule) VALUES (3925, '18 0 17 17 -1 17 17 17 17 -1 4 8');
INSERT INTO pagc_rules (id, rule) VALUES (3926, '18 18 17 -1 17 17 17 -1 4 8');
INSERT INTO pagc_rules (id, rule) VALUES (3927, '18 18 15 17 -1 17 17 17 17 -1 4 8');
INSERT INTO pagc_rules (id, rule) VALUES (3928, '18 18 17 17 -1 17 17 17 17 -1 4 8');
INSERT INTO pagc_rules (id, rule) VALUES (3929, '18 0 18 17 -1 17 17 17 17 -1 4 8');
INSERT INTO pagc_rules (id, rule) VALUES (3930, '18 0 18 15 17 -1 17 17 17 17 17 -1 4 8');
INSERT INTO pagc_rules (id, rule) VALUES (3931, '18 0 18 17 17 -1 17 17 17 17 17 -1 4 8');
INSERT INTO pagc_rules (id, rule) VALUES (3932, '21 17 -1 17 17 -1 4 8');
INSERT INTO pagc_rules (id, rule) VALUES (3933, '21 15 17 -1 17 17 17 -1 4 8');
INSERT INTO pagc_rules (id, rule) VALUES (3934, '21 17 17 -1 17 17 17 -1 4 8');
INSERT INTO pagc_rules (id, rule) VALUES (3935, '21 0 17 -1 17 17 17 -1 4 8');
INSERT INTO pagc_rules (id, rule) VALUES (3936, '21 0 15 17 -1 17 17 17 17 -1 4 8');
INSERT INTO pagc_rules (id, rule) VALUES (3937, '21 0 17 17 -1 17 17 17 17 -1 4 8');
INSERT INTO pagc_rules (id, rule) VALUES (3938, '25 17 -1 17 17 -1 4 8');
INSERT INTO pagc_rules (id, rule) VALUES (3939, '25 15 17 -1 17 17 17 -1 4 8');
INSERT INTO pagc_rules (id, rule) VALUES (3940, '25 17 17 -1 17 17 17 -1 4 8');
INSERT INTO pagc_rules (id, rule) VALUES (3941, '0 21 17 -1 17 17 17 -1 4 8');
INSERT INTO pagc_rules (id, rule) VALUES (3942, '0 21 15 17 -1 17 17 17 17 -1 4 8');
INSERT INTO pagc_rules (id, rule) VALUES (3943, '0 21 17 17 -1 17 17 17 17 -1 4 8');
INSERT INTO pagc_rules (id, rule) VALUES (3944, '0 0 17 -1 17 17 17 -1 4 8');
INSERT INTO pagc_rules (id, rule) VALUES (3945, '0 0 15 17 -1 17 17 17 17 -1 4 8');
INSERT INTO pagc_rules (id, rule) VALUES (3946, '0 0 17 17 -1 17 17 17 17 -1 4 8');
INSERT INTO pagc_rules (id, rule) VALUES (3947, '0 18 17 -1 17 17 17 -1 4 8');
INSERT INTO pagc_rules (id, rule) VALUES (3948, '0 18 15 17 -1 17 17 17 17 -1 4 8');
INSERT INTO pagc_rules (id, rule) VALUES (3949, '0 18 17 17 -1 17 17 17 17 -1 4 8');
INSERT INTO pagc_rules (id, rule) VALUES (3950, '0 1 17 -1 17 17 17 -1 4 8');
INSERT INTO pagc_rules (id, rule) VALUES (3951, '0 1 15 17 -1 17 17 17 17 -1 4 8');
INSERT INTO pagc_rules (id, rule) VALUES (3952, '0 1 17 17 -1 17 17 17 17 -1 4 8');
INSERT INTO pagc_rules (id, rule) VALUES (3953, '1 17 -1 17 17 -1 4 8');
INSERT INTO pagc_rules (id, rule) VALUES (3954, '1 15 17 -1 17 17 17 -1 4 8');
INSERT INTO pagc_rules (id, rule) VALUES (3955, '1 17 17 -1 17 17 17 -1 4 8');
INSERT INTO pagc_rules (id, rule) VALUES (3956, '16 17 -1 16 17 -1 4 8');
INSERT INTO pagc_rules (id, rule) VALUES (3957, '16 15 17 -1 16 17 17 -1 4 8');
INSERT INTO pagc_rules (id, rule) VALUES (3958, '16 17 17 -1 16 17 17 -1 4 8');
INSERT INTO pagc_rules (id, rule) VALUES (3959, '16 23 17 -1 16 17 17 -1 4 8');
INSERT INTO pagc_rules (id, rule) VALUES (3960, '16 23 15 17 -1 16 17 17 17 -1 4 8');
INSERT INTO pagc_rules (id, rule) VALUES (3961, '16 23 17 17 -1 16 17 17 17 -1 4 8');
INSERT INTO pagc_rules (id, rule) VALUES (3962, '16 0 17 -1 16 17 17 -1 4 8');
INSERT INTO pagc_rules (id, rule) VALUES (3963, '16 0 15 17 -1 16 17 17 17 -1 4 8');
INSERT INTO pagc_rules (id, rule) VALUES (3964, '16 0 17 17 -1 16 17 17 17 -1 4 8');
INSERT INTO pagc_rules (id, rule) VALUES (3965, '16 18 17 -1 16 17 17 -1 4 8');
INSERT INTO pagc_rules (id, rule) VALUES (3966, '16 18 15 17 -1 16 17 17 17 -1 4 8');
INSERT INTO pagc_rules (id, rule) VALUES (3967, '16 18 17 17 -1 16 17 17 17 -1 4 8');
INSERT INTO pagc_rules (id, rule) VALUES (3968, '16 18 0 17 -1 16 17 17 17 -1 4 8');
INSERT INTO pagc_rules (id, rule) VALUES (3969, '16 18 0 15 17 -1 16 17 17 17 17 -1 4 8');
INSERT INTO pagc_rules (id, rule) VALUES (3970, '16 18 0 17 17 -1 16 17 17 17 17 -1 4 8');
INSERT INTO pagc_rules (id, rule) VALUES (3971, '16 18 18 17 -1 16 17 17 17 -1 4 8');
INSERT INTO pagc_rules (id, rule) VALUES (3972, '16 18 18 15 17 -1 16 17 17 17 17 -1 4 8');
INSERT INTO pagc_rules (id, rule) VALUES (3973, '16 18 18 17 17 -1 16 17 17 17 17 -1 4 8');
INSERT INTO pagc_rules (id, rule) VALUES (3974, '16 18 0 18 17 -1 16 17 17 17 17 -1 4 8');
INSERT INTO pagc_rules (id, rule) VALUES (3975, '16 18 0 18 15 17 -1 16 17 17 17 17 17 -1 4 8');
INSERT INTO pagc_rules (id, rule) VALUES (3976, '16 18 0 18 17 17 -1 16 17 17 17 17 17 -1 4 8');
INSERT INTO pagc_rules (id, rule) VALUES (3977, '16 21 17 -1 16 17 17 -1 4 8');
INSERT INTO pagc_rules (id, rule) VALUES (3978, '16 21 15 17 -1 16 17 17 17 -1 4 8');
INSERT INTO pagc_rules (id, rule) VALUES (3979, '16 21 17 17 -1 16 17 17 17 -1 4 8');
INSERT INTO pagc_rules (id, rule) VALUES (3980, '16 21 0 17 -1 16 17 17 17 -1 4 8');
INSERT INTO pagc_rules (id, rule) VALUES (3981, '16 21 0 15 17 -1 16 17 17 17 17 -1 4 8');
INSERT INTO pagc_rules (id, rule) VALUES (3982, '16 21 0 17 17 -1 16 17 17 17 17 -1 4 8');
INSERT INTO pagc_rules (id, rule) VALUES (3983, '16 25 17 -1 16 17 17 -1 4 8');
INSERT INTO pagc_rules (id, rule) VALUES (3984, '16 25 15 17 -1 16 17 17 17 -1 4 8');
INSERT INTO pagc_rules (id, rule) VALUES (3985, '16 25 17 17 -1 16 17 17 17 -1 4 8');
INSERT INTO pagc_rules (id, rule) VALUES (3986, '16 0 21 17 -1 16 17 17 17 -1 4 8');
INSERT INTO pagc_rules (id, rule) VALUES (3987, '16 0 21 15 17 -1 16 17 17 17 17 -1 4 8');
INSERT INTO pagc_rules (id, rule) VALUES (3988, '16 0 21 17 17 -1 16 17 17 17 17 -1 4 8');
INSERT INTO pagc_rules (id, rule) VALUES (3989, '16 0 0 17 -1 16 17 17 17 -1 4 8');
INSERT INTO pagc_rules (id, rule) VALUES (3990, '16 0 0 15 17 -1 16 17 17 17 17 -1 4 8');
INSERT INTO pagc_rules (id, rule) VALUES (3991, '16 0 0 17 17 -1 16 17 17 17 17 -1 4 8');
INSERT INTO pagc_rules (id, rule) VALUES (3992, '16 0 18 17 -1 16 17 17 17 -1 4 8');
INSERT INTO pagc_rules (id, rule) VALUES (3993, '16 0 18 15 17 -1 16 17 17 17 17 -1 4 8');
INSERT INTO pagc_rules (id, rule) VALUES (3994, '16 0 18 17 17 -1 16 17 17 17 17 -1 4 8');
INSERT INTO pagc_rules (id, rule) VALUES (3995, '16 0 1 17 -1 16 17 17 17 -1 4 8');
INSERT INTO pagc_rules (id, rule) VALUES (3996, '16 0 1 15 17 -1 16 17 17 17 17 -1 4 8');
INSERT INTO pagc_rules (id, rule) VALUES (3997, '16 0 1 17 17 -1 16 17 17 17 17 -1 4 8');
INSERT INTO pagc_rules (id, rule) VALUES (3998, '16 1 17 -1 16 17 17 -1 4 8');
INSERT INTO pagc_rules (id, rule) VALUES (3999, '16 1 15 17 -1 16 17 17 17 -1 4 8');
INSERT INTO pagc_rules (id, rule) VALUES (4000, '16 1 17 17 -1 16 17 17 17 -1 4 8');
INSERT INTO pagc_rules (id, rule) VALUES (4001, '16 16 17 -1 16 16 17 -1 4 8');
INSERT INTO pagc_rules (id, rule) VALUES (4002, '16 16 15 17 -1 16 16 17 17 -1 4 8');
INSERT INTO pagc_rules (id, rule) VALUES (4003, '16 16 17 17 -1 16 16 17 17 -1 4 8');
INSERT INTO pagc_rules (id, rule) VALUES (4004, '16 16 23 17 -1 16 16 17 17 -1 4 8');
INSERT INTO pagc_rules (id, rule) VALUES (4005, '16 16 23 15 17 -1 16 16 17 17 17 -1 4 8');
INSERT INTO pagc_rules (id, rule) VALUES (4006, '16 16 23 17 17 -1 16 16 17 17 17 -1 4 8');
INSERT INTO pagc_rules (id, rule) VALUES (4007, '16 16 0 17 -1 16 16 17 17 -1 4 8');
INSERT INTO pagc_rules (id, rule) VALUES (4008, '16 16 0 15 17 -1 16 16 17 17 17 -1 4 8');
INSERT INTO pagc_rules (id, rule) VALUES (4009, '16 16 0 17 17 -1 16 16 17 17 17 -1 4 8');
INSERT INTO pagc_rules (id, rule) VALUES (4010, '16 16 18 17 -1 16 16 17 17 -1 4 8');
INSERT INTO pagc_rules (id, rule) VALUES (4011, '16 16 18 15 17 -1 16 16 17 17 17 -1 4 8');
INSERT INTO pagc_rules (id, rule) VALUES (4012, '16 16 18 17 17 -1 16 16 17 17 17 -1 4 8');
INSERT INTO pagc_rules (id, rule) VALUES (4013, '16 16 18 0 17 -1 16 16 17 17 17 -1 4 8');
INSERT INTO pagc_rules (id, rule) VALUES (4014, '16 16 18 0 15 17 -1 16 16 17 17 17 17 -1 4 8');
INSERT INTO pagc_rules (id, rule) VALUES (4015, '16 16 18 0 17 17 -1 16 16 17 17 17 17 -1 4 8');
INSERT INTO pagc_rules (id, rule) VALUES (4016, '16 16 18 18 17 -1 16 16 17 17 17 -1 4 8');
INSERT INTO pagc_rules (id, rule) VALUES (4017, '16 16 18 18 15 17 -1 16 16 17 17 17 17 -1 4 8');
INSERT INTO pagc_rules (id, rule) VALUES (4018, '16 16 18 18 17 17 -1 16 16 17 17 17 17 -1 4 8');
INSERT INTO pagc_rules (id, rule) VALUES (4019, '16 16 18 0 18 17 -1 16 16 17 17 17 17 -1 4 8');
INSERT INTO pagc_rules (id, rule) VALUES (4020, '16 16 18 0 18 15 17 -1 16 16 17 17 17 17 17 -1 4 8');
INSERT INTO pagc_rules (id, rule) VALUES (4021, '16 16 18 0 18 17 17 -1 16 16 17 17 17 17 17 -1 4 8');
INSERT INTO pagc_rules (id, rule) VALUES (4022, '16 16 21 17 -1 16 16 17 17 -1 4 8');
INSERT INTO pagc_rules (id, rule) VALUES (4023, '16 16 21 15 17 -1 16 16 17 17 17 -1 4 8');
INSERT INTO pagc_rules (id, rule) VALUES (4024, '16 16 21 17 17 -1 16 16 17 17 17 -1 4 8');
INSERT INTO pagc_rules (id, rule) VALUES (4025, '16 16 21 0 17 -1 16 16 17 17 17 -1 4 8');
INSERT INTO pagc_rules (id, rule) VALUES (4026, '16 16 21 0 15 17 -1 16 16 17 17 17 17 -1 4 8');
INSERT INTO pagc_rules (id, rule) VALUES (4027, '16 16 21 0 17 17 -1 16 16 17 17 17 17 -1 4 8');
INSERT INTO pagc_rules (id, rule) VALUES (4028, '16 16 25 17 -1 16 16 17 17 -1 4 8');
INSERT INTO pagc_rules (id, rule) VALUES (4029, '16 16 25 15 17 -1 16 16 17 17 17 -1 4 8');
INSERT INTO pagc_rules (id, rule) VALUES (4030, '16 16 25 17 17 -1 16 16 17 17 17 -1 4 8');
INSERT INTO pagc_rules (id, rule) VALUES (4031, '16 16 0 21 17 -1 16 16 17 17 17 -1 4 8');
INSERT INTO pagc_rules (id, rule) VALUES (4032, '16 16 0 21 15 17 -1 16 16 17 17 17 17 -1 4 8');
INSERT INTO pagc_rules (id, rule) VALUES (4033, '16 16 0 21 17 17 -1 16 16 17 17 17 17 -1 4 8');
INSERT INTO pagc_rules (id, rule) VALUES (4034, '16 16 0 0 17 -1 16 16 17 17 17 -1 4 8');
INSERT INTO pagc_rules (id, rule) VALUES (4035, '16 16 0 0 15 17 -1 16 16 17 17 17 17 -1 4 8');
INSERT INTO pagc_rules (id, rule) VALUES (4036, '16 16 0 0 17 17 -1 16 16 17 17 17 17 -1 4 8');
INSERT INTO pagc_rules (id, rule) VALUES (4037, '16 16 0 18 17 -1 16 16 17 17 17 -1 4 8');
INSERT INTO pagc_rules (id, rule) VALUES (4038, '16 16 0 18 15 17 -1 16 16 17 17 17 17 -1 4 8');
INSERT INTO pagc_rules (id, rule) VALUES (4039, '16 16 0 18 17 17 -1 16 16 17 17 17 17 -1 4 8');
INSERT INTO pagc_rules (id, rule) VALUES (4040, '16 16 0 1 17 -1 16 16 17 17 17 -1 4 8');
INSERT INTO pagc_rules (id, rule) VALUES (4041, '16 16 0 1 15 17 -1 16 16 17 17 17 17 -1 4 8');
INSERT INTO pagc_rules (id, rule) VALUES (4042, '16 16 0 1 17 17 -1 16 16 17 17 17 17 -1 4 8');
INSERT INTO pagc_rules (id, rule) VALUES (4043, '16 16 1 17 -1 16 16 17 17 -1 4 8');
INSERT INTO pagc_rules (id, rule) VALUES (4044, '16 16 1 15 17 -1 16 16 17 17 17 -1 4 8');
INSERT INTO pagc_rules (id, rule) VALUES (4045, '16 16 1 17 17 -1 16 16 17 17 17 -1 4 8');
INSERT INTO pagc_rules (id, rule) VALUES (4046, '12 -1 12 -1 0 3');
INSERT INTO pagc_rules (id, rule) VALUES (4047, '12 23 23 13 13 -1 12 -1 0 3');
INSERT INTO pagc_rules (id, rule) VALUES (4048, '12 0 -1 12 13 -1 0 3');
INSERT INTO pagc_rules (id, rule) VALUES (4049, '12 0 0 -1 12 13 13 -1 0 3');
INSERT INTO pagc_rules (id, rule) VALUES (4050, '12 27 -1 12 13 -1 0 3');
INSERT INTO pagc_rules (id, rule) VALUES (4051, '12 27 26 -1 12 13 13 -1 0 3');
INSERT INTO pagc_rules (id, rule) VALUES (4052, '12 28 -1 12 13 -1 0 3');
INSERT INTO pagc_rules (id, rule) VALUES (4053, '12 28 29 -1 12 13 13 -1 0 3');
INSERT INTO pagc_rules (id, rule) VALUES (4054, '23 23 13 13 -1 -1 0 14');
INSERT INTO pagc_rules (id, rule) VALUES (4055, '23 23 13 13 12 -1 12 -1 0 3');
INSERT INTO pagc_rules (id, rule) VALUES (4056, '0 -1 13 -1 0 14');
INSERT INTO pagc_rules (id, rule) VALUES (4057, '0 12 -1 13 12 -1 0 3');
INSERT INTO pagc_rules (id, rule) VALUES (4058, '0 0 -1 13 13 -1 0 14');
INSERT INTO pagc_rules (id, rule) VALUES (4059, '0 0 12 -1 13 13 12 -1 0 3');
INSERT INTO pagc_rules (id, rule) VALUES (4060, '27 -1 13 -1 0 14');
INSERT INTO pagc_rules (id, rule) VALUES (4061, '27 12 -1 13 12 -1 0 3');
INSERT INTO pagc_rules (id, rule) VALUES (4062, '27 26 -1 13 13 -1 0 14');
INSERT INTO pagc_rules (id, rule) VALUES (4063, '27 26 12 -1 13 13 12 -1 0 3');
INSERT INTO pagc_rules (id, rule) VALUES (4064, '28 -1 13 -1 0 14');
INSERT INTO pagc_rules (id, rule) VALUES (4065, '28 12 -1 13 12 -1 0 3');
INSERT INTO pagc_rules (id, rule) VALUES (4066, '28 29 -1 13 13 -1 0 14');
INSERT INTO pagc_rules (id, rule) VALUES (4067, '28 29 12 -1 13 13 12 -1 0 3');
INSERT INTO pagc_rules (id, rule) VALUES (4068, '11 -1 11 -1 0 3');
INSERT INTO pagc_rules (id, rule) VALUES (4069, '11 23 23 13 13 -1 11 -1 0 7');
INSERT INTO pagc_rules (id, rule) VALUES (4070, '11 0 -1 11 13 -1 0 7');
INSERT INTO pagc_rules (id, rule) VALUES (4071, '11 0 0 -1 11 13 13 -1 0 7');
INSERT INTO pagc_rules (id, rule) VALUES (4072, '11 27 -1 11 13 -1 0 7');
INSERT INTO pagc_rules (id, rule) VALUES (4073, '11 27 26 -1 11 13 13 -1 0 7');
INSERT INTO pagc_rules (id, rule) VALUES (4074, '11 28 -1 11 13 -1 0 7');
INSERT INTO pagc_rules (id, rule) VALUES (4075, '11 28 29 -1 11 13 13 -1 0 7');
INSERT INTO pagc_rules (id, rule) VALUES (4076, '10 -1 10 -1 0 5');
INSERT INTO pagc_rules (id, rule) VALUES (4077, '10 12 -1 10 12 -1 0 3');
INSERT INTO pagc_rules (id, rule) VALUES (4078, '10 12 23 23 13 13 -1 10 12 -1 0 3');
INSERT INTO pagc_rules (id, rule) VALUES (4079, '10 12 0 -1 10 12 13 -1 0 3');
INSERT INTO pagc_rules (id, rule) VALUES (4080, '10 12 0 0 -1 10 12 13 13 -1 0 3');
INSERT INTO pagc_rules (id, rule) VALUES (4081, '10 12 27 -1 10 12 13 -1 0 3');
INSERT INTO pagc_rules (id, rule) VALUES (4082, '10 12 27 26 -1 10 12 13 13 -1 0 3');
INSERT INTO pagc_rules (id, rule) VALUES (4083, '10 12 28 -1 10 12 13 -1 0 3');
INSERT INTO pagc_rules (id, rule) VALUES (4084, '10 12 28 29 -1 10 12 13 13 -1 0 3');
INSERT INTO pagc_rules (id, rule) VALUES (4085, '10 23 23 13 13 -1 10 -1 0 9');
INSERT INTO pagc_rules (id, rule) VALUES (4086, '10 23 23 13 13 12 -1 10 12 -1 0 3');
INSERT INTO pagc_rules (id, rule) VALUES (4087, '10 0 -1 10 13 -1 0 9');
INSERT INTO pagc_rules (id, rule) VALUES (4088, '10 0 12 -1 10 13 12 -1 0 3');
INSERT INTO pagc_rules (id, rule) VALUES (4089, '10 0 0 -1 10 13 13 -1 0 9');
INSERT INTO pagc_rules (id, rule) VALUES (4090, '10 0 0 12 -1 10 13 13 12 -1 0 3');
INSERT INTO pagc_rules (id, rule) VALUES (4091, '10 27 -1 10 13 -1 0 9');
INSERT INTO pagc_rules (id, rule) VALUES (4092, '10 27 12 -1 10 13 12 -1 0 3');
INSERT INTO pagc_rules (id, rule) VALUES (4093, '10 27 26 -1 10 13 13 -1 0 9');
INSERT INTO pagc_rules (id, rule) VALUES (4094, '10 27 26 12 -1 10 13 13 12 -1 0 3');
INSERT INTO pagc_rules (id, rule) VALUES (4095, '10 28 -1 10 13 -1 0 9');
INSERT INTO pagc_rules (id, rule) VALUES (4096, '10 28 12 -1 10 13 12 -1 0 3');
INSERT INTO pagc_rules (id, rule) VALUES (4097, '10 28 29 -1 10 13 13 -1 0 9');
INSERT INTO pagc_rules (id, rule) VALUES (4098, '10 28 29 12 -1 10 13 13 12 -1 0 3');
INSERT INTO pagc_rules (id, rule) VALUES (4099, '10 11 -1 10 11 -1 0 13');
INSERT INTO pagc_rules (id, rule) VALUES (4100, '10 11 12 -1 10 11 12 -1 0 15');
INSERT INTO pagc_rules (id, rule) VALUES (4101, '10 11 12 23 23 13 13 -1 10 11 12 -1 0 17');
INSERT INTO pagc_rules (id, rule) VALUES (4102, '10 11 12 0 -1 10 11 12 13 -1 0 17');
INSERT INTO pagc_rules (id, rule) VALUES (4103, '10 11 12 0 0 -1 10 11 12 13 13 -1 0 17');
INSERT INTO pagc_rules (id, rule) VALUES (4104, '10 11 12 27 -1 10 11 12 13 -1 0 17');
INSERT INTO pagc_rules (id, rule) VALUES (4105, '10 11 12 27 26 -1 10 11 12 13 13 -1 0 17');
INSERT INTO pagc_rules (id, rule) VALUES (4106, '10 11 12 28 -1 10 11 12 13 -1 0 17');
INSERT INTO pagc_rules (id, rule) VALUES (4107, '10 11 12 28 29 -1 10 11 12 13 13 -1 0 17');
INSERT INTO pagc_rules (id, rule) VALUES (4108, '10 11 23 23 13 13 -1 10 11 -1 0 16');
INSERT INTO pagc_rules (id, rule) VALUES (4109, '10 11 23 23 13 13 12 -1 10 11 12 -1 0 17');
INSERT INTO pagc_rules (id, rule) VALUES (4110, '10 11 0 -1 10 11 13 -1 0 16');
INSERT INTO pagc_rules (id, rule) VALUES (4111, '10 11 0 12 -1 10 11 13 12 -1 0 17');
INSERT INTO pagc_rules (id, rule) VALUES (4112, '10 11 0 0 -1 10 11 13 13 -1 0 16');
INSERT INTO pagc_rules (id, rule) VALUES (4113, '10 11 0 0 12 -1 10 11 13 13 12 -1 0 17');
INSERT INTO pagc_rules (id, rule) VALUES (4114, '10 11 27 -1 10 11 13 -1 0 16');
INSERT INTO pagc_rules (id, rule) VALUES (4115, '10 11 27 12 -1 10 11 13 12 -1 0 17');
INSERT INTO pagc_rules (id, rule) VALUES (4116, '10 11 27 26 -1 10 11 13 13 -1 0 16');
INSERT INTO pagc_rules (id, rule) VALUES (4117, '10 11 27 26 12 -1 10 11 13 13 12 -1 0 17');
INSERT INTO pagc_rules (id, rule) VALUES (4118, '10 11 28 -1 10 11 13 -1 0 16');
INSERT INTO pagc_rules (id, rule) VALUES (4119, '10 11 28 12 -1 10 11 13 12 -1 0 17');
INSERT INTO pagc_rules (id, rule) VALUES (4120, '10 11 28 29 -1 10 11 13 13 -1 0 16');
INSERT INTO pagc_rules (id, rule) VALUES (4121, '10 11 28 29 12 -1 10 11 13 13 12 -1 0 17');
INSERT INTO pagc_rules (id, rule) VALUES (4122, '1 -1 10 -1 0 5');
INSERT INTO pagc_rules (id, rule) VALUES (4123, '1 12 -1 10 12 -1 0 3');
INSERT INTO pagc_rules (id, rule) VALUES (4124, '1 12 23 23 13 13 -1 10 12 -1 0 3');
INSERT INTO pagc_rules (id, rule) VALUES (4125, '1 12 0 -1 10 12 13 -1 0 3');
INSERT INTO pagc_rules (id, rule) VALUES (4126, '1 12 0 0 -1 10 12 13 13 -1 0 3');
INSERT INTO pagc_rules (id, rule) VALUES (4127, '1 12 27 -1 10 12 13 -1 0 3');
INSERT INTO pagc_rules (id, rule) VALUES (4128, '1 12 27 26 -1 10 12 13 13 -1 0 3');
INSERT INTO pagc_rules (id, rule) VALUES (4129, '1 12 28 -1 10 12 13 -1 0 3');
INSERT INTO pagc_rules (id, rule) VALUES (4130, '1 12 28 29 -1 10 12 13 13 -1 0 3');
INSERT INTO pagc_rules (id, rule) VALUES (4131, '1 23 23 13 13 -1 10 -1 0 9');
INSERT INTO pagc_rules (id, rule) VALUES (4132, '1 23 23 13 13 12 -1 10 12 -1 0 3');
INSERT INTO pagc_rules (id, rule) VALUES (4133, '1 0 -1 10 13 -1 0 9');
INSERT INTO pagc_rules (id, rule) VALUES (4134, '1 0 12 -1 10 13 12 -1 0 3');
INSERT INTO pagc_rules (id, rule) VALUES (4135, '1 0 0 -1 10 13 13 -1 0 9');
INSERT INTO pagc_rules (id, rule) VALUES (4136, '1 0 0 12 -1 10 13 13 12 -1 0 3');
INSERT INTO pagc_rules (id, rule) VALUES (4137, '1 27 -1 10 13 -1 0 9');
INSERT INTO pagc_rules (id, rule) VALUES (4138, '1 27 12 -1 10 13 12 -1 0 3');
INSERT INTO pagc_rules (id, rule) VALUES (4139, '1 27 26 -1 10 13 13 -1 0 9');
INSERT INTO pagc_rules (id, rule) VALUES (4140, '1 27 26 12 -1 10 13 13 12 -1 0 3');
INSERT INTO pagc_rules (id, rule) VALUES (4141, '1 28 -1 10 13 -1 0 9');
INSERT INTO pagc_rules (id, rule) VALUES (4142, '1 28 12 -1 10 13 12 -1 0 3');
INSERT INTO pagc_rules (id, rule) VALUES (4143, '1 28 29 -1 10 13 13 -1 0 9');
INSERT INTO pagc_rules (id, rule) VALUES (4144, '1 28 29 12 -1 10 13 13 12 -1 0 3');
INSERT INTO pagc_rules (id, rule) VALUES (4145, '1 11 -1 10 11 -1 0 13');
INSERT INTO pagc_rules (id, rule) VALUES (4146, '1 11 12 -1 10 11 12 -1 0 15');
INSERT INTO pagc_rules (id, rule) VALUES (4147, '1 11 12 23 23 13 13 -1 10 11 12 -1 0 17');
INSERT INTO pagc_rules (id, rule) VALUES (4148, '1 11 12 0 -1 10 11 12 13 -1 0 17');
INSERT INTO pagc_rules (id, rule) VALUES (4149, '1 11 12 0 0 -1 10 11 12 13 13 -1 0 17');
INSERT INTO pagc_rules (id, rule) VALUES (4150, '1 11 12 27 -1 10 11 12 13 -1 0 17');
INSERT INTO pagc_rules (id, rule) VALUES (4151, '1 11 12 27 26 -1 10 11 12 13 13 -1 0 17');
INSERT INTO pagc_rules (id, rule) VALUES (4152, '1 11 12 28 -1 10 11 12 13 -1 0 17');
INSERT INTO pagc_rules (id, rule) VALUES (4153, '1 11 12 28 29 -1 10 11 12 13 13 -1 0 17');
INSERT INTO pagc_rules (id, rule) VALUES (4154, '1 11 23 23 13 13 -1 10 11 -1 0 16');
INSERT INTO pagc_rules (id, rule) VALUES (4155, '1 11 23 23 13 13 12 -1 10 11 12 -1 0 17');
INSERT INTO pagc_rules (id, rule) VALUES (4156, '1 11 0 -1 10 11 13 -1 0 16');
INSERT INTO pagc_rules (id, rule) VALUES (4157, '1 11 0 12 -1 10 11 13 12 -1 0 17');
INSERT INTO pagc_rules (id, rule) VALUES (4158, '1 11 0 0 -1 10 11 13 13 -1 0 16');
INSERT INTO pagc_rules (id, rule) VALUES (4159, '1 11 0 0 12 -1 10 11 13 13 12 -1 0 17');
INSERT INTO pagc_rules (id, rule) VALUES (4160, '1 11 27 -1 10 11 13 -1 0 16');
INSERT INTO pagc_rules (id, rule) VALUES (4161, '1 11 27 12 -1 10 11 13 12 -1 0 17');
INSERT INTO pagc_rules (id, rule) VALUES (4162, '1 11 27 26 -1 10 11 13 13 -1 0 16');
INSERT INTO pagc_rules (id, rule) VALUES (4163, '1 11 27 26 12 -1 10 11 13 13 12 -1 0 17');
INSERT INTO pagc_rules (id, rule) VALUES (4164, '1 11 28 -1 10 11 13 -1 0 16');
INSERT INTO pagc_rules (id, rule) VALUES (4165, '1 11 28 12 -1 10 11 13 12 -1 0 17');
INSERT INTO pagc_rules (id, rule) VALUES (4166, '1 11 28 29 -1 10 11 13 13 -1 0 16');
INSERT INTO pagc_rules (id, rule) VALUES (4167, '1 11 28 29 12 -1 10 11 13 13 12 -1 0 17');
INSERT INTO pagc_rules (id, rule) VALUES (4168, '22 1 -1 10 10 -1 0 5');
INSERT INTO pagc_rules (id, rule) VALUES (4169, '22 1 12 -1 10 10 12 -1 0 3');
INSERT INTO pagc_rules (id, rule) VALUES (4170, '22 1 12 23 23 13 13 -1 10 10 12 -1 0 3');
INSERT INTO pagc_rules (id, rule) VALUES (4171, '22 1 12 0 -1 10 10 12 13 -1 0 3');
INSERT INTO pagc_rules (id, rule) VALUES (4172, '22 1 12 0 0 -1 10 10 12 13 13 -1 0 3');
INSERT INTO pagc_rules (id, rule) VALUES (4173, '22 1 12 27 -1 10 10 12 13 -1 0 3');
INSERT INTO pagc_rules (id, rule) VALUES (4174, '22 1 12 27 26 -1 10 10 12 13 13 -1 0 3');
INSERT INTO pagc_rules (id, rule) VALUES (4175, '22 1 12 28 -1 10 10 12 13 -1 0 3');
INSERT INTO pagc_rules (id, rule) VALUES (4176, '22 1 12 28 29 -1 10 10 12 13 13 -1 0 3');
INSERT INTO pagc_rules (id, rule) VALUES (4177, '22 1 23 23 13 13 -1 10 10 -1 0 9');
INSERT INTO pagc_rules (id, rule) VALUES (4178, '22 1 23 23 13 13 12 -1 10 10 12 -1 0 3');
INSERT INTO pagc_rules (id, rule) VALUES (4179, '22 1 0 -1 10 10 13 -1 0 9');
INSERT INTO pagc_rules (id, rule) VALUES (4180, '22 1 0 12 -1 10 10 13 12 -1 0 3');
INSERT INTO pagc_rules (id, rule) VALUES (4181, '22 1 0 0 -1 10 10 13 13 -1 0 9');
INSERT INTO pagc_rules (id, rule) VALUES (4182, '22 1 0 0 12 -1 10 10 13 13 12 -1 0 3');
INSERT INTO pagc_rules (id, rule) VALUES (4183, '22 1 27 -1 10 10 13 -1 0 9');
INSERT INTO pagc_rules (id, rule) VALUES (4184, '22 1 27 12 -1 10 10 13 12 -1 0 3');
INSERT INTO pagc_rules (id, rule) VALUES (4185, '22 1 27 26 -1 10 10 13 13 -1 0 9');
INSERT INTO pagc_rules (id, rule) VALUES (4186, '22 1 27 26 12 -1 10 10 13 13 12 -1 0 3');
INSERT INTO pagc_rules (id, rule) VALUES (4187, '22 1 28 -1 10 10 13 -1 0 9');
INSERT INTO pagc_rules (id, rule) VALUES (4188, '22 1 28 12 -1 10 10 13 12 -1 0 3');
INSERT INTO pagc_rules (id, rule) VALUES (4189, '22 1 28 29 -1 10 10 13 13 -1 0 9');
INSERT INTO pagc_rules (id, rule) VALUES (4190, '22 1 28 29 12 -1 10 10 13 13 12 -1 0 3');
INSERT INTO pagc_rules (id, rule) VALUES (4191, '22 1 11 -1 10 10 11 -1 0 13');
INSERT INTO pagc_rules (id, rule) VALUES (4192, '22 1 11 12 -1 10 10 11 12 -1 0 15');
INSERT INTO pagc_rules (id, rule) VALUES (4193, '22 1 11 12 23 23 13 13 -1 10 10 11 12 -1 0 17');
INSERT INTO pagc_rules (id, rule) VALUES (4194, '22 1 11 12 0 -1 10 10 11 12 13 -1 0 17');
INSERT INTO pagc_rules (id, rule) VALUES (4195, '22 1 11 12 0 0 -1 10 10 11 12 13 13 -1 0 17');
INSERT INTO pagc_rules (id, rule) VALUES (4196, '22 1 11 12 27 -1 10 10 11 12 13 -1 0 17');
INSERT INTO pagc_rules (id, rule) VALUES (4197, '22 1 11 12 27 26 -1 10 10 11 12 13 13 -1 0 17');
INSERT INTO pagc_rules (id, rule) VALUES (4198, '22 1 11 12 28 -1 10 10 11 12 13 -1 0 17');
INSERT INTO pagc_rules (id, rule) VALUES (4199, '22 1 11 12 28 29 -1 10 10 11 12 13 13 -1 0 17');
INSERT INTO pagc_rules (id, rule) VALUES (4200, '22 1 11 23 23 13 13 -1 10 10 11 -1 0 16');
INSERT INTO pagc_rules (id, rule) VALUES (4201, '22 1 11 23 23 13 13 12 -1 10 10 11 12 -1 0 17');
INSERT INTO pagc_rules (id, rule) VALUES (4202, '22 1 11 0 -1 10 10 11 13 -1 0 16');
INSERT INTO pagc_rules (id, rule) VALUES (4203, '22 1 11 0 12 -1 10 10 11 13 12 -1 0 17');
INSERT INTO pagc_rules (id, rule) VALUES (4204, '22 1 11 0 0 -1 10 10 11 13 13 -1 0 16');
INSERT INTO pagc_rules (id, rule) VALUES (4205, '22 1 11 0 0 12 -1 10 10 11 13 13 12 -1 0 17');
INSERT INTO pagc_rules (id, rule) VALUES (4206, '22 1 11 27 -1 10 10 11 13 -1 0 16');
INSERT INTO pagc_rules (id, rule) VALUES (4207, '22 1 11 27 12 -1 10 10 11 13 12 -1 0 17');
INSERT INTO pagc_rules (id, rule) VALUES (4208, '22 1 11 27 26 -1 10 10 11 13 13 -1 0 16');
INSERT INTO pagc_rules (id, rule) VALUES (4209, '22 1 11 27 26 12 -1 10 10 11 13 13 12 -1 0 17');
INSERT INTO pagc_rules (id, rule) VALUES (4210, '22 1 11 28 -1 10 10 11 13 -1 0 16');
INSERT INTO pagc_rules (id, rule) VALUES (4211, '22 1 11 28 12 -1 10 10 11 13 12 -1 0 17');
INSERT INTO pagc_rules (id, rule) VALUES (4212, '22 1 11 28 29 -1 10 10 11 13 13 -1 0 16');
INSERT INTO pagc_rules (id, rule) VALUES (4213, '22 1 11 28 29 12 -1 10 10 11 13 13 12 -1 0 17');
INSERT INTO pagc_rules (id, rule) VALUES (4214, '1 22 -1 10 10 -1 0 5');
INSERT INTO pagc_rules (id, rule) VALUES (4215, '1 22 12 -1 10 10 12 -1 0 3');
INSERT INTO pagc_rules (id, rule) VALUES (4216, '1 22 12 23 23 13 13 -1 10 10 12 -1 0 3');
INSERT INTO pagc_rules (id, rule) VALUES (4217, '1 22 12 0 -1 10 10 12 13 -1 0 3');
INSERT INTO pagc_rules (id, rule) VALUES (4218, '1 22 12 0 0 -1 10 10 12 13 13 -1 0 3');
INSERT INTO pagc_rules (id, rule) VALUES (4219, '1 22 12 27 -1 10 10 12 13 -1 0 3');
INSERT INTO pagc_rules (id, rule) VALUES (4220, '1 22 12 27 26 -1 10 10 12 13 13 -1 0 3');
INSERT INTO pagc_rules (id, rule) VALUES (4221, '1 22 12 28 -1 10 10 12 13 -1 0 3');
INSERT INTO pagc_rules (id, rule) VALUES (4222, '1 22 12 28 29 -1 10 10 12 13 13 -1 0 3');
INSERT INTO pagc_rules (id, rule) VALUES (4223, '1 22 23 23 13 13 -1 10 10 -1 0 9');
INSERT INTO pagc_rules (id, rule) VALUES (4224, '1 22 23 23 13 13 12 -1 10 10 12 -1 0 3');
INSERT INTO pagc_rules (id, rule) VALUES (4225, '1 22 0 -1 10 10 13 -1 0 9');
INSERT INTO pagc_rules (id, rule) VALUES (4226, '1 22 0 12 -1 10 10 13 12 -1 0 3');
INSERT INTO pagc_rules (id, rule) VALUES (4227, '1 22 0 0 -1 10 10 13 13 -1 0 9');
INSERT INTO pagc_rules (id, rule) VALUES (4228, '1 22 0 0 12 -1 10 10 13 13 12 -1 0 3');
INSERT INTO pagc_rules (id, rule) VALUES (4229, '1 22 27 -1 10 10 13 -1 0 9');
INSERT INTO pagc_rules (id, rule) VALUES (4230, '1 22 27 12 -1 10 10 13 12 -1 0 3');
INSERT INTO pagc_rules (id, rule) VALUES (4231, '1 22 27 26 -1 10 10 13 13 -1 0 9');
INSERT INTO pagc_rules (id, rule) VALUES (4232, '1 22 27 26 12 -1 10 10 13 13 12 -1 0 3');
INSERT INTO pagc_rules (id, rule) VALUES (4233, '1 22 28 -1 10 10 13 -1 0 9');
INSERT INTO pagc_rules (id, rule) VALUES (4234, '1 22 28 12 -1 10 10 13 12 -1 0 3');
INSERT INTO pagc_rules (id, rule) VALUES (4235, '1 22 28 29 -1 10 10 13 13 -1 0 9');
INSERT INTO pagc_rules (id, rule) VALUES (4236, '1 22 28 29 12 -1 10 10 13 13 12 -1 0 3');
INSERT INTO pagc_rules (id, rule) VALUES (4237, '1 22 11 -1 10 10 11 -1 0 13');
INSERT INTO pagc_rules (id, rule) VALUES (4238, '1 22 11 12 -1 10 10 11 12 -1 0 15');
INSERT INTO pagc_rules (id, rule) VALUES (4239, '1 22 11 12 23 23 13 13 -1 10 10 11 12 -1 0 17');
INSERT INTO pagc_rules (id, rule) VALUES (4240, '1 22 11 12 0 -1 10 10 11 12 13 -1 0 17');
INSERT INTO pagc_rules (id, rule) VALUES (4241, '1 22 11 12 0 0 -1 10 10 11 12 13 13 -1 0 17');
INSERT INTO pagc_rules (id, rule) VALUES (4242, '1 22 11 12 27 -1 10 10 11 12 13 -1 0 17');
INSERT INTO pagc_rules (id, rule) VALUES (4243, '1 22 11 12 27 26 -1 10 10 11 12 13 13 -1 0 17');
INSERT INTO pagc_rules (id, rule) VALUES (4244, '1 22 11 12 28 -1 10 10 11 12 13 -1 0 17');
INSERT INTO pagc_rules (id, rule) VALUES (4245, '1 22 11 12 28 29 -1 10 10 11 12 13 13 -1 0 17');
INSERT INTO pagc_rules (id, rule) VALUES (4246, '1 22 11 23 23 13 13 -1 10 10 11 -1 0 16');
INSERT INTO pagc_rules (id, rule) VALUES (4247, '1 22 11 23 23 13 13 12 -1 10 10 11 12 -1 0 17');
INSERT INTO pagc_rules (id, rule) VALUES (4248, '1 22 11 0 -1 10 10 11 13 -1 0 16');
INSERT INTO pagc_rules (id, rule) VALUES (4249, '1 22 11 0 12 -1 10 10 11 13 12 -1 0 17');
INSERT INTO pagc_rules (id, rule) VALUES (4250, '1 22 11 0 0 -1 10 10 11 13 13 -1 0 16');
INSERT INTO pagc_rules (id, rule) VALUES (4251, '1 22 11 0 0 12 -1 10 10 11 13 13 12 -1 0 17');
INSERT INTO pagc_rules (id, rule) VALUES (4252, '1 22 11 27 -1 10 10 11 13 -1 0 16');
INSERT INTO pagc_rules (id, rule) VALUES (4253, '1 22 11 27 12 -1 10 10 11 13 12 -1 0 17');
INSERT INTO pagc_rules (id, rule) VALUES (4254, '1 22 11 27 26 -1 10 10 11 13 13 -1 0 16');
INSERT INTO pagc_rules (id, rule) VALUES (4255, '1 22 11 27 26 12 -1 10 10 11 13 13 12 -1 0 17');
INSERT INTO pagc_rules (id, rule) VALUES (4256, '1 22 11 28 -1 10 10 11 13 -1 0 16');
INSERT INTO pagc_rules (id, rule) VALUES (4257, '1 22 11 28 12 -1 10 10 11 13 12 -1 0 17');
INSERT INTO pagc_rules (id, rule) VALUES (4258, '1 22 11 28 29 -1 10 10 11 13 13 -1 0 16');
INSERT INTO pagc_rules (id, rule) VALUES (4259, '1 22 11 28 29 12 -1 10 10 11 13 13 12 -1 0 17');
INSERT INTO pagc_rules (id, rule) VALUES (4260, '2 1 -1 10 10 -1 0 5');
INSERT INTO pagc_rules (id, rule) VALUES (4261, '2 1 12 -1 10 10 12 -1 0 3');
INSERT INTO pagc_rules (id, rule) VALUES (4262, '2 1 12 23 23 13 13 -1 10 10 12 -1 0 3');
INSERT INTO pagc_rules (id, rule) VALUES (4263, '2 1 12 0 -1 10 10 12 13 -1 0 3');
INSERT INTO pagc_rules (id, rule) VALUES (4264, '2 1 12 0 0 -1 10 10 12 13 13 -1 0 3');
INSERT INTO pagc_rules (id, rule) VALUES (4265, '2 1 12 27 -1 10 10 12 13 -1 0 3');
INSERT INTO pagc_rules (id, rule) VALUES (4266, '2 1 12 27 26 -1 10 10 12 13 13 -1 0 3');
INSERT INTO pagc_rules (id, rule) VALUES (4267, '2 1 12 28 -1 10 10 12 13 -1 0 3');
INSERT INTO pagc_rules (id, rule) VALUES (4268, '2 1 12 28 29 -1 10 10 12 13 13 -1 0 3');
INSERT INTO pagc_rules (id, rule) VALUES (4269, '2 1 23 23 13 13 -1 10 10 -1 0 9');
INSERT INTO pagc_rules (id, rule) VALUES (4270, '2 1 23 23 13 13 12 -1 10 10 12 -1 0 3');
INSERT INTO pagc_rules (id, rule) VALUES (4271, '2 1 0 -1 10 10 13 -1 0 9');
INSERT INTO pagc_rules (id, rule) VALUES (4272, '2 1 0 12 -1 10 10 13 12 -1 0 3');
INSERT INTO pagc_rules (id, rule) VALUES (4273, '2 1 0 0 -1 10 10 13 13 -1 0 9');
INSERT INTO pagc_rules (id, rule) VALUES (4274, '2 1 0 0 12 -1 10 10 13 13 12 -1 0 3');
INSERT INTO pagc_rules (id, rule) VALUES (4275, '2 1 27 -1 10 10 13 -1 0 9');
INSERT INTO pagc_rules (id, rule) VALUES (4276, '2 1 27 12 -1 10 10 13 12 -1 0 3');
INSERT INTO pagc_rules (id, rule) VALUES (4277, '2 1 27 26 -1 10 10 13 13 -1 0 9');
INSERT INTO pagc_rules (id, rule) VALUES (4278, '2 1 27 26 12 -1 10 10 13 13 12 -1 0 3');
INSERT INTO pagc_rules (id, rule) VALUES (4279, '2 1 28 -1 10 10 13 -1 0 9');
INSERT INTO pagc_rules (id, rule) VALUES (4280, '2 1 28 12 -1 10 10 13 12 -1 0 3');
INSERT INTO pagc_rules (id, rule) VALUES (4281, '2 1 28 29 -1 10 10 13 13 -1 0 9');
INSERT INTO pagc_rules (id, rule) VALUES (4282, '2 1 28 29 12 -1 10 10 13 13 12 -1 0 3');
INSERT INTO pagc_rules (id, rule) VALUES (4283, '2 1 11 -1 10 10 11 -1 0 13');
INSERT INTO pagc_rules (id, rule) VALUES (4284, '2 1 11 12 -1 10 10 11 12 -1 0 15');
INSERT INTO pagc_rules (id, rule) VALUES (4285, '2 1 11 12 23 23 13 13 -1 10 10 11 12 -1 0 17');
INSERT INTO pagc_rules (id, rule) VALUES (4286, '2 1 11 12 0 -1 10 10 11 12 13 -1 0 17');
INSERT INTO pagc_rules (id, rule) VALUES (4287, '2 1 11 12 0 0 -1 10 10 11 12 13 13 -1 0 17');
INSERT INTO pagc_rules (id, rule) VALUES (4288, '2 1 11 12 27 -1 10 10 11 12 13 -1 0 17');
INSERT INTO pagc_rules (id, rule) VALUES (4289, '2 1 11 12 27 26 -1 10 10 11 12 13 13 -1 0 17');
INSERT INTO pagc_rules (id, rule) VALUES (4290, '2 1 11 12 28 -1 10 10 11 12 13 -1 0 17');
INSERT INTO pagc_rules (id, rule) VALUES (4291, '2 1 11 12 28 29 -1 10 10 11 12 13 13 -1 0 17');
INSERT INTO pagc_rules (id, rule) VALUES (4292, '2 1 11 23 23 13 13 -1 10 10 11 -1 0 16');
INSERT INTO pagc_rules (id, rule) VALUES (4293, '2 1 11 23 23 13 13 12 -1 10 10 11 12 -1 0 17');
INSERT INTO pagc_rules (id, rule) VALUES (4294, '2 1 11 0 -1 10 10 11 13 -1 0 16');
INSERT INTO pagc_rules (id, rule) VALUES (4295, '2 1 11 0 12 -1 10 10 11 13 12 -1 0 17');
INSERT INTO pagc_rules (id, rule) VALUES (4296, '2 1 11 0 0 -1 10 10 11 13 13 -1 0 16');
INSERT INTO pagc_rules (id, rule) VALUES (4297, '2 1 11 0 0 12 -1 10 10 11 13 13 12 -1 0 17');
INSERT INTO pagc_rules (id, rule) VALUES (4298, '2 1 11 27 -1 10 10 11 13 -1 0 16');
INSERT INTO pagc_rules (id, rule) VALUES (4299, '2 1 11 27 12 -1 10 10 11 13 12 -1 0 17');
INSERT INTO pagc_rules (id, rule) VALUES (4300, '2 1 11 27 26 -1 10 10 11 13 13 -1 0 16');
INSERT INTO pagc_rules (id, rule) VALUES (4301, '2 1 11 27 26 12 -1 10 10 11 13 13 12 -1 0 17');
INSERT INTO pagc_rules (id, rule) VALUES (4302, '2 1 11 28 -1 10 10 11 13 -1 0 16');
INSERT INTO pagc_rules (id, rule) VALUES (4303, '2 1 11 28 12 -1 10 10 11 13 12 -1 0 17');
INSERT INTO pagc_rules (id, rule) VALUES (4304, '2 1 11 28 29 -1 10 10 11 13 13 -1 0 16');
INSERT INTO pagc_rules (id, rule) VALUES (4305, '2 1 11 28 29 12 -1 10 10 11 13 13 12 -1 0 17');
INSERT INTO pagc_rules (id, rule) VALUES (4306, '1 2 -1 10 10 -1 0 5');
INSERT INTO pagc_rules (id, rule) VALUES (4307, '1 2 12 -1 10 10 12 -1 0 3');
INSERT INTO pagc_rules (id, rule) VALUES (4308, '1 2 12 23 23 13 13 -1 10 10 12 -1 0 3');
INSERT INTO pagc_rules (id, rule) VALUES (4309, '1 2 12 0 -1 10 10 12 13 -1 0 3');
INSERT INTO pagc_rules (id, rule) VALUES (4310, '1 2 12 0 0 -1 10 10 12 13 13 -1 0 3');
INSERT INTO pagc_rules (id, rule) VALUES (4311, '1 2 12 27 -1 10 10 12 13 -1 0 3');
INSERT INTO pagc_rules (id, rule) VALUES (4312, '1 2 12 27 26 -1 10 10 12 13 13 -1 0 3');
INSERT INTO pagc_rules (id, rule) VALUES (4313, '1 2 12 28 -1 10 10 12 13 -1 0 3');
INSERT INTO pagc_rules (id, rule) VALUES (4314, '1 2 12 28 29 -1 10 10 12 13 13 -1 0 3');
INSERT INTO pagc_rules (id, rule) VALUES (4315, '1 2 23 23 13 13 -1 10 10 -1 0 9');
INSERT INTO pagc_rules (id, rule) VALUES (4316, '1 2 23 23 13 13 12 -1 10 10 12 -1 0 3');
INSERT INTO pagc_rules (id, rule) VALUES (4317, '1 2 0 -1 10 10 13 -1 0 9');
INSERT INTO pagc_rules (id, rule) VALUES (4318, '1 2 0 12 -1 10 10 13 12 -1 0 3');
INSERT INTO pagc_rules (id, rule) VALUES (4319, '1 2 0 0 -1 10 10 13 13 -1 0 9');
INSERT INTO pagc_rules (id, rule) VALUES (4320, '1 2 0 0 12 -1 10 10 13 13 12 -1 0 3');
INSERT INTO pagc_rules (id, rule) VALUES (4321, '1 2 27 -1 10 10 13 -1 0 9');
INSERT INTO pagc_rules (id, rule) VALUES (4322, '1 2 27 12 -1 10 10 13 12 -1 0 3');
INSERT INTO pagc_rules (id, rule) VALUES (4323, '1 2 27 26 -1 10 10 13 13 -1 0 9');
INSERT INTO pagc_rules (id, rule) VALUES (4324, '1 2 27 26 12 -1 10 10 13 13 12 -1 0 3');
INSERT INTO pagc_rules (id, rule) VALUES (4325, '1 2 28 -1 10 10 13 -1 0 9');
INSERT INTO pagc_rules (id, rule) VALUES (4326, '1 2 28 12 -1 10 10 13 12 -1 0 3');
INSERT INTO pagc_rules (id, rule) VALUES (4327, '1 2 28 29 -1 10 10 13 13 -1 0 9');
INSERT INTO pagc_rules (id, rule) VALUES (4328, '1 2 28 29 12 -1 10 10 13 13 12 -1 0 3');
INSERT INTO pagc_rules (id, rule) VALUES (4329, '1 2 11 -1 10 10 11 -1 0 13');
INSERT INTO pagc_rules (id, rule) VALUES (4330, '1 2 11 12 -1 10 10 11 12 -1 0 15');
INSERT INTO pagc_rules (id, rule) VALUES (4331, '1 2 11 12 23 23 13 13 -1 10 10 11 12 -1 0 17');
INSERT INTO pagc_rules (id, rule) VALUES (4332, '1 2 11 12 0 -1 10 10 11 12 13 -1 0 17');
INSERT INTO pagc_rules (id, rule) VALUES (4333, '1 2 11 12 0 0 -1 10 10 11 12 13 13 -1 0 17');
INSERT INTO pagc_rules (id, rule) VALUES (4334, '1 2 11 12 27 -1 10 10 11 12 13 -1 0 17');
INSERT INTO pagc_rules (id, rule) VALUES (4335, '1 2 11 12 27 26 -1 10 10 11 12 13 13 -1 0 17');
INSERT INTO pagc_rules (id, rule) VALUES (4336, '1 2 11 12 28 -1 10 10 11 12 13 -1 0 17');
INSERT INTO pagc_rules (id, rule) VALUES (4337, '1 2 11 12 28 29 -1 10 10 11 12 13 13 -1 0 17');
INSERT INTO pagc_rules (id, rule) VALUES (4338, '1 2 11 23 23 13 13 -1 10 10 11 -1 0 16');
INSERT INTO pagc_rules (id, rule) VALUES (4339, '1 2 11 23 23 13 13 12 -1 10 10 11 12 -1 0 17');
INSERT INTO pagc_rules (id, rule) VALUES (4340, '1 2 11 0 -1 10 10 11 13 -1 0 16');
INSERT INTO pagc_rules (id, rule) VALUES (4341, '1 2 11 0 12 -1 10 10 11 13 12 -1 0 17');
INSERT INTO pagc_rules (id, rule) VALUES (4342, '1 2 11 0 0 -1 10 10 11 13 13 -1 0 16');
INSERT INTO pagc_rules (id, rule) VALUES (4343, '1 2 11 0 0 12 -1 10 10 11 13 13 12 -1 0 17');
INSERT INTO pagc_rules (id, rule) VALUES (4344, '1 2 11 27 -1 10 10 11 13 -1 0 16');
INSERT INTO pagc_rules (id, rule) VALUES (4345, '1 2 11 27 12 -1 10 10 11 13 12 -1 0 17');
INSERT INTO pagc_rules (id, rule) VALUES (4346, '1 2 11 27 26 -1 10 10 11 13 13 -1 0 16');
INSERT INTO pagc_rules (id, rule) VALUES (4347, '1 2 11 27 26 12 -1 10 10 11 13 13 12 -1 0 17');
INSERT INTO pagc_rules (id, rule) VALUES (4348, '1 2 11 28 -1 10 10 11 13 -1 0 16');
INSERT INTO pagc_rules (id, rule) VALUES (4349, '1 2 11 28 12 -1 10 10 11 13 12 -1 0 17');
INSERT INTO pagc_rules (id, rule) VALUES (4350, '1 2 11 28 29 -1 10 10 11 13 13 -1 0 16');
INSERT INTO pagc_rules (id, rule) VALUES (4351, '1 2 11 28 29 12 -1 10 10 11 13 13 12 -1 0 17');
INSERT INTO pagc_rules (id, rule) values (4352, '16 0 22 -1 16 17 17 -1 4 7');
INSERT INTO pagc_rules (id, rule) VALUES (4353, '0 1 6 -1 1 5 5 -1 1 9');
INSERT INTO pagc_rules (id, rule) VALUES (4355, '-1');

-- for some reason all rules are coming in as custom.  just force by id
UPDATE tiger.pagc_rules SET is_custom = false where id < 10000;
-- after insert we need to set back to true so all
-- user inputs are treated as custom
ALTER TABLE tiger.pagc_rules ALTER COLUMN is_custom SET DEFAULT true;
SELECT pg_catalog.setval('pagc_rules_id_seq', 10000, true);-- pagc_normalize_address(addressString)
-- This takes an address string and parses it into address (internal/street)
-- street name, type, direction prefix and suffix, location, state and
-- zip code, depending on what can be found in the string.
-- This is a drop in replacement for packaged normalize_address
-- that uses the pagc address standardizer C library instead
-- USAGE: SELECT * FROM tiger.pagc_normalize_address('One Devonshire Place, PH 301, Boston, MA 02109');
SELECT tiger.SetSearchPathForInstall('tiger');
CREATE FUNCTION pagc_normalize_address(in_rawinput character varying)
  RETURNS norm_addy AS
$$
DECLARE
  result norm_addy;
  var_rec RECORD;
  var_parse_rec RECORD;
  rawInput VARCHAR;

BEGIN
  result.parsed := FALSE;

  rawInput := trim(in_rawinput);
  var_parse_rec := parse_address(rawInput);
  result.location := var_parse_rec.city;
  result.stateAbbrev := trim(var_parse_rec.state);
  result.zip := var_parse_rec.zip;
  result.zip4 := NULLIF(var_parse_rec.zipplus,'');

 var_rec := standardize_address('pagc_lex'
       , 'pagc_gaz'
       , 'pagc_rules'
, COALESCE(var_parse_rec.address1,''),
   COALESCE(var_parse_rec.city,'') || COALESCE(', ' || var_parse_rec.state, '') || COALESCE(' ' || var_parse_rec.zip,'')  ) ;

 -- For address number only put numbers and stop if reach a non-number e.g. 123-456 will return 123
  result.address := to_number(substring(var_rec.house_num, '[0-9]+'), '99999999');
  result.address_alphanumeric := var_rec.house_num;
   --get rid of extraneous spaces before we return
  result.zip := COALESCE(var_rec.postcode,result.zip);
  result.streetName := trim(var_rec.name);
  result.location := trim(var_rec.city);
  result.stateAbbrev := trim(var_rec.state);
  --this should be broken out separately like pagc, but normalizer doesn't have a slot for it
  result.streettypeAbbrev := trim(COALESCE(var_rec.suftype, var_rec.pretype));
  result.preDirAbbrev := trim(var_rec.predir);
  result.postDirAbbrev := trim(var_rec.sufdir);
  result.internal := trim(regexp_replace(replace(var_rec.unit, '#',''), '([0-9]+)\s+([A-Za-z]){0,1}', E'\\1\\2'));
  result.parsed := TRUE;
  RETURN result;
END
$$
  LANGUAGE plpgsql IMMUTABLE STRICT
  COST 100; /***
 *
 * Copyright (C) 2011 Regina Obe and Leo Hsu (Paragon Corporation)
 **/
-- Note we are wrapping this in a function so we can make it immutable and thus useable in an index
-- It also allows us to shorten and possibly better cache the repetitive pattern in the code
-- greatest(to_number(b.fromhn,''99999999''),to_number(b.tohn,''99999999''))
-- and least(to_number(b.fromhn,''99999999''),to_number(b.tohn,''99999999''))
CREATE FUNCTION least_hn(fromhn varchar, tohn varchar)
  RETURNS integer AS
$$ SELECT least(to_number( CASE WHEN trim($1) ~ '^[0-9]+$' THEN $1 ELSE '0' END,'9999999'),to_number(CASE WHEN trim($2) ~ '^[0-9]+$' THEN $2 ELSE '0' END,'9999999') )::integer;  $$
  LANGUAGE sql IMMUTABLE
  COST 200;

-- Note we are wrapping this in a function so we can make it immutable (for some reason least and greatest aren't considered immutable)
-- and thu useable in an index or cacheable for multiple calls
CREATE FUNCTION greatest_hn(fromhn varchar, tohn varchar)
  RETURNS integer AS
$$ SELECT greatest(to_number( CASE WHEN trim($1) ~ '^[0-9]+$' THEN $1 ELSE '0' END,'99999999'),to_number(CASE WHEN trim($2) ~ '^[0-9]+$' THEN $2 ELSE '0' END,'99999999') )::integer;  $$
  LANGUAGE sql IMMUTABLE
  COST 200 PARALLEL SAFE;

-- Returns an absolute difference between two zips
-- This is generally more efficient than doing levenshtein
-- Since when people get the wrong zip, its usually off by one or 2 numeric distance
-- We only consider the first 5 digits
CREATE FUNCTION diff_zip(zip1 varchar, zip2 varchar)
  RETURNS integer AS
$$ SELECT abs(to_number( CASE WHEN trim(substring($1,1,5)) ~ '^[0-9]+$' THEN $1 ELSE '0' END,'99999')::integer - to_number( CASE WHEN trim(substring($2,1,5)) ~ '^[0-9]+$' THEN $2 ELSE '0' END,'99999')::integer )::integer;  $$
  LANGUAGE sql IMMUTABLE STRICT
  COST 200 PARALLEL SAFE;

-- function return  true or false if 2 numeric streets are equal such as 15th St, 23rd st
-- it compares just the numeric part of the street for equality
-- PURPOSE: handle bad formats such as 23th St so 23th St = 23rd St
-- as described in: http://trac.osgeo.org/postgis/ticket/1068
-- This will always return false if one of the streets is not a numeric street
-- By numeric it must start with numbers (allow fractions such as 1/2 and spaces such as 12 1/2th) and be less than 10 characters
CREATE FUNCTION numeric_streets_equal(input_street varchar, output_street varchar)
    RETURNS boolean AS
$$
    SELECT COALESCE(length($1) < 10 AND length($2) < 10
            AND $1 ~ E'^[0-9\/\s]+' AND $2 ~ E'^[0-9\/\s]+'
            AND  trim(substring($1, E'^[0-9\/\s]+')) = trim(substring($2, E'^[0-9\/\s]+')), false);
$$
LANGUAGE sql IMMUTABLE
COST 5 PARALLEL SAFE;

-- Generate script to drop all non-primary unique indexes on tiger and tiger_data tables
CREATE FUNCTION drop_indexes_generate_script(tiger_data_schema text DEFAULT 'tiger_data')
RETURNS text AS
$$
SELECT array_to_string(ARRAY(SELECT 'DROP INDEX ' || schemaname || '.' || indexname || ';'
FROM pg_catalog.pg_indexes  where schemaname IN('tiger',$1)  AND indexname NOT LIKE 'uidx%' AND indexname NOT LIKE 'pk_%' AND indexname NOT LIKE '%key'), E'\n');
$$
LANGUAGE sql STABLE;
-- Generate script to create missing indexes in tiger tables.
-- This will generate sql you can run to index commonly used join columns in geocoder for tiger and tiger_data schemas --
CREATE FUNCTION missing_indexes_generate_script()
RETURNS text AS
$$
SELECT array_to_string(ARRAY(
-- create unique index on faces for tfid seems to perform better --
SELECT 'CREATE UNIQUE INDEX uidx_' || c.table_schema || '_' || c.table_name || '_' || c.column_name || ' ON ' || c.table_schema || '.' || c.table_name || ' USING btree(' || c.column_name || ');' As index
FROM (SELECT table_name, table_schema  FROM
	information_schema.tables WHERE table_type = 'BASE TABLE') As t  INNER JOIN
	(SELECT * FROM information_schema.columns WHERE column_name IN('tfid') ) AS c
		ON (t.table_name = c.table_name AND t.table_schema = c.table_schema)
		LEFT JOIN pg_catalog.pg_indexes i ON
			(i.tablename = c.table_name AND i.schemaname = c.table_schema
				AND  indexname LIKE 'uidx%' || c.column_name || '%' )
WHERE i.tablename IS NULL AND c.table_schema IN('tiger','tiger_data') AND c.table_name LIKE '%faces'
UNION ALL
-- basic btree regular indexes
SELECT 'CREATE INDEX idx_' || c.table_schema || '_' || c.table_name || '_' || c.column_name || ' ON ' || c.table_schema || '.' || c.table_name || ' USING btree(' || c.column_name || ');' As index
FROM (SELECT table_name, table_schema  FROM
	information_schema.tables WHERE table_type = 'BASE TABLE') As t  INNER JOIN
	(SELECT * FROM information_schema.columns WHERE column_name IN('countyfp', 'tlid', 'tfidl', 'tfidr', 'tfid', 'zip', 'placefp', 'cousubfp') ) AS c
		ON (t.table_name = c.table_name AND t.table_schema = c.table_schema)
		LEFT JOIN pg_catalog.pg_indexes i ON
			(i.tablename = c.table_name AND i.schemaname = c.table_schema
				AND  indexdef LIKE '%' || c.column_name || '%' )
WHERE i.tablename IS NULL AND c.table_schema IN('tiger','tiger_data')  AND (NOT c.table_name LIKE '%faces')
-- Gist spatial indexes --
UNION ALL
SELECT 'CREATE INDEX idx_' || c.table_schema || '_' || c.table_name || '_' || c.column_name || '_gist ON ' || c.table_schema || '.' || c.table_name || ' USING gist(' || c.column_name || ');' As index
FROM (SELECT table_name, table_schema FROM
	information_schema.tables WHERE table_type = 'BASE TABLE') As t  INNER JOIN
	(SELECT * FROM information_schema.columns WHERE column_name IN('the_geom', 'geom') ) AS c
		ON (t.table_name = c.table_name AND t.table_schema = c.table_schema)
		LEFT JOIN pg_catalog.pg_indexes i ON
			(i.tablename = c.table_name AND i.schemaname = c.table_schema
				AND  indexdef LIKE '%' || c.column_name || '%')
WHERE i.tablename IS NULL AND c.table_schema IN('tiger','tiger_data')
-- Soundex indexes --
UNION ALL
SELECT 'CREATE INDEX idx_' || c.table_schema || '_' || c.table_name || '_snd_' || c.column_name || ' ON ' || c.table_schema || '.' || c.table_name || ' USING btree(soundex(' || c.column_name || '));' As index
FROM (SELECT table_name, table_schema FROM
	information_schema.tables WHERE table_type = 'BASE TABLE') As t  INNER JOIN
	(SELECT * FROM information_schema.columns WHERE column_name IN('name', 'place', 'city') ) AS c
		ON (t.table_name = c.table_name AND t.table_schema = c.table_schema)
		LEFT JOIN pg_catalog.pg_indexes i ON
			(i.tablename = c.table_name AND i.schemaname = c.table_schema
				AND  indexdef LIKE '%soundex(%' || c.column_name || '%' AND indexdef LIKE '%_snd_' || c.column_name || '%' )
WHERE i.tablename IS NULL AND c.table_schema IN('tiger','tiger_data')
    AND (c.table_name LIKE '%county%' OR c.table_name LIKE '%featnames'
    OR c.table_name  LIKE '%place' or c.table_name LIKE '%zip%'  or c.table_name LIKE '%cousub')
-- Lower indexes --
UNION ALL
SELECT 'CREATE INDEX idx_' || c.table_schema || '_' || c.table_name || '_lower_' || c.column_name || ' ON ' || c.table_schema || '.' || c.table_name || ' USING btree(lower(' || c.column_name || '));' As index
FROM (SELECT table_name, table_schema FROM
	information_schema.tables WHERE table_type = 'BASE TABLE') As t  INNER JOIN
	(SELECT * FROM information_schema.columns WHERE column_name IN('name', 'place', 'city') ) AS c
		ON (t.table_name = c.table_name AND t.table_schema = c.table_schema)
		LEFT JOIN pg_catalog.pg_indexes i ON
			(i.tablename = c.table_name AND i.schemaname = c.table_schema
				AND  indexdef LIKE '%btree%(%lower(%' || c.column_name || '%')
WHERE i.tablename IS NULL AND c.table_schema IN('tiger','tiger_data')
    AND (c.table_name LIKE '%county%' OR c.table_name LIKE '%featnames' OR c.table_name  LIKE '%place' or c.table_name LIKE '%zip%' or c.table_name LIKE '%cousub')
-- Least address index btree least_hn(fromhn, tohn)
UNION ALL
SELECT 'CREATE INDEX idx_' || c.table_schema || '_' || c.table_name || '_least_address' || ' ON ' || c.table_schema || '.' || c.table_name || ' USING btree(least_hn(fromhn, tohn));' As index
FROM (SELECT table_name, table_schema FROM
	information_schema.tables WHERE table_type = 'BASE TABLE' AND table_name LIKE '%addr' AND table_schema IN('tiger','tiger_data')) As t  INNER JOIN
	(SELECT * FROM information_schema.columns WHERE column_name IN('fromhn') ) AS c
		ON (t.table_name = c.table_name AND t.table_schema = c.table_schema)
		LEFT JOIN pg_catalog.pg_indexes i ON
			(i.tablename = c.table_name AND i.schemaname = c.table_schema
				AND  indexdef LIKE '%least_hn(%' || c.column_name || '%')
WHERE i.tablename IS NULL
-- var_ops lower --
UNION ALL
SELECT 'CREATE INDEX idx_' || c.table_schema || '_' || c.table_name || '_l' || c.column_name || '_var_ops' || ' ON ' || c.table_schema || '.' || c.table_name || ' USING btree(lower(' || c.column_name || ') varchar_pattern_ops);' As index
FROM (SELECT table_name, table_schema FROM
	information_schema.tables WHERE table_type = 'BASE TABLE' AND (table_name LIKE '%featnames' or table_name LIKE '%place' or table_name LIKE '%zip_lookup_base' or table_name LIKE '%zip_state_loc') AND table_schema IN('tiger','tiger_data')) As t  INNER JOIN
	(SELECT * FROM information_schema.columns WHERE column_name IN('name', 'city', 'place', 'fullname') ) AS c
		ON (t.table_name = c.table_name AND t.table_schema = c.table_schema)
		LEFT JOIN pg_catalog.pg_indexes i ON
			(i.tablename = c.table_name AND i.schemaname = c.table_schema
				AND  indexdef LIKE '%btree%(%lower%' || c.column_name || ')%varchar_pattern_ops%')
WHERE i.tablename IS NULL
-- var_ops mtfcc --
/** UNION ALL
SELECT 'CREATE INDEX idx_' || c.table_schema || '_' || c.table_name || '_' || c.column_name || '_var_ops' || ' ON ' || c.table_schema || '.' || c.table_name || ' USING btree(' || c.column_name || ' varchar_pattern_ops);' As index
FROM (SELECT table_name, table_schema FROM
	information_schema.tables WHERE table_type = 'BASE TABLE' AND (table_name LIKE '%featnames' or table_name LIKE '%edges') AND table_schema IN('tiger','tiger_data')) As t  INNER JOIN
	(SELECT * FROM information_schema.columns WHERE column_name IN('mtfcc') ) AS c
		ON (t.table_name = c.table_name AND t.table_schema = c.table_schema)
		LEFT JOIN pg_catalog.pg_indexes i ON
			(i.tablename = c.table_name AND i.schemaname = c.table_schema
				AND  indexdef LIKE '%btree%(' || c.column_name || '%varchar_pattern_ops%')
WHERE i.tablename IS NULL **/
-- zipl zipr on edges --
UNION ALL
SELECT 'CREATE INDEX idx_' || c.table_schema || '_' || c.table_name || '_' || c.column_name || ' ON ' || c.table_schema || '.' || c.table_name || ' USING btree(' || c.column_name || ' );' As index
FROM (SELECT table_name, table_schema FROM
	information_schema.tables WHERE table_type = 'BASE TABLE' AND table_name LIKE '%edges' AND table_schema IN('tiger','tiger_data')) As t  INNER JOIN
	(SELECT * FROM information_schema.columns WHERE column_name IN('zipl', 'zipr') ) AS c
		ON (t.table_name = c.table_name AND t.table_schema = c.table_schema)
		LEFT JOIN pg_catalog.pg_indexes i ON
			(i.tablename = c.table_name AND i.schemaname = c.table_schema
				AND  indexdef LIKE '%btree%(' || c.column_name || '%)%')
WHERE i.tablename IS NULL

-- unique index on tlid state county --
/*UNION ALL
SELECT 'CREATE UNIQUE INDEX uidx_' || t.table_schema || '_' || t.table_name || '_tlid_statefp_countyfp ON ' || t.table_schema || '.' || t.table_name || ' USING btree(tlid,statefp,countyfp);' As index
FROM (SELECT table_name, table_schema FROM
	information_schema.tables WHERE table_type = 'BASE TABLE' AND table_name LIKE '%edges' AND table_schema IN('tiger','tiger_data')) As t
		LEFT JOIN pg_catalog.pg_indexes i ON
			(i.tablename = t.table_name AND i.schemaname = t.table_schema
				AND  indexdef LIKE '%btree%(%tlid,%statefp%countyfp%)%')
WHERE i.tablename IS NULL*/
--full text indexes on name field--
/**UNION ALL
SELECT 'CREATE INDEX idx_' || c.table_schema || '_' || c.table_name || '_fullname_ft_gist' || ' ON ' || c.table_schema || '.' || c.table_name || ' USING gist(to_tsvector(''english'',fullname))' As index
FROM (SELECT table_name, table_schema FROM
	information_schema.tables WHERE table_type = 'BASE TABLE' AND table_name LIKE '%featnames' AND table_schema IN('tiger','tiger_data')) As t  INNER JOIN
	(SELECT * FROM information_schema.columns WHERE column_name IN('fullname') ) AS c
		ON (t.table_name = c.table_name AND t.table_schema = c.table_schema)
		LEFT JOIN pg_catalog.pg_indexes i ON
			(i.tablename = c.table_name AND i.schemaname = c.table_schema
				AND  indexdef LIKE '%to_tsvector(%' || c.column_name || '%')
WHERE i.tablename IS NULL **/

-- trigram index --
/**UNION ALL
SELECT 'CREATE INDEX idx_' || c.table_schema || '_' || c.table_name || '_' || c.column_name || '_trgm_gist' || ' ON ' || c.table_schema || '.' || c.table_name || ' USING gist(' || c.column_name || ' gist_trgm_ops);' As index
FROM (SELECT table_name, table_schema FROM
	information_schema.tables WHERE table_type = 'BASE TABLE' AND table_name LIKE '%featnames' AND table_schema IN('tiger','tiger_data')) As t  INNER JOIN
	(SELECT * FROM information_schema.columns WHERE column_name IN('fullname', 'name') ) AS c
		ON (t.table_name = c.table_name AND t.table_schema = c.table_schema)
		LEFT JOIN pg_catalog.pg_indexes i ON
			(i.tablename = c.table_name AND i.schemaname = c.table_schema
				AND  indexdef LIKE '%gist%(' || c.column_name || '%gist_trgm_ops%')
WHERE i.tablename IS NULL **/
ORDER BY 1), E'\r');
$$
LANGUAGE sql VOLATILE;

CREATE FUNCTION install_missing_indexes() RETURNS boolean
AS
$$
DECLARE var_sql text = missing_indexes_generate_script();
BEGIN
	EXECUTE(var_sql);
	RETURN true;
END
$$
language plpgsql;

CREATE FUNCTION drop_dupe_featnames_generate_script() RETURNS text
AS
$$

SELECT array_to_string(ARRAY(SELECT 'CREATE TEMPORARY TABLE dup AS
SELECT min(f.gid) As min_gid, f.tlid, lower(f.fullname) As fname
	FROM ONLY ' || t.table_schema || '.' || t.table_name || ' As f
	GROUP BY f.tlid, lower(f.fullname)
	HAVING count(*) > 1;

DELETE FROM ' || t.table_schema || '.' || t.table_name || ' AS feat
WHERE EXISTS (SELECT tlid FROM dup WHERE feat.tlid = dup.tlid AND lower(feat.fullname) = dup.fname
		AND feat.gid > dup.min_gid);
DROP TABLE dup;
CREATE INDEX idx_' || t.table_schema || '_' || t.table_name || '_tlid ' || ' ON ' || t.table_schema || '.' || t.table_name || ' USING btree(tlid);
' As drop_sql_create_index
FROM (SELECT table_name, table_schema FROM
	information_schema.tables WHERE table_type = 'BASE TABLE' AND (table_name LIKE '%featnames' ) AND table_schema IN('tiger','tiger_data')) As t
		LEFT JOIN pg_catalog.pg_indexes i ON
			(i.tablename = t.table_name AND i.schemaname = t.table_schema
				AND  indexdef LIKE '%btree%(%tlid%')
WHERE i.tablename IS NULL) ,E'\r');

$$
LANGUAGE sql VOLATILE;

--DROP FUNCTION IF EXISTS zip_range(text,integer,integer);
-- Helper function that useful for catch slight mistakes in zip position given a 5 digit zip code
-- will return a range of zip codes that are between zip - num_before and zip - num_after
-- e.g. usage -> zip_range('02109', -1,+1) -> {'02108', '02109', '02110'}
CREATE FUNCTION zip_range(zip text, range_start integer, range_end integer) RETURNS varchar[] AS
$$
   SELECT ARRAY(
        SELECT lpad((to_number( CASE WHEN trim(substring($1,1,5)) ~ '^[0-9]+$' THEN $1 ELSE '0' END,'99999')::integer + i)::text, 5, '0')::varchar
        FROM generate_series($2, $3) As i );
$$
LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE;
-- rate_attributes(dirpA, dirpB, streetNameA, streetNameB, streetTypeA,
-- streetTypeB, dirsA, dirsB, locationA, locationB)
-- Rates the street based on the given attributes.  The locations must be
-- non-null.  The other eight values are handled by the other rate_attributes
-- function, so it's requirements must also be met.
-- changed: 2010-10-18 Regina Obe - all references to verbose to var_verbose since causes compile errors in 9.0
-- changed: 2011-06-25 revise to use real named args and fix direction rating typo
CREATE FUNCTION rate_attributes(dirpA VARCHAR, dirpB VARCHAR, streetNameA VARCHAR, streetNameB VARCHAR,
    streetTypeA VARCHAR, streetTypeB VARCHAR, dirsA VARCHAR, dirsB VARCHAR,  locationA VARCHAR, locationB VARCHAR, prequalabr VARCHAR) RETURNS INTEGER
AS $_$
DECLARE
  result INTEGER := 0;
  locationWeight INTEGER := 14;
  var_verbose BOOLEAN := FALSE;
BEGIN
  IF locationA IS NOT NULL AND locationB IS NOT NULL THEN
    result := levenshtein_ignore_case(locationA, locationB);
  ELSE
    IF var_verbose THEN
      RAISE NOTICE 'rate_attributes() - Location names cannot be null!';
    END IF;
    RETURN NULL;
  END IF;
  result := result + rate_attributes($1, $2, streetNameA, streetNameB, $5, $6, $7, $8,prequalabr);
  RETURN result;
END;
$_$ LANGUAGE plpgsql IMMUTABLE;

-- rate_attributes(dirpA, dirpB, streetNameA, streetNameB, streetTypeA,
-- streetTypeB, dirsA, dirsB)
-- Rates the street based on the given attributes.  Only streetNames are
-- required.  If any others are null (either A or B) they are treated as
-- empty strings.
CREATE OR REPLACE FUNCTION rate_attributes(dirpA VARCHAR, dirpB VARCHAR, streetNameA VARCHAR, streetNameB VARCHAR,
    streetTypeA VARCHAR, streetTypeB VARCHAR, dirsA VARCHAR, dirsB VARCHAR, prequalabr VARCHAR) RETURNS INTEGER
AS $_$
DECLARE
  result INTEGER := 0;
  directionWeight INTEGER := 2;
  nameWeight INTEGER := 10;
  typeWeight INTEGER := 5;
  var_verbose BOOLEAN := false;
BEGIN
  result := result + levenshtein_ignore_case(cull_null($1), cull_null($2)) * directionWeight;
  IF var_verbose THEN
    RAISE NOTICE 'streetNameA: %, streetNameB: %', streetNameA, streetNameB;
  END IF;
  IF streetNameA IS NOT NULL AND streetNameB IS NOT NULL THEN
    -- We want to treat numeric streets that have numerics as equal
    -- and not penalize if they are spelled different e.g. have ND instead of TH
    IF NOT numeric_streets_equal(streetNameA, streetNameB) THEN
        IF prequalabr IS NOT NULL THEN
            -- If the reference address (streetNameB) has a prequalabr streetNameA (prequalabr) - note: streetNameB usually comes thru without prequalabr
            -- and the input street (streetNameA) is lacking the prequal -- only penalize a little
            result := (result + levenshtein_ignore_case( trim( trim( lower(streetNameA),lower(prequalabr) ) ), trim( trim( lower(streetNameB),lower(prequalabr) ) ) )*nameWeight*0.75 + levenshtein_ignore_case(trim(streetNameA),prequalabr || ' ' ||  streetNameB) * nameWeight*0.25)::integer;
        ELSE
            result := result + levenshtein_ignore_case(streetNameA, streetNameB) * nameWeight;
        END IF;
    ELSE
    -- Penalize for numeric streets if one is completely numeric and the other is not
    -- This is to minimize on highways like 3A being matched with numbered streets since streets are usually number followed by 2 characters e.g nth ave and highways are just number with optional letter for name
        IF  (streetNameB ~ E'[a-zA-Z]{2,10}' AND NOT (streetNameA ~ E'[a-zA-Z]{2,10}') ) OR (streetNameA ~ E'[a-zA-Z]{2,10}' AND NOT (streetNameB ~ E'[a-zA-Z]{2,10}') ) THEN
            result := result + levenshtein_ignore_case(streetNameA, streetNameB) * nameWeight;
        END IF;
    END IF;
  ELSE
    IF var_verbose THEN
      RAISE NOTICE 'rate_attributes() - Street names cannot be null!';
    END IF;
    RETURN NULL;
  END IF;
  result := result + levenshtein_ignore_case(cull_null(streetTypeA), cull_null(streetTypeB)) *
      typeWeight;
  result := result + levenshtein_ignore_case(cull_null(dirsA), cull_null(dirsB)) *
      directionWeight;
  return result;
END;
$_$ LANGUAGE plpgsql IMMUTABLE;
-- This function requires the addresses to be grouped, such that the second and
-- third arguments are from one side of the street, and the fourth and fifth
-- from the other.
CREATE OR REPLACE FUNCTION includes_address(
    given_address INTEGER,
    addr1 INTEGER,
    addr2 INTEGER,
    addr3 INTEGER,
    addr4 INTEGER
) RETURNS BOOLEAN
AS $_$
DECLARE
  lmaxaddr INTEGER := -1;
  rmaxaddr INTEGER := -1;
  lminaddr INTEGER := -1;
  rminaddr INTEGER := -1;
  maxaddr INTEGER := -1;
  minaddr INTEGER := -1;
  verbose BOOLEAN := false;
BEGIN
  IF addr1 IS NOT NULL THEN
    maxaddr := addr1;
    minaddr := addr1;
    lmaxaddr := addr1;
    lminaddr := addr1;
  END IF;

  IF addr2 IS NOT NULL THEN
    IF addr2 < minaddr OR minaddr = -1 THEN
      minaddr := addr2;
    END IF;
    IF addr2 > maxaddr OR maxaddr = -1 THEN
      maxaddr := addr2;
    END IF;
    IF addr2 > lmaxaddr OR lmaxaddr = -1 THEN
      lmaxaddr := addr2;
    END IF;
    IF addr2 < lminaddr OR lminaddr = -1 THEN
      lminaddr := addr2;
    END IF;
  END IF;

  IF addr3 IS NOT NULL THEN
    IF addr3 < minaddr OR minaddr = -1 THEN
      minaddr := addr3;
    END IF;
    IF addr3 > maxaddr OR maxaddr = -1 THEN
      maxaddr := addr3;
    END IF;
    rmaxaddr := addr3;
    rminaddr := addr3;
  END IF;

  IF addr4 IS NOT NULL THEN
    IF addr4 < minaddr OR minaddr = -1 THEN
      minaddr := addr4;
    END IF;
    IF addr4 > maxaddr OR maxaddr = -1 THEN
      maxaddr := addr4;
    END IF;
    IF addr4 > rmaxaddr OR rmaxaddr = -1 THEN
      rmaxaddr := addr4;
    END IF;
    IF addr4 < rminaddr OR rminaddr = -1 THEN
      rminaddr := addr4;
    END IF;
  END IF;

  IF minaddr = -1 OR maxaddr = -1 THEN
    -- No addresses were non-null, return FALSE (arbitrary)
    RETURN FALSE;
  ELSIF given_address >= minaddr AND given_address <= maxaddr THEN
    -- The address is within the given range
    IF given_address >= lminaddr AND given_address <= lmaxaddr THEN
      -- This checks to see if the address is on this side of the
      -- road, ie if the address is even, the street range must be even
      IF (given_address % 2) = (lminaddr % 2)
          OR (given_address % 2) = (lmaxaddr % 2) THEN
        RETURN TRUE;
      END IF;
    END IF;
    IF given_address >= rminaddr AND given_address <= rmaxaddr THEN
      -- See above
      IF (given_address % 2) = (rminaddr % 2)
          OR (given_address % 2) = (rmaxaddr % 2) THEN
        RETURN TRUE;
      END IF;
    END IF;
  END IF;
  -- The address is not within the range
  RETURN FALSE;
END;
$_$ LANGUAGE plpgsql IMMUTABLE COST 20 PARALLEL SAFE;
-- interpolate_from_address(local_address, from_address_l, to_address_l, from_address_r, to_address_r, local_road)
-- This function returns a point along the given geometry (must be linestring)
-- corresponding to the given address.  If the given address is not within
-- the address range of the road, null is returned.
-- This function requires that the address be grouped, such that the second and
-- third arguments are from one side of the street, while the fourth and
-- fifth are from the other.
-- in_side Side of street -- either 'L', 'R' or if blank ignores side of road
-- in_offset_m -- number of meters offset to the side
CREATE OR REPLACE FUNCTION interpolate_from_address(given_address INTEGER, in_addr1 VARCHAR, in_addr2 VARCHAR, in_road GEOMETRY,
	in_side VARCHAR DEFAULT '',in_offset_m float DEFAULT 10) RETURNS GEOMETRY
AS $_$
DECLARE
  addrwidth INTEGER;
  part DOUBLE PRECISION;
  road GEOMETRY;
  result GEOMETRY;
  var_addr1 INTEGER; var_addr2 INTEGER;
  center_pt GEOMETRY; cl_pt GEOMETRY;
  npos integer;
  delx float; dely float;  x0 float; y0 float; x1 float; y1 float; az float;
  var_dist float; dir integer;
BEGIN
    IF in_road IS NULL THEN
        RETURN NULL;
    END IF;

	var_addr1 := to_number( CASE WHEN in_addr1 ~ '^[0-9]+$' THEN in_addr1 ELSE '0' END, '999999');
	var_addr2 := to_number( CASE WHEN in_addr2 ~ '^[0-9]+$' THEN in_addr2 ELSE '0' END, '999999');

    IF geometrytype(in_road) = 'LINESTRING' THEN
      road := ST_Transform(in_road, utmzone(ST_StartPoint(in_road)) );
    ELSIF geometrytype(in_road) = 'MULTILINESTRING' THEN
    	road := ST_GeometryN(in_road,1);
    	road := ST_Transform(road, utmzone(ST_StartPoint(road)) );
    ELSE
      RETURN NULL;
    END IF;

    addrwidth := greatest(var_addr1,var_addr2) - least(var_addr1,var_addr2);
    IF addrwidth = 0 or addrwidth IS NULL THEN
        addrwidth = 1;
    END IF;
    part := (given_address - least(var_addr1,var_addr2)) / trunc(addrwidth, 1);

    IF var_addr1 > var_addr2 THEN
        part := 1 - part;
    END IF;

    IF part < 0 OR part > 1 OR part IS NULL THEN
        part := 0.5;
    END IF;

    center_pt = ST_LineInterpolatePoint(road, part);
    IF in_side > '' AND in_offset_m > 0 THEN
    /** Compute point the point to the in_side of the geometry **/
    /**Take into consideration non-straight so we consider azimuth
    	of the 2 points that straddle the center location**/
    	IF part = 0 THEN
    		az := ST_Azimuth (ST_StartPoint(road), ST_PointN(road,2));
    	ELSIF part = 1 THEN
    		az := ST_Azimuth (ST_PointN(road,ST_NPoints(road) - 1), ST_EndPoint(road));
    	ELSE
    		/** Find the largest nth point position that is before the center point
    			This will be the start of our azimuth calc **/
    		SELECT i INTO npos
    			FROM generate_series(1,ST_NPoints(road)) As i
    					WHERE part > ST_LineLocatePoint(road,ST_PointN(road,i))
    					ORDER BY i DESC;
    		IF npos < ST_NPoints(road) THEN
    			az := ST_Azimuth (ST_PointN(road,npos), ST_PointN(road, npos + 1));
    		ELSE
    			az := ST_Azimuth (center_pt, ST_PointN(road, npos));
    		END IF;
    	END IF;

        dir := CASE WHEN az < pi() THEN -1 ELSE 1 END;
        --dir := 1;
        var_dist := in_offset_m*CASE WHEN in_side = 'L' THEN -1 ELSE 1 END;
        delx := ABS(COS(az)) * var_dist * dir;
        dely := ABS(SIN(az)) * var_dist * dir;
        IF az > pi()/2 AND az < pi() OR az > 3 * pi()/2 THEN
			result := ST_Translate(center_pt, delx, dely) ;
		ELSE
			result := ST_Translate(center_pt, -delx, dely);
		END IF;
    ELSE
    	result := center_pt;
    END IF;
    result :=  ST_Transform(result, ST_SRID(in_road));
    --RAISE NOTICE 'start: %, center: %, new: %, side: %, offset: %, az: %', ST_AsText(ST_Transform(ST_StartPoint(road),ST_SRID(in_road))), ST_AsText(ST_Transform(center_pt,ST_SRID(in_road))),ST_AsText(result), in_side, in_offset_m, az;
    RETURN result;
END;
$_$ LANGUAGE plpgsql IMMUTABLE COST 10 PARALLEL SAFE;
-- needed to ban stupid warning about how we are using deprecated functions
-- yada yada yada need this to work in 2.0 too bah
ALTER FUNCTION interpolate_from_address(integer, character varying, character varying, geometry, character varying, double precision)
  SET client_min_messages='ERROR';
--DROP FUNCTION IF EXISTS geocode_address(norm_addy, integer , geometry);
CREATE OR REPLACE FUNCTION geocode_address(IN parsed norm_addy, max_results integer DEFAULT 10, restrict_geom geometry DEFAULT NULL, OUT addy norm_addy, OUT geomout geometry, OUT rating integer)
  RETURNS SETOF record AS
$$
DECLARE
  results RECORD;
  zip_info RECORD;
  stmt VARCHAR;
  in_statefp VARCHAR;
  exact_street boolean := false;
  var_debug boolean := get_geocode_setting('debug_geocode_address')::boolean;
  var_sql text := '';
  var_n integer := 0;
  var_restrict_geom geometry := NULL;
  var_bfilter text := null;
  var_bestrating integer := NULL;
  var_zip_penalty numeric := get_geocode_setting('zip_penalty')::numeric*1.00;
BEGIN
  IF parsed.streetName IS NULL THEN
    -- A street name must be given.  Think about it.
    RETURN;
  END IF;

  ADDY.internal := parsed.internal;

  IF parsed.stateAbbrev IS NOT NULL THEN
    in_statefp := statefp FROM state_lookup As s WHERE s.abbrev = parsed.stateAbbrev;
  END IF;

  IF in_statefp IS NULL THEN
  --if state is not provided or was bogus, just pick the first where the zip is present
    in_statefp := statefp FROM zip_lookup_base WHERE zip = substring(parsed.zip,1,5) LIMIT 1;
  END IF;

  IF restrict_geom IS NOT NULL THEN
  		IF ST_SRID(restrict_geom) < 1 OR ST_SRID(restrict_geom) = 4236 THEN
  		-- basically has no srid or if wgs84 close enough to NAD 83 -- assume same as data
  			var_restrict_geom = ST_SetSRID(restrict_geom,4269);
  		ELSE
  		--transform and snap
  			var_restrict_geom = ST_SnapToGrid(ST_Transform(restrict_geom, 4269), 0.000001);
  		END IF;
  END IF;
  var_bfilter := ' SELECT zcta5ce FROM tiger.zcta5 AS zc
                    WHERE zc.statefp = ' || quote_nullable(in_statefp) || '
                        AND ST_Intersects(zc.the_geom, ' || quote_literal(var_restrict_geom::text) || '::geometry)  ' ;

  SELECT NULL::varchar[] As zip INTO zip_info;

  IF parsed.zip IS NOT NULL  THEN
  -- Create an array of 5 zips containing 2 before and 2 after our target if our streetName is longer
    IF length(parsed.streetName) > 7 THEN
        SELECT zip_range(parsed.zip, -2, 2) As zip INTO zip_info;
    ELSE
    -- If our street name is short, we'll run into many false positives so reduce our zip window a bit
        SELECT zip_range(parsed.zip, -1, 1) As zip INTO zip_info;
    END IF;
    --This signals bad zip input, only use the range if it falls in the place zip range
    IF length(parsed.zip) != 5 AND parsed.location IS NOT NULL THEN
         stmt := 'SELECT ARRAY(SELECT DISTINCT zip
          FROM tiger.zip_lookup_base AS z
         WHERE z.statefp = $1
               AND  z.zip = ANY($3) AND lower(z.city) LIKE lower($2) || ''%''::text '  || COALESCE(' AND z.zip IN(' || var_bfilter || ')', '') || ')::varchar[] AS zip ORDER BY zip' ;
         EXECUTE stmt INTO zip_info USING in_statefp, parsed.location, zip_info.zip;
         IF var_debug THEN
            RAISE NOTICE 'Bad zip newzip range: %', quote_nullable(zip_info.zip);
         END IF;
        IF array_upper(zip_info.zip,1) = 0 OR array_upper(zip_info.zip,1) IS NULL THEN
        -- zips do not fall in city ignore them
            IF var_debug THEN
                RAISE NOTICE 'Ignore new zip range that is bad too: %', quote_nullable(zip_info.zip);
            END IF;
            zip_info.zip = NULL::varchar[];
        END IF;
    END IF;
  END IF;
  IF zip_info.zip IS NULL THEN
  -- If no good zips just include all for the location
  -- We do a like instead of absolute check since tiger sometimes tacks things like Town at end of places
    stmt := 'SELECT ARRAY(SELECT DISTINCT zip
          FROM tiger.zip_lookup_base AS z
         WHERE z.statefp = $1
               AND  lower(z.city) LIKE lower($2) || ''%''::text '  || COALESCE(' AND z.zip IN(' || var_bfilter || ')', '') || ')::varchar[] AS zip ORDER BY zip' ;
    EXECUTE stmt INTO zip_info USING in_statefp, parsed.location;
    IF var_debug THEN
        RAISE NOTICE 'Zip range based on only considering city: %', quote_nullable(zip_info.zip);
    END IF;
  END IF;
   -- Brute force -- try to find perfect matches and exit if we have one
   -- we first pull all the names in zip and rank by if zip matches input zip and streetname matches street
  stmt := 'WITH a AS
  	( SELECT *
  		FROM (SELECT f.*, ad.side, ad.zip, ad.fromhn, ad.tohn,
  					RANK() OVER(ORDER BY ' || CASE WHEN parsed.zip > '' THEN ' diff_zip(ad.zip,$7)*$11 + ' ELSE '' END
						||' CASE WHEN lower(f.name) = lower($2) THEN 0 ELSE levenshtein_ignore_case(f.name, lower($2) )  END +
						levenshtein_ignore_case(f.fullname, lower($2 || '' '' || COALESCE($4,'''')) )
						+ CASE WHEN (greatest_hn(ad.fromhn,ad.tohn) % 2)::integer = ($1 % 2)::integer THEN 0 ELSE 1 END
						+ CASE WHEN $1::integer BETWEEN least_hn(ad.fromhn,ad.tohn) AND greatest_hn(ad.fromhn, ad.tohn)
							THEN 0 ELSE 4 END
							+ CASE WHEN lower($4) = lower(f.suftypabrv) OR lower($4) = lower(f.pretypabrv) THEN 0 ELSE 1 END
							+ rate_attributes($5, f.predirabrv,'
         || '    $2,  f.name , $4,'
         || '    suftypabrv , $6,'
         || '    sufdirabrv, prequalabr)
							)
						As rank
                		FROM tiger.featnames As f INNER JOIN tiger.addr As ad ON (f.tlid = ad.tlid)
                    WHERE $10 = f.statefp AND $10 = ad.statefp
                    	'
                    || CASE WHEN length(parsed.streetName) > 5  THEN ' AND (lower(f.fullname) LIKE (COALESCE($5 || '' '','''') || lower($2) || ''%'')::text OR lower(f.name) = lower($2) OR soundex(f.name) = soundex($2) ) ' ELSE  ' AND lower(f.name) = lower($2) ' END
                    || CASE WHEN zip_info.zip IS NOT NULL THEN '    AND ( ad.zip = ANY($9::varchar[]) )  ' ELSE '' END
            || ' ) AS foo ORDER BY rank LIMIT ' || max_results*3 || ' )
  	SELECT * FROM (
    SELECT DISTINCT ON (sub.predirabrv,sub.fename,COALESCE(sub.suftypabrv, sub.pretypabrv) ,sub.sufdirabrv,sub.place,s.stusps,sub.zip)'
         || '    sub.predirabrv   as fedirp,'
         || '    sub.fename,'
         || '    COALESCE(sub.suftypabrv, sub.pretypabrv)   as fetype,'
         || '    sub.sufdirabrv   as fedirs,'
         || '    sub.place ,'
         || '    s.stusps as state,'
         || '    sub.zip as zip,'
         || '    interpolate_from_address($1, sub.fromhn,'
         || '        sub.tohn, sub.the_geom, sub.side) as address_geom,'
         || '       (sub.sub_rating + '
         || CASE WHEN parsed.zip > '' THEN '  least(coalesce(diff_zip($7 , sub.zip),0), 20)*$11  '
            ELSE '1' END::text
         || ' + coalesce(levenshtein_ignore_case($3, sub.place),5) )::integer'
         || '    as sub_rating,'
         || '    sub.exact_address as exact_address, sub.tohn, sub.fromhn '
         || ' FROM ('
         || '  SELECT tlid, predirabrv, COALESCE(b.prequalabr || '' '','''' ) || b.name As fename, suftypabrv, sufdirabrv, fromhn, tohn,
                    side,  zip, rate_attributes($5, predirabrv,'
         || '    $2,  b.name , $4,'
         || '    suftypabrv , $6,'
         || '    sufdirabrv, prequalabr) + '
         || '    CASE '
         || '        WHEN $1::integer IS NULL OR b.fromhn IS NULL THEN 20'
         || '        WHEN $1::integer >= least_hn(b.fromhn, b.tohn) '
         || '            AND $1::integer <= greatest_hn(b.fromhn,b.tohn)'
         || '            AND ($1::integer % 2) = (to_number(b.fromhn,''99999999'') % 2)::integer'
         || '            THEN 0'
         || '        WHEN $1::integer >= least_hn(b.fromhn,b.tohn)'
         || '            AND $1::integer <= greatest_hn(b.fromhn,b.tohn)'
         || '            THEN 2'
         || '        ELSE'
         || '            ((1.0 - '
         ||              '(least_hn($1::text,least_hn(b.fromhn,b.tohn)::text)::numeric /'
         ||              ' (greatest(1,greatest_hn($1::text,greatest_hn(b.fromhn,b.tohn)::text))) )'
         ||              ') * 5)::integer + 5'
         || '        END::integer'
         || '    AS sub_rating,$1::integer >= least_hn(b.fromhn,b.tohn) '
         || '            AND $1::integer <= greatest_hn(b.fromhn,b.tohn) '
         || '            AND ($1 % 2)::numeric::integer = (to_number(b.fromhn,''99999999'') % 2)'
         || '    as exact_address, b.name, b.prequalabr, b.pretypabrv, b.tfidr, b.tfidl, b.the_geom, b.place '
         || '  FROM
             (SELECT   a.tlid, a.fullname, a.name, a.predirabrv, a.suftypabrv, a.sufdirabrv, a.prequalabr, a.pretypabrv,
                b.the_geom, tfidr, tfidl,
                a.side ,
                a.fromhn,
                a.tohn,
                a.zip,
                p.name as place

                FROM  a INNER JOIN tiger.edges As b ON (a.statefp = b.statefp AND a.tlid = b.tlid  '
               || ')
                    INNER JOIN tiger.faces AS f ON ($10 = f.statefp AND ( (b.tfidl = f.tfid AND a.side = ''L'') OR (b.tfidr = f.tfid AND a.side = ''R'' ) ))
                    INNER JOIN tiger.place p ON ($10 = p.statefp AND f.placefp = p.placefp '
          || CASE WHEN parsed.location > '' AND zip_info.zip IS NULL THEN ' AND ( lower(p.name) LIKE (lower($3::text) || ''%'')  ) ' ELSE '' END
          || ')
                WHERE a.statefp = $10  AND  b.statefp = $10   '
             ||   CASE WHEN var_restrict_geom IS NOT NULL THEN ' AND ST_Intersects(b.the_geom, $8::geometry) '  ELSE '' END
             || '

          )   As b
           ORDER BY 10 ,  11 DESC
           LIMIT 20
            ) AS sub
          JOIN tiger.state s ON ($10 = s.statefp)
            ORDER BY 1,2,3,4,5,6,7,9
          LIMIT 20) As foo ORDER BY sub_rating, exact_address DESC LIMIT  ' || max_results*10 ;

  IF var_debug THEN
         RAISE NOTICE 'stmt: %',
            replace( replace( replace(
                replace(
                replace(replace( replace(replace(replace(replace( replace(stmt,'$11', var_zip_penalty::text), '$10', quote_nullable(in_statefp) ), '$2',quote_nullable(parsed.streetName)),'$3',
                quote_nullable(parsed.location)), '$4', quote_nullable(parsed.streetTypeAbbrev) ),
                '$5', quote_nullable(parsed.preDirAbbrev) ),
                   '$6', quote_nullable(parsed.postDirAbbrev) ),
                   '$7', quote_nullable(parsed.zip) ),
                   '$8', quote_nullable(var_restrict_geom::text) ),
                   '$9', quote_nullable(zip_info.zip) ), '$1', quote_nullable(parsed.address) );
        --RAISE NOTICE 'PREPARE query_base_geo(integer, varchar,varchar,varchar,varchar,varchar,varchar,geometry,varchar[]) As %', stmt;
        --RAISE NOTICE 'EXECUTE query_base_geo(%,%,%,%,%,%,%,%,%); ', parsed.address,quote_nullable(parsed.streetName), quote_nullable(parsed.location), quote_nullable(parsed.streetTypeAbbrev), quote_nullable(parsed.preDirAbbrev), quote_nullable(parsed.postDirAbbrev), quote_nullable(parsed.zip), quote_nullable(var_restrict_geom::text), quote_nullable(zip_info.zip);
        --RAISE NOTICE 'DEALLOCATE query_base_geo;';
    END IF;
    FOR results IN EXECUTE stmt USING parsed.address,parsed.streetName, parsed.location, parsed.streetTypeAbbrev, parsed.preDirAbbrev, parsed.postDirAbbrev, parsed.zip, var_restrict_geom, zip_info.zip, in_statefp, var_zip_penalty LOOP

        -- If we found a match with an exact street, then don't bother
        -- trying to do non-exact matches

        exact_street := true;

        IF results.exact_address THEN
            ADDY.address := parsed.address;
        ELSE
            ADDY.address := CASE WHEN parsed.address > to_number(results.tohn,'99999999') AND parsed.address > to_number(results.fromhn, '99999999') THEN greatest_hn(results.fromhn, results.tohn)::integer
                ELSE least_hn(results.fromhn, results.tohn)::integer END ;
        END IF;

        ADDY.preDirAbbrev     := results.fedirp;
        ADDY.streetName       := results.fename;
        ADDY.streetTypeAbbrev := results.fetype;
        ADDY.postDirAbbrev    := results.fedirs;
        ADDY.location         := results.place;
        ADDY.stateAbbrev      := results.state;
        ADDY.zip              := results.zip;
        ADDY.parsed := TRUE;

        GEOMOUT := results.address_geom;
        RATING := results.sub_rating::integer;
        var_n := var_n + 1;

        IF var_bestrating IS NULL THEN
            var_bestrating := RATING; /** the first record to come is our best rating we will ever get **/
        END IF;

        -- Only consider matches with decent ratings
        IF RATING < 90 THEN
            RETURN NEXT;
        END IF;

        -- If we get an exact match, then just return that
        IF RATING = 0 THEN
            RETURN;
        END IF;

        IF var_n >= max_results AND RATING < 10  THEN --we have exceeded our desired limit and rating is not horrible
            RETURN;
        END IF;

    END LOOP;

    IF var_bestrating < 30 THEN --if we already have a match with a rating of 30 or less, its unlikely we can do any better
        RETURN;
    END IF;

-- There are a couple of different things to try, from the highest preference and falling back
  -- to lower-preference options.
  -- We start out with zip-code matching, where the zip code could possibly be in more than one
  -- state.  We loop through each state its in.
  -- Next, we try to find the location in our side-table, which is based off of the 'place' data exact first then sounds like
  -- Next, we look up the location/city and use the zip code which is returned from that
  -- Finally, if we didn't get a zip code or a city match, we fall back to just a location/street
  -- lookup to try and find *something* useful.
  -- In the end, we *have* to find a statefp, one way or another.
  var_sql :=
  ' SELECT statefp,location,a.zip,exact,min(pref) FROM
    (SELECT zip_state.statefp as statefp,$1 as location, true As exact, ARRAY[zip_state.zip] as zip,1 as pref
        FROM zip_state WHERE zip_state.zip = $2
            AND (' || quote_nullable(in_statefp) || ' IS NULL OR zip_state.statefp = ' || quote_nullable(in_statefp) || ')
          ' || COALESCE(' AND zip_state.zip IN(' || var_bfilter || ')', '') ||
        ' UNION SELECT zip_state_loc.statefp,zip_state_loc.place As location,false As exact, array_agg(zip_state_loc.zip) AS zip,1 + abs(COALESCE(diff_zip(max(zip), $2),0) - COALESCE(diff_zip(min(zip), $2),0))*$3 As pref
              FROM zip_state_loc
             WHERE zip_state_loc.statefp = ' || quote_nullable(in_statefp) || '
                   AND lower($1) = lower(zip_state_loc.place) '  || COALESCE(' AND zip_state_loc.zip IN(' || var_bfilter || ')', '') ||
        '     GROUP BY zip_state_loc.statefp,zip_state_loc.place
      UNION SELECT zip_state_loc.statefp,zip_state_loc.place As location,false As exact, array_agg(zip_state_loc.zip),3
              FROM zip_state_loc
             WHERE zip_state_loc.statefp = ' || quote_nullable(in_statefp) || '
                   AND soundex($1) = soundex(zip_state_loc.place)
             GROUP BY zip_state_loc.statefp,zip_state_loc.place
      UNION SELECT zip_lookup_base.statefp,zip_lookup_base.city As location,false As exact, array_agg(zip_lookup_base.zip),4
              FROM zip_lookup_base
             WHERE zip_lookup_base.statefp = ' || quote_nullable(in_statefp) || '
                         AND (soundex($1) = soundex(zip_lookup_base.city) OR soundex($1) = soundex(zip_lookup_base.county))
             GROUP BY zip_lookup_base.statefp,zip_lookup_base.city
      UNION SELECT ' || quote_nullable(in_statefp) || ' As statefp,$1 As location,false As exact,NULL, 5) as a '
      ' WHERE a.statefp IS NOT NULL
      GROUP BY statefp,location,a.zip,exact, pref ORDER BY exact desc, pref, zip';
  /** FOR zip_info IN     SELECT statefp,location,zip,exact,min(pref) FROM
    (SELECT zip_state.statefp as statefp,parsed.location as location, true As exact, ARRAY[zip_state.zip] as zip,1 as pref
        FROM zip_state WHERE zip_state.zip = parsed.zip
            AND (in_statefp IS NULL OR zip_state.statefp = in_statefp)
        UNION SELECT zip_state_loc.statefp,parsed.location,false As exact, array_agg(zip_state_loc.zip),2 + diff_zip(zip[1], parsed.zip)
              FROM zip_state_loc
             WHERE zip_state_loc.statefp = in_statefp
                   AND lower(parsed.location) = lower(zip_state_loc.place)
             GROUP BY zip_state_loc.statefp,parsed.location
      UNION SELECT zip_state_loc.statefp,parsed.location,false As exact, array_agg(zip_state_loc.zip),3
              FROM zip_state_loc
             WHERE zip_state_loc.statefp = in_statefp
                   AND soundex(parsed.location) = soundex(zip_state_loc.place)
             GROUP BY zip_state_loc.statefp,parsed.location
      UNION SELECT zip_lookup_base.statefp,parsed.location,false As exact, array_agg(zip_lookup_base.zip),4
              FROM zip_lookup_base
             WHERE zip_lookup_base.statefp = in_statefp
                         AND (soundex(parsed.location) = soundex(zip_lookup_base.city) OR soundex(parsed.location) = soundex(zip_lookup_base.county))
             GROUP BY zip_lookup_base.statefp,parsed.location
      UNION SELECT in_statefp,parsed.location,false As exact,NULL, 5) as a
        --JOIN (VALUES (true),(false)) as b(exact) on TRUE
      WHERE statefp IS NOT NULL
      GROUP BY statefp,location,zip,exact, pref ORDER BY exact desc, pref, zip  **/
  FOR zip_info IN EXECUTE var_sql USING parsed.location, parsed.zip, var_zip_penalty  LOOP
  -- For zip distance metric we consider both the distance of zip based on numeric as well aa levenshtein
  -- We use the prequalabr (these are like Old, that may or may not appear in front of the street name)
  -- We also treat pretypabr as fetype since in normalize we treat these as streetypes  and highways usually have the type here
  -- In pprint_addy we changed to put it in front if it is a is_hw type
    stmt := 'SELECT DISTINCT ON (sub.predirabrv,sub.fename,COALESCE(sub.suftypabrv, sub.pretypabrv) ,sub.sufdirabrv,coalesce(p.name,cs.name,zip.city,co.name),s.stusps,sub.zip)'
         || '    sub.predirabrv   as fedirp,'
         || '    sub.fename,'
         || '    COALESCE(sub.suftypabrv, sub.pretypabrv)   as fetype,'
         || '    sub.sufdirabrv   as fedirs,'
         || '    coalesce(p.name,cs.name,zip.city,co.name)::varchar as place,'
         || '    s.stusps as state,'
         || '    sub.zip as zip,'
         || '    interpolate_from_address($1, sub.fromhn,'
         || '        sub.tohn, e.the_geom, sub.side) as address_geom,'
         || '       (sub.sub_rating + '
         || CASE WHEN parsed.zip > '' THEN '  least((coalesce(diff_zip($7 , sub.zip),0) *$9)::integer, coalesce(levenshtein_ignore_case($7, sub.zip)*$9,0) ) '
            ELSE '3' END::text
         || ' + coalesce(least(levenshtein_ignore_case($3, coalesce(p.name,cs.name,zip.city,co.name)), levenshtein_ignore_case($3, coalesce(cs.name,co.name))),5) )::integer'
         || '    as sub_rating,'
         || '    sub.exact_address as exact_address '
         || ' FROM ('
         || '  SELECT a.tlid, predirabrv, COALESCE(a.prequalabr || '' '','''' ) || a.name As fename, suftypabrv, sufdirabrv, fromhn, tohn,
                    side, a.statefp, zip, rate_attributes($5, a.predirabrv,'
         || '    $2,  a.name , $4,'
         || '    a.suftypabrv , $6,'
         || '    a.sufdirabrv, a.prequalabr) + '
         || '    CASE '
         || '        WHEN $1::integer IS NULL OR b.fromhn IS NULL THEN 20'
         || '        WHEN $1::integer >= least_hn(b.fromhn, b.tohn) '
         || '            AND $1::integer <= greatest_hn(b.fromhn,b.tohn)'
         || '            AND ($1::integer % 2) = (to_number(b.fromhn,''99999999'') % 2)::integer'
         || '            THEN 0'
         || '        WHEN $1::integer >= least_hn(b.fromhn,b.tohn)'
         || '            AND $1::integer <= greatest_hn(b.fromhn,b.tohn)'
         || '            THEN 2'
         || '        ELSE'
         || '            ((1.0 - '
         ||              '(least_hn($1::text,least_hn(b.fromhn,b.tohn)::text)::numeric /'
         ||              ' greatest(1,greatest_hn($1::text,greatest_hn(b.fromhn,b.tohn)::text)))'
         ||              ') * 5)::integer + 5'
         || '        END'
         || '    as sub_rating,$1::integer >= least_hn(b.fromhn,b.tohn) '
         || '            AND $1::integer <= greatest_hn(b.fromhn,b.tohn) '
         || '            AND ($1 % 2)::numeric::integer = (to_number(b.fromhn,''99999999'') % 2)'
         || '    as exact_address, a.name, a.prequalabr, a.pretypabrv '
         || '  FROM tiger.featnames a join tiger.addr b ON (a.tlid = b.tlid AND a.statefp = b.statefp  )'
         || '  WHERE'
         || '        a.statefp = ' || quote_literal(zip_info.statefp) || ' AND a.mtfcc LIKE ''S%''  '
         || coalesce('    AND b.zip IN (''' || array_to_string(zip_info.zip,''',''') || ''') ','')
         || CASE WHEN zip_info.exact
                 THEN '    AND ( lower($2) = lower(a.name) OR  ( a.prequalabr > '''' AND trim(lower($2), lower(a.prequalabr) || '' '') = lower(a.name) ) OR numeric_streets_equal($2, a.name) ) '
                 ELSE '    AND ( soundex($2) = soundex(a.name)  OR ( (length($2) > 15 or (length($2) > 7 AND a.prequalabr > '''') ) AND lower(a.fullname) LIKE lower(substring($2,1,15)) || ''%'' ) OR  numeric_streets_equal($2, a.name) ) '
            END
         || '  ORDER BY 11'
         || '  LIMIT 200'
         || '    ) AS sub'
         || '  JOIN tiger.edges e ON (' || quote_literal(zip_info.statefp) || ' = e.statefp AND sub.tlid = e.tlid AND e.mtfcc LIKE ''S%'' '
         ||   CASE WHEN var_restrict_geom IS NOT NULL THEN ' AND ST_Intersects(e.the_geom, $8) '  ELSE '' END || ') '
         || '  JOIN tiger.state s ON (' || quote_literal(zip_info.statefp) || ' = s.statefp)'
         || '  JOIN tiger.faces f ON (' || quote_literal(zip_info.statefp) || ' = f.statefp AND (e.tfidl = f.tfid OR e.tfidr = f.tfid))'
         || '  LEFT JOIN tiger.zip_lookup_base zip ON (sub.zip = zip.zip AND zip.statefp=' || quote_literal(zip_info.statefp) || ')'
         || '  LEFT JOIN tiger.place p ON (' || quote_literal(zip_info.statefp) || ' = p.statefp AND f.placefp = p.placefp)'
         || '  LEFT JOIN tiger.county co ON (' || quote_literal(zip_info.statefp) || ' = co.statefp AND f.countyfp = co.countyfp)'
         || '  LEFT JOIN tiger.cousub cs ON (' || quote_literal(zip_info.statefp) || ' = cs.statefp AND cs.cosbidfp = sub.statefp || co.countyfp || f.cousubfp)'
         || ' WHERE'
         || '  ( (sub.side = ''L'' and e.tfidl = f.tfid) OR (sub.side = ''R'' and e.tfidr = f.tfid) ) '
         || ' ORDER BY 1,2,3,4,5,6,7,9'
         || ' LIMIT 10'
         ;
    IF var_debug THEN
        RAISE NOTICE '%', stmt;
        RAISE NOTICE 'PREPARE query_base_geo(integer, varchar,varchar,varchar,varchar,varchar,varchar,geometry,numeric) As %', stmt;
        RAISE NOTICE 'EXECUTE query_base_geo(%,%,%,%,%,%,%,%,%); ', parsed.address,quote_nullable(parsed.streetName), quote_nullable(parsed.location), quote_nullable(parsed.streetTypeAbbrev), quote_nullable(parsed.preDirAbbrev), quote_nullable(parsed.postDirAbbrev), quote_nullable(parsed.zip), quote_nullable(var_restrict_geom::text), quote_nullable(var_zip_penalty);
        RAISE NOTICE 'DEALLOCATE query_base_geo;';
    END IF;
    -- If we got an exact street match then when we hit the non-exact
    -- set of tests, just drop out.
    IF NOT zip_info.exact AND exact_street THEN
        RETURN;
    END IF;

    FOR results IN EXECUTE stmt USING parsed.address,parsed.streetName, parsed.location, parsed.streetTypeAbbrev, parsed.preDirAbbrev, parsed.postDirAbbrev, parsed.zip, var_restrict_geom, var_zip_penalty LOOP

      -- If we found a match with an exact street, then don't bother
      -- trying to do non-exact matches
      IF zip_info.exact THEN
        exact_street := true;
      END IF;

      IF results.exact_address THEN
        ADDY.address := substring(parsed.address::text FROM '[0-9]+')::integer;
      ELSE
        ADDY.address := NULL;
      END IF;

      ADDY.preDirAbbrev     := results.fedirp;
      ADDY.streetName       := results.fename;
      ADDY.streetTypeAbbrev := results.fetype;
      ADDY.postDirAbbrev    := results.fedirs;
      ADDY.location         := results.place;
      ADDY.stateAbbrev      := results.state;
      ADDY.zip              := results.zip;
      ADDY.parsed := TRUE;

      GEOMOUT := results.address_geom;
      RATING := results.sub_rating::integer;
      var_n := var_n + 1;

      -- If our ratings go above 99 exit because its a really bad match
      IF RATING > 99 THEN
        RETURN;
      END IF;

      RETURN NEXT;

      -- If we get an exact match, then just return that
      IF RATING = 0 THEN
        RETURN;
      END IF;

    END LOOP;
    IF var_n > max_results  THEN --we have exceeded our desired limit
        RETURN;
    END IF;
  END LOOP;

  RETURN;
END;
$$
  LANGUAGE 'plpgsql' STABLE COST 1000 ROWS 50 PARALLEL SAFE;

CREATE FUNCTION geocode_location(
    parsed NORM_ADDY,
    restrict_geom geometry DEFAULT null,
    OUT ADDY NORM_ADDY,
    OUT GEOMOUT GEOMETRY,
    OUT RATING INTEGER
) RETURNS SETOF RECORD
AS $_$
DECLARE
  result RECORD;
  in_statefp VARCHAR;
  stmt VARCHAR;
  var_debug boolean := false;
BEGIN

  in_statefp := statefp FROM state WHERE state.stusps = parsed.stateAbbrev;

  IF var_debug THEN
    RAISE NOTICE 'geocode_location starting: %', clock_timestamp();
  END IF;
  FOR result IN
    SELECT
        coalesce(zip.city)::varchar as place,
        zip.zip as zip,
        ST_Centroid(zcta5.the_geom) as address_geom,
        stusps as state,
        100::integer + coalesce(levenshtein_ignore_case(coalesce(zip.city), parsed.location),0) as in_rating
    FROM
      zip_lookup_base zip
      JOIN zcta5 ON (zip.zip = zcta5.zcta5ce AND zip.statefp = zcta5.statefp)
      JOIN state ON (state.statefp=zip.statefp)
    WHERE
      parsed.zip = zip.zip OR
      (soundex(zip.city) = soundex(parsed.location) and zip.statefp = in_statefp)
    ORDER BY levenshtein_ignore_case(coalesce(zip.city), parsed.location), zip.zip
  LOOP
    ADDY.location := result.place;
    ADDY.stateAbbrev := result.state;
    ADDY.zip := result.zip;
    ADDY.parsed := true;
    GEOMOUT := result.address_geom;
    RATING := result.in_rating;

    RETURN NEXT;

    IF RATING = 100 THEN
      RETURN;
    END IF;

  END LOOP;

  IF parsed.location IS NULL THEN
    parsed.location := city FROM zip_lookup_base WHERE zip_lookup_base.zip = parsed.zip ORDER BY zip_lookup_base.zip LIMIT 1;
    in_statefp := statefp FROM zip_lookup_base WHERE zip_lookup_base.zip = parsed.zip ORDER BY zip_lookup_base.zip LIMIT 1;
  END IF;

  stmt := 'SELECT '
       || ' pl.name as place, '
       || ' state.stusps as stateAbbrev, '
       || ' ST_Centroid(pl.the_geom) as address_geom, '
       || ' 100::integer + levenshtein_ignore_case(coalesce(pl.name), ' || quote_literal(coalesce(parsed.location,'')) || ') as in_rating '
       || ' FROM (SELECT * FROM place WHERE statefp = ' ||  quote_literal(coalesce(in_statefp,'')) || ' ' || COALESCE(' AND ST_Intersects(' || quote_literal(restrict_geom::text) || '::geometry, the_geom)', '') || ') AS pl '
       || ' INNER JOIN state ON(pl.statefp = state.statefp)'
       || ' WHERE soundex(pl.name) = soundex(' || quote_literal(coalesce(parsed.location,'')) || ') and pl.statefp = ' || quote_literal(COALESCE(in_statefp,''))
       || ' ORDER BY levenshtein_ignore_case(coalesce(pl.name), ' || quote_literal(coalesce(parsed.location,'')) || ');'
       ;

  IF var_debug THEN
    RAISE NOTICE 'geocode_location stmt: %', stmt;
  END IF;
  FOR result IN EXECUTE stmt
  LOOP

    ADDY.location := result.place;
    ADDY.stateAbbrev := result.stateAbbrev;
    ADDY.zip = parsed.zip;
    ADDY.parsed := true;
    GEOMOUT := result.address_geom;
    RATING := result.in_rating;

    RETURN NEXT;

    IF RATING = 100 THEN
      RETURN;
      IF var_debug THEN
        RAISE NOTICE 'geocode_location ending hit 100 rating result: %', clock_timestamp();
      END IF;
    END IF;
  END LOOP;

  IF var_debug THEN
    RAISE NOTICE 'geocode_location ending: %', clock_timestamp();
  END IF;

  RETURN;

END;
$_$ LANGUAGE plpgsql STABLE COST 20  ROWS 5 PARALLEL SAFE;
 /***
 *
 * Copyright (C) 2011-2016 Regina Obe and Leo Hsu (Paragon Corporation)
 **/
-- This function given two roadways, state and optional city, zip
-- Will return addresses that are at the intersecton of those roadways
-- The address returned will be the address on the first road way
-- Use case example an address at the intersection of 2 streets:
-- SELECT pprint_addy(addy), st_astext(geomout),rating FROM geocode_intersection('School St', 'Washington St', 'MA', 'Boston','02117');
--DROP FUNCTION tiger.geocode_intersection(text,text,text,text,text,integer);
CREATE OR REPLACE FUNCTION geocode_intersection(
    IN roadway1 text,
    IN roadway2 text,
    IN in_state text,
    IN in_city text DEFAULT ''::text,
    IN in_zip text DEFAULT ''::text,
    IN num_results integer DEFAULT 10,
    OUT addy norm_addy,
    OUT geomout geometry,
    OUT rating integer)
  RETURNS SETOF record AS
$$
DECLARE
    var_na_road norm_addy;
    var_na_inter1 norm_addy;
    var_sql text := '';
    var_zip varchar(5)[];
    in_statefp varchar(2) ;
    var_debug boolean := get_geocode_setting('debug_geocode_intersection')::boolean;
    results record;
BEGIN
    IF COALESCE(roadway1,'') = '' OR COALESCE(roadway2,'') = '' THEN
        -- not enough to give a result just return
        RETURN ;
    ELSE
        var_na_road := normalize_address('0 ' || roadway1 || ', ' || COALESCE(in_city,'') || ', ' || in_state || ' ' || in_zip);
        var_na_inter1  := normalize_address('0 ' || roadway2 || ', ' || COALESCE(in_city,'') || ', ' || in_state || ' ' || in_zip);
    END IF;
    in_statefp := statefp FROM state_lookup As s WHERE s.abbrev = upper(in_state);
    IF COALESCE(in_zip,'') > '' THEN -- limit search to 2 plus or minus the input zip
        var_zip := zip_range(in_zip, -2,2);
    END IF;

    IF var_zip IS NULL AND in_city > '' THEN
        var_zip := array_agg(zip) FROM zip_lookup_base WHERE statefp = in_statefp AND lower(city) = lower(in_city);
    END IF;

    -- if we don't have a city or zip, don't bother doing the zip check, just keep as null
    IF var_zip IS NULL AND in_city > '' THEN
        var_zip := array_agg(zip) FROM zip_lookup_base WHERE statefp = in_statefp AND lower(city) LIKE lower(in_city) || '%'  ;
    END IF;
    IF var_debug THEN
		RAISE NOTICE 'var_zip: %, city: %', quote_nullable(var_zip), quote_nullable(in_city);
    END IF;
    var_sql := '
    WITH
    	a1 AS (SELECT f.*, addr.fromhn, addr.tohn, addr.side , addr.zip
    				FROM (SELECT * FROM tiger.featnames
    							WHERE statefp = $1 AND ( lower(name) = $2  ' ||
    							CASE WHEN length(var_na_road.streetName) > 5 THEN ' or  lower(fullname) LIKE $6 || ''%'' ' ELSE '' END || ')'
    							|| ')  AS f LEFT JOIN (SELECT * FROM tiger.addr As addr WHERE addr.statefp = $1) As addr ON (addr.tlid = f.tlid AND addr.statefp = f.statefp)
    					WHERE $5::text[] IS NULL OR addr.zip = ANY($5::text[]) OR addr.zip IS NULL
    				ORDER BY CASE WHEN lower(f.fullname) = $6 THEN 0 ELSE 1 END
    				LIMIT 50000
    			  ),
        a2 AS (SELECT f.*, addr.fromhn, addr.tohn, addr.side , addr.zip
    				FROM (SELECT * FROM tiger.featnames
    							WHERE statefp = $1 AND ( lower(name) = $4 ' ||
    							CASE WHEN length(var_na_inter1.streetName) > 5 THEN ' or lower(fullname) LIKE $7 || ''%'' ' ELSE '' END || ')'
    							|| ' )  AS f LEFT JOIN (SELECT * FROM tiger.addr As addr WHERE addr.statefp = $1) AS addr ON (addr.tlid = f.tlid AND addr.statefp = f.statefp)
    					WHERE $5::text[] IS NULL OR addr.zip = ANY($5::text[])  or addr.zip IS NULL
    			ORDER BY CASE WHEN lower(f.fullname) = $7 THEN 0 ELSE 1 END
    				LIMIT 50000
    			  ),
    	 e1 AS (SELECT e.the_geom, e.tnidf, e.tnidt, a.*,
    	 			CASE WHEN a.side = ''L'' THEN e.tfidl ELSE e.tfidr END AS tfid
    	 			FROM a1 As a
    					INNER JOIN  tiger.edges AS e ON (e.statefp = a.statefp AND a.tlid = e.tlid)
    				WHERE e.statefp = $1
    				ORDER BY CASE WHEN lower(a.name) = $4 THEN 0 ELSE 1 END + CASE WHEN lower(e.fullname) = $7 THEN 0 ELSE 1 END
    				LIMIT 5000) ,
    	e2 AS (SELECT e.the_geom, e.tnidf, e.tnidt, a.*,
    	 			CASE WHEN a.side = ''L'' THEN e.tfidl ELSE e.tfidr END AS tfid
    				FROM (SELECT * FROM tiger.edges WHERE statefp = $1) AS e INNER JOIN a2 AS a ON (e.statefp = a.statefp AND a.tlid = e.tlid)
    					INNER JOIN e1 ON (e.statefp = e1.statefp
    					AND ARRAY[e.tnidf, e.tnidt] && ARRAY[e1.tnidf, e1.tnidt] )

    				WHERE (lower(e.fullname) = $7 or lower(a.name) LIKE $4 || ''%'')
    				ORDER BY CASE WHEN lower(a.name) = $4 THEN 0 ELSE 1 END + CASE WHEN lower(e.fullname) = $7 THEN 0 ELSE 1 END
    				LIMIT 5000
    				),
    	segs AS (SELECT DISTINCT ON(e1.tlid, e1.side)
                   CASE WHEN e1.tnidf = e2.tnidf OR e1.tnidf = e2.tnidt THEN
                                e1.fromhn
                            ELSE
                                e1.tohn END As address, e1.predirabrv As fedirp, COALESCE(e1.prequalabr || '' '','''' ) || e1.name As fename,
                             COALESCE(e1.suftypabrv,e1.pretypabrv)  As fetype, e1.sufdirabrv AS fedirs,
                               p.name As place, e1.zip,
                             CASE WHEN e1.tnidf = e2.tnidf OR e1.tnidf = e2.tnidt THEN
                                ST_StartPoint(ST_GeometryN(ST_Multi(e1.the_geom),1))
                             ELSE ST_EndPoint(ST_GeometryN(ST_Multi(e1.the_geom),1)) END AS geom ,
                                CASE WHEN lower(p.name) = $3 THEN 0 ELSE 1 END
                                + levenshtein_ignore_case(p.name, $3)
                                + levenshtein_ignore_case(e1.name || COALESCE('' '' || e1.sufqualabr, ''''),$2) +
                                CASE WHEN e1.fullname = $6 THEN 0 ELSE levenshtein_ignore_case(e1.fullname, $6) END +
                                + levenshtein_ignore_case(e2.name || COALESCE('' '' || e2.sufqualabr, ''''),$4)
                                AS a_rating
                    FROM e1
                            INNER JOIN e2 ON (
                                  ARRAY[e2.tnidf, e2.tnidt] && ARRAY[e1.tnidf, e1.tnidt]  )
                             INNER JOIN (SELECT * FROM tiger.faces WHERE statefp = $1) As fa1 ON (e1.tfid = fa1.tfid  )
                          LEFT JOIN tiger.place AS p ON (fa1.placefp = p.placefp AND p.statefp = $1 )
                       ORDER BY e1.tlid, e1.side, a_rating LIMIT $9*4 )
    SELECT address, fedirp , fename, fetype,fedirs,place, zip , geom, a_rating
        FROM segs ORDER BY a_rating LIMIT  $9';

    IF var_debug THEN
        RAISE NOTICE 'sql: %', replace(replace(replace(
        	replace(replace(replace(
                replace(
                    replace(
                        replace(var_sql, '$1', quote_nullable(in_statefp)),
                              '$2', quote_nullable(lower(var_na_road.streetName) ) ),
                      '$3', quote_nullable(lower(in_city)) ),
                      '$4', quote_nullable(lower(var_na_inter1.streetName) ) ),
                      '$5', quote_nullable(var_zip) ),
                      '$6', quote_nullable(lower(var_na_road.streetName || ' ' || COALESCE(var_na_road.streetTypeAbbrev,'') )) ) ,
                      '$7', quote_nullable(trim(lower(var_na_inter1.streetName || ' ' || COALESCE(var_na_inter1.streetTypeAbbrev,'') )) ) ) ,
		 '$8', quote_nullable(in_state ) ),  '$9', num_results::text );
    END IF;

    FOR results IN EXECUTE var_sql USING in_statefp, trim(lower(var_na_road.streetName)), lower(in_city), lower(var_na_inter1.streetName), var_zip,
		trim(lower(var_na_road.streetName || ' ' || COALESCE(var_na_road.streetTypeAbbrev,''))),
		trim(lower(var_na_inter1.streetName || ' ' || COALESCE(var_na_inter1.streetTypeAbbrev,''))), in_state, num_results LOOP
		ADDY.preDirAbbrev     := results.fedirp;
        ADDY.streetName       := results.fename;
        ADDY.streetTypeAbbrev := results.fetype;
        ADDY.postDirAbbrev    := results.fedirs;
        ADDY.location         := results.place;
        ADDY.stateAbbrev      := in_state;
        ADDY.zip              := results.zip;
        ADDY.parsed := TRUE;
        ADDY.address := substring(results.address FROM '[0-9]+')::integer;

        GEOMOUT := results.geom;
        RATING := results.a_rating;
		RETURN NEXT;
	END LOOP;
	RETURN;
END;
$$
  LANGUAGE plpgsql IMMUTABLE
  COST 1000
  ROWS 10;
ALTER FUNCTION geocode_intersection(text, text, text, text, text, integer) SET join_collapse_limit='2';
CREATE FUNCTION geocode(
    input VARCHAR, max_results integer DEFAULT 10,
    restrict_geom geometry DEFAULT NULL,
    OUT ADDY NORM_ADDY,
    OUT GEOMOUT GEOMETRY,
    OUT RATING INTEGER
) RETURNS SETOF RECORD
AS $_$
DECLARE
  rec RECORD;
BEGIN

  IF input IS NULL THEN
    RETURN;
  END IF;

  -- Pass the input string into the address normalizer
  ADDY := normalize_address(input);
  IF NOT ADDY.parsed THEN
    RETURN;
  END IF;

/*  FOR rec IN SELECT * FROM geocode(ADDY)
  LOOP

    ADDY := rec.addy;
    GEOMOUT := rec.geomout;
    RATING := rec.rating;

    RETURN NEXT;
  END LOOP;*/

  RETURN QUERY SELECT g.addy, g.geomout, g.rating FROM geocode(ADDY, max_results, restrict_geom) As g ORDER BY g.rating;

END;
$_$ LANGUAGE plpgsql COST 1000
STABLE PARALLEL SAFE
ROWS 1;

CREATE OR REPLACE FUNCTION geocode(
    IN_ADDY NORM_ADDY,
    max_results integer DEFAULT 10,
    restrict_geom geometry DEFAULT null,
    OUT ADDY NORM_ADDY,
    OUT GEOMOUT GEOMETRY,
    OUT RATING INTEGER
) RETURNS SETOF RECORD
AS $_$
DECLARE
  rec RECORD;
BEGIN

  IF NOT IN_ADDY.parsed THEN
    RETURN;
  END IF;

  -- Go for the full monty if we've got enough info
  IF IN_ADDY.streetName IS NOT NULL AND
      (IN_ADDY.zip IS NOT NULL OR IN_ADDY.stateAbbrev IS NOT NULL) THEN

    FOR rec IN
        SELECT *
        FROM
          (SELECT
            DISTINCT ON (
              (a.addy).address,
              (a.addy).predirabbrev,
              (a.addy).streetname,
              (a.addy).streettypeabbrev,
              (a.addy).postdirabbrev,
              (a.addy).internal,
              (a.addy).location,
              (a.addy).stateabbrev,
              (a.addy).zip
              )
            *
           FROM
             tiger.geocode_address(IN_ADDY, max_results, restrict_geom) a
           ORDER BY
              (a.addy).address,
              (a.addy).predirabbrev,
              (a.addy).streetname,
              (a.addy).streettypeabbrev,
              (a.addy).postdirabbrev,
              (a.addy).internal,
              (a.addy).location,
              (a.addy).stateabbrev,
              (a.addy).zip,
              a.rating
          ) as b
        ORDER BY b.rating LIMIT max_results
    LOOP

      ADDY := rec.addy;
      GEOMOUT := rec.geomout;
      RATING := rec.rating;

      RETURN NEXT;

      IF RATING = 0 THEN
        RETURN;
      END IF;

    END LOOP;

    IF RATING IS NOT NULL THEN
      RETURN;
    END IF;
  END IF;

  -- No zip code, try state/location, need both or we'll get too much stuffs.
  IF IN_ADDY.zip IS NOT NULL OR (IN_ADDY.stateAbbrev IS NOT NULL AND IN_ADDY.location IS NOT NULL) THEN
    FOR rec in SELECT * FROM tiger.geocode_location(IN_ADDY, restrict_geom) As b ORDER BY b.rating LIMIT max_results
    LOOP
      ADDY := rec.addy;
      GEOMOUT := rec.geomout;
      RATING := rec.rating;

      RETURN NEXT;
      IF RATING = 100 THEN
        RETURN;
      END IF;
    END LOOP;

  END IF;

  RETURN;

END;
$_$ LANGUAGE plpgsql
COST 1000
STABLE PARALLEL SAFE
ROWS 1;
 /***
 *
 * Copyright (C) 2011-2023 Regina Obe and Leo Hsu (Paragon Corporation)
 **/
-- This function given a point try to determine the approximate street address (norm_addy form)
-- and array of cross streets, as well as interpolated points along the streets
-- Use case example an address at the intersection of 3 streets: SELECT pprint_addy(r.addy[1]) As st1, pprint_addy(r.addy[2]) As st2, pprint_addy(r.addy[3]) As st3, array_to_string(r.street, ',') FROM reverse_geocode(ST_GeomFromText('POINT(-71.057811 42.358274)',4269)) As r;
--set search_path=tiger,public;

CREATE OR REPLACE FUNCTION reverse_geocode(IN pt geometry, IN include_strnum_range boolean DEFAULT false, OUT intpt geometry[], OUT addy norm_addy[], OUT street character varying[])
  RETURNS record AS
$BODY$
DECLARE
  var_redge RECORD;
  var_state text := NULL;
  var_stusps text := NULL;
  var_countyfp text := NULL;
  var_addy NORM_ADDY;
  var_addy_alt NORM_ADDY;
  var_nstrnum numeric(10);
  var_primary_line geometry := NULL;
  var_primary_dist numeric(10,2) ;
  var_pt geometry;
  var_place varchar;
  var_county varchar;
  var_stmt text;
  var_debug boolean =  get_geocode_setting('debug_reverse_geocode')::boolean;
  var_rating_highway integer = COALESCE(get_geocode_setting('reverse_geocode_numbered_roads')::integer,0);/**0 no preference, 1 prefer highway number, 2 prefer local name **/
  var_zip varchar := NULL;
  var_primary_fullname varchar := '';
BEGIN
	IF pt IS NULL THEN
		RETURN;
	ELSE
		IF ST_SRID(pt) = 4269 THEN
			var_pt := pt;
		ELSIF ST_SRID(pt) > 0 THEN
			var_pt := ST_Transform(pt, 4269);
		ELSE --If srid is unknown, assume its 4269
			var_pt := ST_SetSRID(pt, 4269);
		END IF;
		var_pt := ST_SnapToGrid(var_pt, 0.00005); /** Get rid of floating point junk that would prevent intersections **/
	END IF;
	-- Determine state tables to check
	-- this is needed to take advantage of constraint exclusion
	IF var_debug THEN
		RAISE NOTICE 'Get matching states start: %', clock_timestamp();
	END IF;
	SELECT statefp, stusps INTO var_state, var_stusps FROM state WHERE ST_Intersects(the_geom, var_pt) LIMIT 1;
	IF var_debug THEN
		RAISE NOTICE 'Get matching states end: % -  %', var_state, clock_timestamp();
	END IF;
	IF var_state IS NULL THEN
		-- We don't have any data for this state
		RETURN;
	END IF;
	IF var_debug THEN
		RAISE NOTICE 'Get matching counties start: %', clock_timestamp();
	END IF;
	-- locate county
	var_stmt := 'SELECT countyfp, name  FROM  county WHERE  statefp =  $1 AND ST_Intersects(the_geom, $2) LIMIT 1;';
	EXECUTE var_stmt INTO var_countyfp, var_county USING var_state, var_pt ;

	--locate zip
	var_stmt := 'SELECT zcta5ce  FROM zcta5 WHERE statefp = $1 AND ST_Intersects(the_geom, $2)  LIMIT 1;';
	EXECUTE var_stmt INTO var_zip USING var_state, var_pt;
	-- locate city
	IF var_zip > '' THEN
	      var_addy.zip := var_zip ;
	END IF;

	var_stmt := 'SELECT z.name  FROM place As z WHERE  z.statefp =  $1 AND ST_Intersects(the_geom, $2) LIMIT 1;';
	EXECUTE var_stmt INTO var_place USING var_state, var_pt ;
	IF var_place > '' THEN
			var_addy.location := var_place;
	ELSE
		var_stmt := 'SELECT z.name  FROM cousub As z WHERE  z.statefp =  $1 AND ST_Intersects(the_geom, $2) LIMIT 1;';
		EXECUTE var_stmt INTO var_place USING var_state, var_pt ;
		IF var_place > '' THEN
			var_addy.location := var_place;
		-- ELSIF var_zip > '' THEN
		-- 	SELECT z.city INTO var_place FROM zip_lookup_base As z WHERE  z.statefp =  var_state AND z.county = var_county AND z.zip = var_zip LIMIT 1;
		-- 	var_addy.location := var_place;
		END IF;
	END IF;

	IF var_debug THEN
		RAISE NOTICE 'Get matching counties end: % - %',var_countyfp,  clock_timestamp();
	END IF;
	IF var_countyfp IS NULL THEN
		-- We don't have any data for this county
		RETURN;
	END IF;

	var_addy.stateAbbrev = var_stusps;

	-- Find the street edges that this point is closest to with tolerance of 0.005 but only consider the edge if the point is contained in the right or left face
	-- Then order addresses by proximity to road
	IF var_debug THEN
		RAISE NOTICE 'Get matching edges start: %', clock_timestamp();
	END IF;

	var_stmt := '
	    WITH ref AS (
	        SELECT ' || quote_literal(var_pt::text) || '::geometry As ref_geom ) ,
			f AS
			( SELECT faces.* FROM faces  CROSS JOIN ref
			WHERE faces.statefp = ' || quote_literal(var_state) || ' AND faces.countyfp = ' || quote_literal(var_countyfp) || '
				AND ST_Intersects(faces.the_geom, ref_geom)
				    ),
			e AS
			( SELECT edges.tlid , edges.statefp, edges.the_geom, CASE WHEN edges.tfidr = f.tfid THEN ''R'' WHEN edges.tfidl = f.tfid THEN ''L'' ELSE NULL END::varchar As eside,
                    ST_ClosestPoint(edges.the_geom,ref_geom) As center_pt, ref_geom
				FROM edges INNER JOIN f ON (f.statefp = edges.statefp AND (edges.tfidr = f.tfid OR edges.tfidl = f.tfid))
				    CROSS JOIN ref
			WHERE edges.statefp = ' || quote_literal(var_state) || ' AND edges.countyfp = ' || quote_literal(var_countyfp) || '
				AND ST_DWithin(edges.the_geom, ref.ref_geom, 0.01) AND (edges.mtfcc LIKE ''S%'') --only consider streets and roads
				  )	,
			ea AS
			(SELECT e.statefp, e.tlid, a.fromhn, a.tohn, e.center_pt, ref_geom, a.zip, a.side, e.the_geom
				FROM e LEFT JOIN addr As a ON (a.statefp = ' || quote_literal(var_state) || '  AND e.tlid = a.tlid and e.eside = a.side)
				)
		SELECT *
		FROM (SELECT DISTINCT ON(tlid,side)  foo.fullname, foo.predirabrv, foo.streetname, foo.sufdirabrv, foo.streettypeabbrev, foo.zip,  foo.center_pt,
			  side, to_number(CASE WHEN trim(fromhn) ~ ''^[0-9]+$'' THEN fromhn ELSE NULL END,''99999999'')  As fromhn, to_number(CASE WHEN trim(tohn) ~ ''^[0-9]+$'' THEN tohn ELSE NULL END,''99999999'') As tohn,
			  ST_GeometryN(ST_Multi(line),1) As line, dist
		FROM
		  (SELECT e.tlid, e.the_geom As line, n.fullname, COALESCE(n.prequalabr || '' '','''')  || n.name AS streetname, n.predirabrv, COALESCE(suftypabrv, pretypabrv) As streettypeabbrev,
		      n.sufdirabrv, e.zip, e.side, e.fromhn, e.tohn , e.center_pt,
		          ST_DistanceSphere(ST_SetSRID(e.center_pt,4326),ST_SetSRID(ref_geom,4326)) As dist
				FROM ea AS e
					LEFT JOIN (SELECT featnames.* FROM featnames
			    WHERE featnames.statefp = ' || quote_literal(var_state) ||'   ) AS n ON (n.statefp =  e.statefp AND n.tlid = e.tlid)
				ORDER BY dist LIMIT 50 ) As foo
				ORDER BY foo.tlid, foo.side, ';

	    -- for numbered street/road use var_rating_highway to determine whether to prefer numbered or not (0 no pref, 1 prefer numbered, 2 prefer named)
		var_stmt := var_stmt || ' CASE $1 WHEN 0 THEN 0  WHEN 1 THEN CASE WHEN foo.fullname ~ ''[0-9]+'' THEN 0 ELSE 1 END ELSE CASE WHEN foo.fullname > '''' AND NOT (foo.fullname ~ ''[0-9]+'') THEN 0 ELSE 1 END END ';

		-- penalize ranges with no street name or no address range if there are others with addresses within 70 meters
		var_stmt := var_stmt || ',  foo.fullname ASC NULLS LAST, dist LIMIT 50) As f
		ORDER BY CASE WHEN f.dist < 70 THEN 0 ELSE f.dist END, CASE WHEN fullname > '''' THEN 0 ELSE 1 END,
			CASE WHEN f.fromhn IS NOT NULL THEN 0 ELSE 1 END, f.dist ';

	IF var_debug = true THEN
	    RAISE NOTICE 'Statement 1: %', replace(var_stmt, '$1', var_rating_highway::text);
	END IF;

    FOR var_redge IN EXECUTE var_stmt USING var_rating_highway LOOP
        IF var_debug THEN
            RAISE NOTICE 'Start Get matching edges loop: %,%', var_primary_line, clock_timestamp();
        END IF;
        IF var_primary_line IS NULL THEN --this is the first time in the loop and our primary guess
            var_primary_line := var_redge.line;
            var_primary_dist := var_redge.dist;
        END IF;

        IF var_redge.fullname IS NOT NULL AND COALESCE(var_primary_fullname,'') = '' THEN -- this is the first non-blank name we are hitting grab info
            var_primary_fullname := var_redge.fullname;
            var_addy.streetname = var_redge.streetname;
            var_addy.streettypeabbrev := var_redge.streettypeabbrev;
            var_addy.predirabbrev := var_redge.predirabrv;
			var_addy.postDirAbbrev := var_redge.sufdirabrv;
        END IF;

        IF ST_Intersects(var_redge.line, var_primary_line) THEN
            var_addy.streetname := var_redge.streetname;

            var_addy.streettypeabbrev := var_redge.streettypeabbrev;
            var_addy.address := var_nstrnum;
            IF  var_redge.fromhn IS NOT NULL THEN
                --interpolate the number -- note that if fromhn > tohn we will be subtracting which is what we want
                var_nstrnum := (var_redge.fromhn + ST_LineLocatePoint(var_redge.line, var_pt)*(var_redge.tohn - var_redge.fromhn))::numeric(10);
                -- The odd even street number side of street rule
                IF (var_nstrnum  % 2)  != (var_redge.tohn % 2) THEN
                    var_nstrnum := CASE WHEN var_nstrnum + 1 NOT BETWEEN var_redge.fromhn AND var_redge.tohn THEN var_nstrnum - 1 ELSE var_nstrnum + 1 END;
                END IF;
                var_addy.address := var_nstrnum;
            END IF;
            IF var_redge.zip > ''  THEN
                var_addy.zip := var_redge.zip;
            ELSE
                var_addy.zip := var_zip;
            END IF;
            -- IF var_redge.location > '' THEN
            --     var_addy.location := var_redge.location;
            -- ELSE
            --     var_addy.location := var_place;
            -- END IF;

            -- This is a cross streets - only add if not the primary adress street
            IF var_redge.fullname > '' AND var_redge.fullname <> var_primary_fullname THEN
                street := array_append(street, (CASE WHEN include_strnum_range THEN COALESCE(var_redge.fromhn::varchar, '')::varchar || COALESCE(' - ' || var_redge.tohn::varchar,'')::varchar || ' '::varchar  ELSE '' END::varchar ||  COALESCE(var_redge.fullname::varchar,''))::varchar);
            END IF;

            -- consider this a potential address
            IF (var_redge.dist < var_primary_dist*1.1 OR var_redge.dist < 20)   THEN
                 -- We only consider this a possible address if it is really close to our point
                 intpt := array_append(intpt,var_redge.center_pt);
                -- note that ramps don't have names or addresses but they connect at the edge of a range
                -- so for ramps the address of connecting is still useful
                IF var_debug THEN
                    RAISE NOTICE 'Current addresses: %, last added, %, street: %, %', addy, var_addy, var_addy.streetname, clock_timestamp();
                END IF;
                 addy := array_append(addy, var_addy);

                -- Use current values streetname for previous value if previous value has no streetname
				IF var_addy.streetname > '' AND array_upper(addy,1) > 1 AND COALESCE(addy[array_upper(addy,1) - 1].streetname, '') = ''  THEN
					-- the match is probably an offshoot of some sort
					-- replace prior entry with streetname of new if prior had no streetname
					var_addy_alt := addy[array_upper(addy,1)- 1];
					IF var_debug THEN
						RAISE NOTICE 'Replacing answer : %, %', addy[array_upper(addy,1) - 1], clock_timestamp();
					END IF;
					var_addy_alt.streetname := var_addy.streetname;
					var_addy_alt.streettypeabbrev := var_addy.streettypeabbrev;
                    var_addy_alt.predirabbrev := var_addy.predirabbrev;
					var_addy_alt.postDirAbbrev := var_addy.postDirAbbrev;
					addy[array_upper(addy,1) - 1 ] := var_addy_alt;
					IF var_debug THEN
						RAISE NOTICE 'Replaced with : %, %', var_addy_alt, clock_timestamp();
					END IF;
				END IF;

				IF var_debug THEN
					RAISE NOTICE 'End Get matching edges loop: %', clock_timestamp();
					RAISE NOTICE 'Final addresses: %, %', addy, clock_timestamp();
				END IF;

            END IF;
        END IF;

    END LOOP;

    -- not matching roads or streets, just return basic info
    IF NOT FOUND THEN
        addy := array_append(addy,var_addy);
        IF var_debug THEN
            RAISE NOTICE 'No address found: adding: % street: %, %', var_addy, var_addy.streetname, clock_timestamp();
        END IF;
    END IF;
    IF var_debug THEN
        RAISE NOTICE 'current array count : %, %', array_upper(addy,1), clock_timestamp();
    END IF;

    RETURN;
END;
$BODY$
  LANGUAGE plpgsql STABLE
  COST 1000;
 /***
 *
 * Copyright (C) 2012 Regina Obe and Leo Hsu (Paragon Corporation)
 **/
-- This function given a geometry try will try to determine the tract.
-- It defaults to returning the tract name but can be changed to return track geoid id.
-- pass in 'tract_id' to get the full geoid, 'name' to get the short decimal name

CREATE FUNCTION get_tract(IN loc_geom geometry, output_field text DEFAULT 'name')
  RETURNS text AS
$$
DECLARE
  var_state text := NULL;
  var_stusps text := NULL;
  var_result text := NULL;
  var_loc_geom geometry;
  var_stmt text;
  var_debug boolean = false;
BEGIN
	IF loc_geom IS NULL THEN
		RETURN null;
	ELSE
		IF ST_SRID(loc_geom) = 4269 THEN
			var_loc_geom := loc_geom;
		ELSIF ST_SRID(loc_geom) > 0 THEN
			var_loc_geom := ST_Transform(loc_geom, 4269);
		ELSE --If srid is unknown, assume its 4269
			var_loc_geom := ST_SetSRID(loc_geom, 4269);
		END IF;
		IF GeometryType(var_loc_geom) != 'POINT' THEN
			var_loc_geom := ST_Centroid(var_loc_geom);
		END IF;
	END IF;
	-- Determine state tables to check
	-- this is needed to take advantage of constraint exclusion
	IF var_debug THEN
		RAISE NOTICE 'Get matching states start: %', clock_timestamp();
	END IF;
	SELECT statefp, stusps INTO var_state, var_stusps FROM state WHERE ST_Intersects(the_geom, var_loc_geom) LIMIT 1;
	IF var_debug THEN
		RAISE NOTICE 'Get matching states end: % -  %', var_state, clock_timestamp();
	END IF;
	IF var_state IS NULL THEN
		-- We don't have any data for this state
		RAISE NOTICE 'No data for this state';
		RETURN NULL;
	END IF;
	-- locate county
	var_stmt := 'SELECT ' || quote_ident(output_field) || ' FROM tract WHERE statefp =  $1 AND ST_Intersects(the_geom, $2) LIMIT 1;';
	EXECUTE var_stmt INTO var_result USING var_state, var_loc_geom ;
	RETURN var_result;
END;
$$
  LANGUAGE plpgsql IMMUTABLE
  COST 500;
/*******************************************************************
 *
 * PostGIS - Spatial Types for PostgreSQL
 * Copyright 2011 Leo Hsu and Regina Obe <lr@pcorp.us>
 * Paragon Corporation
 * This is free software; you can redistribute and/or modify it under
 * the terms of the GNU General Public Licence. See the COPYING file.
 *
 * This file contains helper functions for loading tiger data
 * into postgis topology structure
 **********************************************************************/

 /** topology_load_tiger: Will load all edges, faces, nodes into
 *  topology named toponame
 *	that intersect the specified region
 *  region_type: 'place', 'county'
 *  region_id: the respective fully qualified geoid
 *	 place - plcidfp
 *	 county - cntyidfp
 * USE CASE:
 *  The following will create a topology called topo_boston
 *   in Mass State Plane feet and load Boston, MA tiger data
 *  with tolerance of 1 foot
 * SELECT topology.DropTopology('topo_boston');
 * SELECT topology.CreateTopology('topo_boston', 2249,0.25);
 * SELECT tiger.topology_load_tiger('topo_boston', 'place', '2507000');
 * SELECT topology.TopologySummary('topo_boston');
 * SELECT topology.ValidateTopology('topo_boston');
 ****/
CREATE FUNCTION tiger.topology_load_tiger(IN toponame varchar,
	region_type varchar, region_id varchar)
  RETURNS text AS
$$
DECLARE
 	var_sql text;
 	var_rgeom geometry;
 	var_statefp text;
 	var_rcnt bigint;
 	var_result text := '';
 	var_srid int := 4269;
 	var_precision double precision := 0;
BEGIN
	CASE region_type
		WHEN 'place' THEN
			SELECT the_geom , statefp FROM place INTO var_rgeom, var_statefp WHERE plcidfp = region_id;
		WHEN 'county' THEN
			SELECT the_geom, statefp FROM county INTO var_rgeom, var_statefp WHERE cntyidfp = region_id;
		ELSE
			RAISE EXCEPTION 'Region type % IS NOT SUPPORTED', region_type;
	END CASE;
	SELECT srid, precision FROM topology.topology into var_srid, var_precision
                WHERE name = toponame;
	var_sql := '
	CREATE TEMPORARY TABLE tmp_edge
   				AS
	WITH te AS
   			(SELECT tlid,  ST_GeometryN(ST_SnapToGrid(ST_Transform(ST_LineMerge(the_geom),$3),$4),1) As geom, tnidf, tnidt, tfidl, tfidr , the_geom As orig_geom
									FROM tiger.edges
									WHERE statefp = $1 AND ST_Covers($2, the_geom)
										)
					SELECT DISTINCT ON (t.tlid) t.tlid As edge_id,t.geom
                        , t.tnidf As start_node, t.tnidt As end_node, COALESCE(t.tfidl,0) As left_face
                        , COALESCE(t.tfidr,0) As right_face, COALESCE(tl.tlid, t.tlid) AS next_left_edge,  COALESCE(tr.tlid, t.tlid) As next_right_edge, t.orig_geom
						FROM
							te AS t LEFT JOIN te As tl ON (t.tnidf = tl.tnidt AND t.tfidl = tl.tfidl)
							 LEFT JOIN te As tr ON (t.tnidt = tr.tnidf AND t.tfidr = tr.tfidr)
						';
	EXECUTE var_sql USING var_statefp, var_rgeom, var_srid, var_precision;
	GET DIAGNOSTICS var_rcnt = ROW_COUNT;
	var_result := var_rcnt::text || ' edges holding in temporary. ';
	var_sql := 'ALTER TABLE tmp_edge ADD CONSTRAINT pk_tmp_edge PRIMARY KEY(edge_id );';
	EXECUTE var_sql;
	-- CREATE node indexes on temporary edges
	var_sql := 'CREATE INDEX idx_tmp_edge_start_node ON tmp_edge USING btree (start_node ); CREATE INDEX idx_tmp_edge_end_node ON tmp_edge USING btree (end_node );';

	EXECUTE var_sql;

	-- CREATE face indexes on temporary edges
	var_sql := 'CREATE INDEX idx_tmp_edge_left_face ON tmp_edge USING btree (left_face ); CREATE INDEX idx_tmp_edge_right_face ON tmp_edge USING btree (right_face );';

	EXECUTE var_sql;

	-- CREATE edge indexes on temporary edges
	var_sql := 'CREATE INDEX idx_tmp_edge_next_left_edge ON tmp_edge USING btree (next_left_edge ); CREATE INDEX idx_tmp_edge_next_right_edge ON tmp_edge USING btree (next_right_edge);';

	EXECUTE var_sql;

	-- start load in faces
	var_sql := 'INSERT INTO ' || quote_ident(toponame) || '.face(face_id, mbr)
						SELECT f.tfid, ST_Envelope(ST_Transform(f.the_geom,$3)) As mbr
							FROM tiger.faces AS f
								WHERE statefp = $1 AND
								(  tfid IN(SELECT left_face FROM tmp_edge)
									OR tfid IN(SELECT right_face FROM tmp_edge) OR ST_Covers($2, the_geom) )
							AND tfid NOT IN(SELECT face_id FROM ' || quote_ident(toponame) || '.face) ';
	EXECUTE var_sql USING var_statefp, var_rgeom, var_srid;
	GET DIAGNOSTICS var_rcnt = ROW_COUNT;
	var_result := var_result || var_rcnt::text || ' faces added. ';
   -- end load in faces

   -- add remaining missing edges of present faces --
   var_sql := 'INSERT INTO tmp_edge(edge_id, geom, start_node, end_node, left_face, right_face, next_left_edge, next_right_edge, orig_geom)
   			WITH te AS
   			(SELECT tlid,  ST_GeometryN(ST_SnapToGrid(ST_Transform(ST_LineMerge(the_geom),$2),$3),1) As geom, tnidf, tnidt, tfidl, tfidr, the_geom As orig_geom
									FROM tiger.edges
									WHERE statefp = $1 AND
									 (tfidl IN(SELECT face_id FROM ' || quote_ident(toponame) || '.face)
				OR tfidr IN(SELECT face_id FROM ' || quote_ident(toponame) || '.face) )
				AND tlid NOT IN(SELECT edge_id FROM tmp_edge)
				 )

			SELECT DISTINCT ON (t.tlid) t.tlid As edge_id,t.geom
                        , t.tnidf As start_node, t.tnidt As end_node, t.tfidl As left_face
                        , t.tfidr As right_face, tl.tlid AS next_left_edge,  tr.tlid As next_right_edge, t.orig_geom
				FROM
						te AS t LEFT JOIN te As tl
								ON (t.tnidf = tl.tnidt AND t.tfidl = tl.tfidl)
			LEFT JOIN te As tr ON (t.tnidt = tr.tnidf AND t.tfidr = tr.tfidr)
			';
	EXECUTE var_sql USING var_statefp, var_srid, var_precision;
	GET DIAGNOSTICS var_rcnt = ROW_COUNT;
	var_result := var_result || var_rcnt::text || ' edges of faces added. ';
   	-- start load in nodes
	var_sql := 'INSERT INTO ' || quote_ident(toponame) || '.node(node_id, geom)
					SELECT DISTINCT ON(tnid) tnid, geom
						FROM
						(
							SELECT start_node AS tnid, ST_StartPoint(e.geom) As geom
								FROM tmp_edge As e LEFT JOIN ' || quote_ident(toponame) || '.node AS n ON e.start_node = n.node_id
						UNION ALL
							SELECT end_node AS tnid, ST_EndPoint(e.geom) As geom
							FROM tmp_edge As e LEFT JOIN ' || quote_ident(toponame) || '.node AS n ON e.end_node = n.node_id
							WHERE n.node_id IS NULL) As f
							WHERE tnid NOT IN(SELECT node_id FROM  ' || quote_ident(toponame) || '.node)
					 ';
	EXECUTE var_sql USING var_statefp, var_rgeom;
	GET DIAGNOSTICS var_rcnt = ROW_COUNT;
	var_result := var_result || ' ' || var_rcnt::text || ' nodes added. ';

   -- end load in nodes
   -- start Mark which nodes are contained in faces
   	var_sql := 'UPDATE ' || quote_ident(toponame) || '.node AS n
					SET containing_face = f.tfid
						FROM (SELECT tfid, the_geom
							FROM tiger.faces WHERE statefp = $1
							AND tfid IN(SELECT face_id FROM ' || quote_ident(toponame) || '.face)
							) As f
						WHERE ST_ContainsProperly(f.the_geom, ST_Transform(n.geom,4269)) ';
	EXECUTE var_sql USING var_statefp, var_rgeom;
	GET DIAGNOSTICS var_rcnt = ROW_COUNT;
	var_result := var_result || ' ' || var_rcnt::text || ' nodes contained in a face. ';
   -- end Mark nodes contained in faces

   -- Set orphan left right to itself and set edges with missing faces to world face
   var_sql := 'UPDATE tmp_edge SET next_left_edge = -1*edge_id WHERE next_left_edge IS NULL OR next_left_edge NOT IN(SELECT edge_id FROM tmp_edge);
        UPDATE tmp_edge SET next_right_edge = -1*edge_id WHERE next_right_edge IS NULL OR next_right_edge NOT IN(SELECT edge_id FROM tmp_edge);
        UPDATE tmp_edge SET left_face = 0 WHERE left_face NOT IN(SELECT face_id FROM ' || quote_ident(toponame) || '.face);
        UPDATE tmp_edge SET right_face = 0 WHERE right_face NOT IN(SELECT face_id FROM ' || quote_ident(toponame) || '.face);';
   EXECUTE var_sql;

   -- force edges start and end points to match the start and end nodes --
   var_sql := 'UPDATE tmp_edge SET geom = ST_SetPoint(ST_SetPoint(tmp_edge.geom, 0, s.geom), ST_NPoints(tmp_edge.geom) - 1,e.geom)
                FROM ' || quote_ident(toponame) || '.node AS s, ' || quote_ident(toponame) || '.node As e
                WHERE s.node_id = tmp_edge.start_node AND e.node_id = tmp_edge.end_node AND
                    ( NOT ST_Equals(s.geom, ST_StartPoint(tmp_edge.geom) ) OR NOT ST_Equals(e.geom, ST_EndPoint(tmp_edge.geom) ) ) '  ;
    EXECUTE var_sql;
    GET DIAGNOSTICS var_rcnt = ROW_COUNT;
    var_result := var_result || ' ' || var_rcnt::text || ' edge start end corrected. ';
   -- TODO: Load in edges --
   var_sql := '
   	INSERT INTO ' || quote_ident(toponame) || '.edge(edge_id, geom, start_node, end_node, left_face, right_face, next_left_edge, next_right_edge)
					SELECT t.edge_id, t.geom, t.start_node, t.end_node, COALESCE(t.left_face,0) As left_face, COALESCE(t.right_face,0) As right_face, t.next_left_edge, t.next_right_edge
						FROM
							tmp_edge AS t
							WHERE t.edge_id NOT IN(SELECT edge_id FROM ' || quote_ident(toponame) || '.edge)
						';
	EXECUTE var_sql USING var_statefp, var_rgeom;
	GET DIAGNOSTICS var_rcnt = ROW_COUNT;
	var_result := var_result || ' ' || var_rcnt::text || ' edges added. ';
	var_sql = 'DROP TABLE tmp_edge;';
	EXECUTE var_sql;
	RETURN var_result;
END
$$
  LANGUAGE plpgsql VOLATILE
  COST 1000;-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
--
----
-- PostGIS - Spatial Types for PostgreSQL
-- http://postgis.net
--
-- Copyright (C) 2011 Regina Obe <lr@pcorp.us>
--
-- This is free software; you can redistribute and/or modify it under
-- the terms of the GNU General Public Licence. See the COPYING file.
--
-- Author: Regina Obe <lr@pcorp.us>
--
-- This is a suite of SQL helper functions for use during a PostGIS extension install/upgrade
-- The functions get uninstalled after the extention install/upgrade process
---------------------------
-- postgis_extension_remove_objects: This function removes objects of a particular class from an extension
-- this is needed because there is no ALTER EXTENSION DROP FUNCTION/AGGREGATE command
-- and we can't CREATE OR REPALCe functions whose signatures have changed and we can drop them if they are part of an extention
-- So we use this to remove it from extension first before we drop
CREATE FUNCTION postgis_extension_remove_objects(param_extension text, param_type text)
  RETURNS boolean AS
$$
DECLARE
	var_sql text := '';
	var_r record;
	var_result boolean := false;
	var_class text := '';
	var_is_aggregate boolean := false;
	var_sql_list text := '';
	var_pgsql_version integer := pg_catalog.current_setting('server_version_num');
BEGIN
		var_class := CASE WHEN pg_catalog.lower(param_type) OPERATOR(pg_catalog.=)'function' OR pg_catalog.lower(param_type) OPERATOR(pg_catalog.=) 'aggregate' THEN 'pg_catalog.pg_proc' ELSE '' END;
		var_is_aggregate := CASE WHEN pg_catalog.lower(param_type) OPERATOR(pg_catalog.=) 'aggregate' THEN true ELSE false END;

		IF var_pgsql_version OPERATOR(pg_catalog.<) 110000 THEN
			var_sql_list := $sql$SELECT 'ALTER EXTENSION ' OPERATOR(pg_catalog.||)  e.extname OPERATOR(pg_catalog.||) ' DROP ' OPERATOR(pg_catalog.||) $3 OPERATOR(pg_catalog.||) ' ' OPERATOR(pg_catalog.||) COALESCE(proc.proname OPERATOR(pg_catalog.||) '(' OPERATOR(pg_catalog.||) oidvectortypes(proc.proargtypes) OPERATOR(pg_catalog.||) ')' ,typ.typname, cd.relname, op.oprname,
					cs.typname OPERATOR(pg_catalog.||) ' AS ' OPERATOR(pg_catalog.||) ct.typname OPERATOR(pg_catalog.||) ') ', opcname, opfname) OPERATOR(pg_catalog.||) ';' AS remove_command
			FROM pg_catalog.pg_depend As d INNER JOIN pg_catalog.pg_extension As e
				ON d.refobjid OPERATOR(pg_catalog.=) e.oid INNER JOIN pg_catalog.pg_class As c ON
					c.oid OPERATOR(pg_catalog.=) d.classid
					LEFT JOIN pg_catalog.pg_proc AS proc ON proc.oid OPERATOR(pg_catalog.=) d.objid
					LEFT JOIN pg_catalog.pg_type AS typ ON typ.oid OPERATOR(pg_catalog.=) d.objid
					LEFT JOIN pg_catalog.pg_class As cd ON cd.oid OPERATOR(pg_catalog.=) d.objid
					LEFT JOIN pg_operator As op ON op.oid OPERATOR(pg_catalog.=) d.objid
					LEFT JOIN pg_catalog.pg_cast AS ca ON ca.oid OPERATOR(pg_catalog.=) d.objid
					LEFT JOIN pg_catalog.pg_type AS cs ON ca.castsource OPERATOR(pg_catalog.=) cs.oid
					LEFT JOIN pg_catalog.pg_type AS ct ON ca.casttarget OPERATOR(pg_catalog.=) ct.oid
					LEFT JOIN pg_opclass As oc ON oc.oid OPERATOR(pg_catalog.=) d.objid
					LEFT JOIN pg_opfamily As ofa ON ofa.oid OPERATOR(pg_catalog.=) d.objid
			WHERE d.deptype OPERATOR(pg_catalog.=) 'e' and e.extname OPERATOR(pg_catalog.=) $1 and c.relname OPERATOR(pg_catalog.=) $2 AND COALESCE(proc.proisagg, false) OPERATOR(pg_catalog.=) $4;$sql$;
		ELSE -- for PostgreSQL 11 and above, they removed proc.proisagg among others and replaced with some func type thing
			var_sql_list := $sql$SELECT 'ALTER EXTENSION ' OPERATOR(pg_catalog.||) e.extname OPERATOR(pg_catalog.||) ' DROP ' OPERATOR(pg_catalog.||) $3 OPERATOR(pg_catalog.||) ' ' OPERATOR(pg_catalog.||) COALESCE(proc.proname OPERATOR(pg_catalog.||) '(' OPERATOR(pg_catalog.||) oidvectortypes(proc.proargtypes) OPERATOR(pg_catalog.||) ')' ,typ.typname, cd.relname, op.oprname,
					cs.typname OPERATOR(pg_catalog.||) ' AS ' OPERATOR(pg_catalog.||) ct.typname OPERATOR(pg_catalog.||) ') ', opcname, opfname) OPERATOR(pg_catalog.||) ';' AS remove_command
			FROM pg_catalog.pg_depend As d INNER JOIN pg_catalog.pg_extension As e
				ON d.refobjid OPERATOR(pg_catalog.=) e.oid INNER JOIN pg_catalog.pg_class As c ON
					c.oid OPERATOR(pg_catalog.=) d.classid
					LEFT JOIN pg_catalog.pg_proc AS proc ON proc.oid OPERATOR(pg_catalog.=) d.objid
					LEFT JOIN pg_catalog.pg_type AS typ ON typ.oid OPERATOR(pg_catalog.=) d.objid
					LEFT JOIN pg_catalog.pg_class As cd ON cd.oid OPERATOR(pg_catalog.=) d.objid
					LEFT JOIN pg_operator As op ON op.oid OPERATOR(pg_catalog.=) d.objid
					LEFT JOIN pg_catalog.pg_cast AS ca ON ca.oid OPERATOR(pg_catalog.=) d.objid
					LEFT JOIN pg_catalog.pg_type AS cs ON ca.castsource OPERATOR(pg_catalog.=) cs.oid
					LEFT JOIN pg_catalog.pg_type AS ct ON ca.casttarget OPERATOR(pg_catalog.=) ct.oid
					LEFT JOIN pg_opclass As oc ON oc.oid OPERATOR(pg_catalog.=) d.objid
					LEFT JOIN pg_opfamily As ofa ON ofa.oid OPERATOR(pg_catalog.=) d.objid
			WHERE d.deptype OPERATOR(pg_catalog.=) 'e' and e.extname OPERATOR(pg_catalog.=) $1 and c.relname OPERATOR(pg_catalog.=) $2 AND (proc.prokind OPERATOR(pg_catalog.=) 'a')  OPERATOR(pg_catalog.=) $4;$sql$;
		END IF;

		FOR var_r IN EXECUTE var_sql_list  USING param_extension, var_class, param_type, var_is_aggregate
		LOOP
			var_sql := var_sql OPERATOR(pg_catalog.||) var_r.remove_command OPERATOR(pg_catalog.||) ';';
		END LOOP;
		IF var_sql > '' THEN
			EXECUTE var_sql;
			var_result := true;
		END IF;

		RETURN var_result;
END;
$$
LANGUAGE plpgsql VOLATILE;

CREATE FUNCTION postgis_extension_drop_if_exists(param_extension text, param_statement text)
  RETURNS boolean AS
$$
DECLARE
	var_sql_ext text := 'ALTER EXTENSION ' OPERATOR(pg_catalog.||) pg_catalog.quote_ident(param_extension) OPERATOR(pg_catalog.||) ' ' OPERATOR(pg_catalog.||) pg_catalog.replace(param_statement, 'IF EXISTS', '');
	var_result boolean := false;
BEGIN
	BEGIN
		EXECUTE var_sql_ext;
		var_result := true;
	EXCEPTION
		WHEN OTHERS THEN
			--this is to allow ignoring if the object does not exist in extension
			var_result := false;
	END;
	RETURN var_result;
END;
$$
LANGUAGE plpgsql VOLATILE;

CREATE FUNCTION postgis_extension_AddToSearchPath(a_schema_name text)
RETURNS text
AS
$$
DECLARE
	var_result text;
	var_cur_search_path text;
BEGIN

	WITH settings AS (
		SELECT pg_catalog.unnest(setconfig) config
		FROM pg_catalog.pg_db_role_setting
		WHERE setdatabase OPERATOR(pg_catalog.=) (
			SELECT oid
			FROM pg_catalog.pg_database
			WHERE datname OPERATOR(pg_catalog.=) pg_catalog.current_database()
		) and setrole OPERATOR(pg_catalog.=) 0
	)
	SELECT pg_catalog.regexp_replace(config, '^search_path=', '')
	FROM settings WHERE config like 'search_path=%'
	INTO var_cur_search_path;

	RAISE NOTICE 'cur_search_path from pg_db_role_setting is %', var_cur_search_path;

	IF var_cur_search_path IS NULL THEN
		SELECT reset_val
		INTO var_cur_search_path
		FROM pg_catalog.pg_settings
		WHERE name OPERATOR(pg_catalog.=) 'search_path';

		RAISE NOTICE 'cur_search_path from pg_settings is %', var_cur_search_path;
	END IF;


	IF var_cur_search_path LIKE '%' OPERATOR(pg_catalog.||) pg_catalog.quote_ident(a_schema_name) OPERATOR(pg_catalog.||) '%' THEN
		var_result := a_schema_name OPERATOR(pg_catalog.||) ' already in database search_path';
	ELSE
		var_cur_search_path := var_cur_search_path OPERATOR(pg_catalog.||) ', '
                       OPERATOR(pg_catalog.||) pg_catalog.quote_ident(a_schema_name);
		EXECUTE 'ALTER DATABASE ' OPERATOR(pg_catalog.||) pg_catalog.quote_ident(pg_catalog.current_database())
                             OPERATOR(pg_catalog.||) ' SET search_path = ' OPERATOR(pg_catalog.||) var_cur_search_path;
		var_result := a_schema_name OPERATOR(pg_catalog.||) ' has been added to end of database search_path ';
	END IF;

	EXECUTE 'SET search_path = ' OPERATOR(pg_catalog.||) var_cur_search_path;

  RETURN var_result;
END
$$
LANGUAGE 'plpgsql' VOLATILE STRICT;
-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
--
----
-- PostGIS - Spatial Types for PostgreSQL
-- http://postgis.net
--
-- Copyright (C) 2012 Regina Obe <lr@pcorp.us>
--
-- This is free software; you can redistribute and/or modify it under
-- the terms of the GNU General Public Licence. See the COPYING file.
--
-- Author: Regina Obe <lr@pcorp.us>
--
-- This adds the tiger schema to search path
-- Functions in tiger are not schema qualified
-- so this is needed for them to work

SELECT postgis_extension_AddToSearchPath('tiger');
SELECT postgis_extension_drop_if_exists('postgis_tiger_geocoder', 'DROP SCHEMA tiger_data');
-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
--
----
-- PostGIS - Spatial Types for PostgreSQL
-- http://postgis.net
--
-- Copyright (C) 2011 Regina Obe <lr@pcorp.us>
--
-- This is free software; you can redistribute and/or modify it under
-- the terms of the GNU General Public Licence. See the COPYING file.
--
-- Author: Regina Obe <lr@pcorp.us>
--
-- This drops extension helper functions
-- and should be called at the end of the extension upgrade file
DROP FUNCTION postgis_extension_remove_objects(text, text);
DROP FUNCTION postgis_extension_drop_if_exists(text, text);
DROP FUNCTION IF EXISTS postgis_extension_AddToSearchPath(varchar);
DROP FUNCTION IF EXISTS postgis_extension_AddToSearchPath(text);
SELECT pg_catalog.pg_extension_config_dump('geocode_settings', '');
SELECT pg_catalog.pg_extension_config_dump('pagc_gaz', 'WHERE is_custom=true');
SELECT pg_catalog.pg_extension_config_dump('pagc_lex', 'WHERE is_custom=true');
SELECT pg_catalog.pg_extension_config_dump('pagc_rules', 'WHERE is_custom=true');

COMMENT ON FUNCTION Drop_Indexes_Generate_Script(text ) IS 'args: param_schema=tiger_data - Generates a script that drops all non-primary key and non-unique indexes on tiger schema and user specified schema. Defaults schema to tiger_data if no schema is specified.';
			
COMMENT ON FUNCTION Drop_Nation_Tables_Generate_Script(text ) IS 'args: param_schema=tiger_data - Generates a script that drops all tables in the specified schema that start with county_all, state_all or state code followed by county or state.';
			
COMMENT ON FUNCTION Drop_State_Tables_Generate_Script(text , text ) IS 'args: param_state, param_schema=tiger_data - Generates a script that drops all tables in the specified schema that are prefixed with the state abbreviation. Defaults schema to tiger_data if no schema is specified.';
			
COMMENT ON FUNCTION geocode(varchar , integer , geometry ) IS 'args: address, max_results=10, restrict_region=NULL, OUT addy, OUT geomout, OUT rating - Takes in an address as a string (or other normalized address) and outputs a set of possible locations which include a point geometry in NAD 83 long lat, a normalized address for each, and the rating. The lower the rating the more likely the match. Results are sorted by lowest rating first. Can optionally pass in maximum results, defaults to 10, and restrict_region (defaults to NULL)';
			
COMMENT ON FUNCTION geocode(norm_addy , integer , geometry ) IS 'args: in_addy, max_results=10, restrict_region=NULL, OUT addy, OUT geomout, OUT rating - Takes in an address as a string (or other normalized address) and outputs a set of possible locations which include a point geometry in NAD 83 long lat, a normalized address for each, and the rating. The lower the rating the more likely the match. Results are sorted by lowest rating first. Can optionally pass in maximum results, defaults to 10, and restrict_region (defaults to NULL)';
			
COMMENT ON FUNCTION geocode_intersection(text , text , text , text , text , integer ) IS 'args:  roadway1,  roadway2,  in_state,  in_city,  in_zip, max_results=10, OUT addy, OUT geomout, OUT rating - Takes in 2 streets that intersect and a state, city, zip, and outputs a set of possible locations on the first cross street that is at the intersection, also includes a geomout as the point location in NAD 83 long lat, a normalized_address (addy) for each location, and the rating. The lower the rating the more likely the match. Results are sorted by lowest rating first. Can optionally pass in maximum results, defaults to 10. Uses Tiger data (edges, faces, addr), PostgreSQL fuzzy string matching (soundex, levenshtein).';
			
COMMENT ON FUNCTION Get_Geocode_Setting(text ) IS 'args:  setting_name - Returns value of specific setting stored in tiger.geocode_settings table.';
			
COMMENT ON FUNCTION get_tract(geometry , text ) IS 'args:  loc_geom,  output_field=name - Returns census tract or field from tract table of where the geometry is located. Default to returning short name of tract.';
			
COMMENT ON FUNCTION Install_Missing_Indexes() IS 'Finds all tables with key columns used in geocoder joins and filter conditions that are missing used indexes on those columns and will add them.';
			
COMMENT ON FUNCTION loader_generate_census_script(text[], text) IS 'args: param_states, os - Generates a shell script for the specified platform for the specified states that will download Tiger census state tract, bg, and tabblocks data tables, stage and load into tiger_data schema. Each state script is returned as a separate record.';
			
COMMENT ON FUNCTION loader_generate_script(text[], text) IS 'args: param_states, os - Generates a shell script for the specified platform for the specified states that will download Tiger data, stage and load into tiger_data schema. Each state script is returned as a separate record. Latest version supports Tiger 2010 structural changes and also loads census tract, block groups, and blocks tables.';
			
COMMENT ON FUNCTION loader_generate_nation_script(text) IS 'args: os - Generates a shell script for the specified platform that loads in the county and state lookup tables.';
			
COMMENT ON FUNCTION Missing_Indexes_Generate_Script() IS 'Finds all tables with key columns used in geocoder joins that are missing indexes on those columns and will output the SQL DDL to define the index for those tables.';
			
COMMENT ON FUNCTION normalize_address(varchar ) IS 'args: in_address - Given a textual street address, returns a composite norm_addy type that has road suffix, prefix and type standardized, street, streetname etc. broken into separate fields. This function will work with just the lookup data packaged with the tiger_geocoder (no need for tiger census data).';
			
COMMENT ON FUNCTION pagc_normalize_address(varchar ) IS 'args: in_address - Given a textual street address, returns a composite norm_addy type that has road suffix, prefix and type standardized, street, streetname etc. broken into separate fields. This function will work with just the lookup data packaged with the tiger_geocoder (no need for tiger census data). Requires address_standardizer extension.';
			
COMMENT ON FUNCTION pprint_addy(norm_addy ) IS 'args: in_addy - Given a norm_addy composite type object, returns a pretty print representation of it. Usually used in conjunction with normalize_address.';
			
COMMENT ON FUNCTION Reverse_Geocode(geometry , boolean ) IS 'args: pt, include_strnum_range=false, OUT intpt, OUT addy, OUT street - Takes a geometry point in a known spatial ref sys and returns a record containing an array of theoretically possible addresses and an array of cross streets. If include_strnum_range = true, includes the street range in the cross streets.';
			
COMMENT ON FUNCTION Topology_Load_Tiger(varchar , varchar , varchar ) IS 'args: topo_name, region_type, region_id - Loads a defined region of tiger data into a PostGIS Topology and transforming the tiger data to spatial reference of the topology and snapping to the precision tolerance of the topology.';
			
COMMENT ON FUNCTION Set_Geocode_Setting(text , text ) IS 'args:  setting_name,  setting_value - Sets a setting that affects behavior of geocoder functions.';
			