N, M, Q = map(int, input().split()) AB = [list(map(int, input().split())) for _ in range(N)] INF = 10**18 dp = [[INF]*(1<