N, M, K = map(int, input().split()) X = [int(x)-1 for x in input().split()] to = [[False]*N for _ in range(N)] for _ in range(M): a, b = map(int, input().split()) a -= 1 b -= 1 to[a][b] = True to[b][a] = True # dp[S][i][j] := iからjに行くときに、Sの頂点を通って行けるか # dp[S][i][j] = dp[S-{j}][i][k] and to[k][j] for k in S dp = [[[False]*N for _ in range(N)] for _ in range(1<>i&1: continue for j in range(N): if not S>>j&1: continue for k in range(N): if S>>k&1: continue if dp[S][i][j] and to[j][k]: dp[S|1<