import heapq import sys input = sys.stdin.readline INF = int(1e9) n, m, x = map(int, input().split()) graph = [[] for i in range(n + 1)] for _ in range(m): a, b, c = map(int, input().split()) graph[a].append((b, c)) def dijkstra(start): q = [] heapq.heappush(q, (0, start)) distance[start] = 0 while q: dist, now = heapq.heappop(q) if distance[now] < dist: continue for i in graph[now]: cost = dist..