from collections import deque def dfs(v): print(v, end=' ') visited[v] = 1 for i in graph[v]: if visited[i] != 1: dfs(i) def bfs(v): visited[v] = 0 q = deque() q.append(v) while q: c = q.popleft() print(c, end=' ') for j in graph[c]: if visited[j]: q.append(j) visited[j] = 0 N, M, V = map(int, input().split()) graph = [[] for _ in range(N+1)] visited = [0] * (N+1) for i in range(M): n1, n2 = map..