| 162 | } |
| 163 | |
| 164 | public static void main(String[] args) throws Exception { |
| 165 | FastReader in = new FastReader(System.in); |
| 166 | PrintWriter out = new PrintWriter(new OutputStreamWriter(System.out)); |
| 167 | t = in.nextInt(); |
| 168 | for (int test = 1; test <= t; test++) { |
| 169 | n = in.nextInt(); |
| 170 | m = in.nextInt(); |
| 171 | k = in.nextInt(); |
| 172 | cntt = n; |
| 173 | rootOut = buildOut(1, n); |
| 174 | rootIn = buildIn(1, n); |
| 175 | for (int i = 1, a, b, c, d, w; i <= m; i++) { |
| 176 | a = in.nextInt(); |
| 177 | b = in.nextInt(); |
| 178 | c = in.nextInt(); |
| 179 | d = in.nextInt(); |
| 180 | w = in.nextInt(); |
| 181 | rangeToRange(a, b, c, d, w); |
| 182 | rangeToRange(c, d, a, b, w); |
| 183 | } |
| 184 | int ans = dijkstra(1, n); |
| 185 | if (ans == -1) { |
| 186 | out.println("CreationAugust is a sb!"); |
| 187 | } else { |
| 188 | out.println(ans); |
| 189 | } |
| 190 | clear(); |
| 191 | } |
| 192 | out.flush(); |
| 193 | out.close(); |
| 194 | } |
| 195 | |
| 196 | // 读写工具类 |
| 197 | static class FastReader { |