from collections import defaultdict import heapq n, m = map(int, input().split()) G = defaultdict(set) for i in range(m): u, v = map(int, input().split()) G[u].add((v, 1)) #w = 1 G[v].add((u, 1)) # w = 1 # print(G) distances = {v: float("inf") for v in G} # print(distances) start = 1 dista...