Buggy python submission (verdict: Runtime Error):
n, m = map(int, input().split())
l = [[] for _ in range(m)]
for i in range(m):
  a, b  = map(int, input().split())
  l[a-1].append(b-1)
  l[b-1].append(a-1)

import itertools
ans = 0
for p in itertools.permutations(range(n)):
    if p[0] == 0:
        flag = True
        for i in range(n-1):
            if not p[i+1] in l[p[i]]:
                flag = False
        if flag:
            ans += 1
print(ans)


Fixed submission:
N, M = map(int, input().split())
L = [[] for i in range(N)]
for i in range(M):
    a,b = map(int, input().split())
    L[a-1].append(b-1)
    L[b-1].append(a-1)
    
import itertools
count = 0
for p in itertools.permutations(range(N)):
    if p[0] == 0:
#         print("p",p)
        flag = True
        for i in range(N-1):
#             print(p[i+1], L[p[i]])
            if not p[i+1] in L[p[i]]:
                flag = False
#             print(flag)
        if flag:
            count += 1
print(count)

Buggy python submission (verdict: Runtime Error):
n, m = map(int, input().split())
l = [[] for _ in range(m)]
for i in range(m):
  a, b  = map(int, input().split())
  l[a-1].append(b-1)
  l[b-1].append(a-1)

import itertools
ans = 0
for p in itertools.permutations(range(n)):
    if p[0] == 0:
        flag = 1
    else:
        flag = 0
        for i in range(n-1):
            if not p[i+1] in l[p[i]]:
                flag = 0
        if flag == 1:
            ans += 1
print(ans)


Fixed submission:
N, M = map(int, input().split())
L = [[] for i in range(N)]
for i in range(M):
    a,b = map(int, input().split())
    L[a-1].append(b-1)
    L[b-1].append(a-1)
    
import itertools
count = 0
for p in itertools.permutations(range(N)):
    if p[0] == 0:
#         print("p",p)
        flag = True
        for i in range(N-1):
#             print(p[i+1], L[p[i]])
            if not p[i+1] in L[p[i]]:
                flag = False
#             print(flag)
        if flag:
            count += 1
print(count)

Buggy python submission (verdict: Runtime Error):
n, m = map(int, input().split())
l = [[] for _ in range(m)]
for i in range(m):
  a, b  = map(int, input().split())
  l[a-1].append(b-1)
  l[b-1].append(a-1)

import itertools
ans = 0
for p in itertools.permutations(range(n)):
    if p[0] == 0:
        flag = 1
        for i in range(n-1):
            if not p[i+1] in l[p[i]]:
                flag = 0
        if flag == 1:
            ans += 1
print(ans)

Fixed submission:
N, M = map(int, input().split())
L = [[] for i in range(N)]
for i in range(M):
    a,b = map(int, input().split())
    L[a-1].append(b-1)
    L[b-1].append(a-1)
    
import itertools
count = 0
for p in itertools.permutations(range(N)):
    if p[0] == 0:
#         print("p",p)
        flag = True
        for i in range(N-1):
#             print(p[i+1], L[p[i]])
            if not p[i+1] in L[p[i]]:
                flag = False
#             print(flag)
        if flag:
            count += 1
print(count)

Buggy python submission (verdict: Runtime Error):
n, m = map(int, input().split())
l = [[] for _ in range(m)]
for i in range(m):
  a, b  = map(int, input().split())
  l[a-1].append(b-1)
  l[b-1].append(a-1)

import itertools
ans = 0
for p in itertools.permutations(range(n)):
    if p[0] == 0:
        flag = 1
        for i in range(n-1):
            if p[i+1] in l[p[i]]:
                pass
            else:
                flag = 0
    if flag == 1:
        ans += 1
print(ans)

Fixed submission:
N, M = map(int, input().split())
L = [[] for i in range(N)]
for i in range(M):
    a,b = map(int, input().split())
    L[a-1].append(b-1)
    L[b-1].append(a-1)
    
import itertools
count = 0
for p in itertools.permutations(range(N)):
    if p[0] == 0:
#         print("p",p)
        flag = True
        for i in range(N-1):
#             print(p[i+1], L[p[i]])
            if not p[i+1] in L[p[i]]:
                flag = False
#             print(flag)
        if flag:
            count += 1
print(count)