from sys import stdin def read(): line = stdin.readline() if not line: raise EOFError assert line[-1] == "\n" line = line[:-1] assert line.strip() == line return line N, M, K = map(int, read().split()) assert(1 <= N <= 6) assert(0 <= M <= N * (N - 1) // 2) assert(1 <= K <= 8) s = set() for _ in range(M): u, v = map(int, read().split()) assert(1 <= u < v <= N) s.add((u, v)) assert(len(s) == M) try: read() assert False except EOFError: pass