Buggy python submission (verdict: Runtime Error):
import collections

n, m = list(map(int, input().split()))
ab = [list(map(int, input().split())) for _ in range(m)]

l = []
for _ in range(n):
  l.append([])

# for x in range(n):
#   l[x]

for a, b in ab:
  a -= 1
  b -= 1
  l[a].append(b)
  l[b].append(a)

# c = [None] * n

# for i in range(n):
#   if c[i] is None:
#     c[i] = i
#   for f in l[i]:
#     if c[f] is None:
#       c[f] = i


# https://algo-logic.info/connected-components-num/

color = [None] * n


def dfs(i, c):
  if color[i] is not None:
    return
  color[i] = c

  for f in l[i]:
    dfs(f, c)


for i in range(n):
  if color[i] is None:
    dfs(i, i)

print(max([v for k, v in collections.Counter(color).items()]))


Fixed submission:
import collections
import sys

n, m = list(map(int, input().split()))
ab = [list(map(int, input().split())) for _ in range(m)]

l = []
for _ in range(n):
  l.append([])

# for x in range(n):
#   l[x]

for a, b in ab:
  a -= 1
  b -= 1
  l[a].append(b)
  l[b].append(a)

# c = [None] * n

# for i in range(n):
#   if c[i] is None:
#     c[i] = i
#   for f in l[i]:
#     if c[f] is None:
#       c[f] = i


# https://algo-logic.info/connected-components-num/

color = [None] * n

sys.setrecursionlimit(3*10**5)


def dfs(i, c):
  if color[i] is not None:
    return
  color[i] = c

  for f in l[i]:
    dfs(f, c)


for i in range(n):
  if color[i] is None:
    dfs(i, i)

print(max([v for k, v in collections.Counter(color).items()]))

Buggy python submission (verdict: Runtime Error):
import collections

n, m = list(map(int, input().split()))
ab = [list(map(int, input().split())) for _ in range(m)]

l = []
for _ in range(n):
  l.append([])

# for x in range(n):
#   l[x]

for a, b in ab:
  a -= 1
  b -= 1
  l[a].append(b)
  l[b].append(a)

# c = [None] * n

# for i in range(n):
#   if c[i] is None:
#     c[i] = i
#   for f in l[i]:
#     if c[f] is None:
#       c[f] = i


c = [None] * n

def dfs(i, d):
  if c[i] is not None:
    return
  c[i] = d

  for f in l[i]:
    dfs(f, d)


for i in range(n):
  if c[i] is None:
    dfs(i, i)

print(max([v for k, v in collections.Counter(c).items()]))


Fixed submission:
import collections
import sys

n, m = list(map(int, input().split()))
ab = [list(map(int, input().split())) for _ in range(m)]

l = []
for _ in range(n):
  l.append([])

# for x in range(n):
#   l[x]

for a, b in ab:
  a -= 1
  b -= 1
  l[a].append(b)
  l[b].append(a)

# c = [None] * n

# for i in range(n):
#   if c[i] is None:
#     c[i] = i
#   for f in l[i]:
#     if c[f] is None:
#       c[f] = i


# https://algo-logic.info/connected-components-num/

color = [None] * n

sys.setrecursionlimit(3*10**5)


def dfs(i, c):
  if color[i] is not None:
    return
  color[i] = c

  for f in l[i]:
    dfs(f, c)


for i in range(n):
  if color[i] is None:
    dfs(i, i)

print(max([v for k, v in collections.Counter(color).items()]))

Buggy python submission (verdict: Time Limit Exceeded):
import collections

n, m = list(map(int, input().split()))
ab = [list(map(int, input().split())) for _ in range(m)]

l = []
for _ in range(n):
  l.append([False] * n)

for x in range(n):
  l[x][x] = True

for a, b in ab:
  a -= 1
  b -= 1
  l[a][b] = True
  l[b][a] = True

c = [None] * n

for i in range(n):
  if c[i] is None:
    c[i] = i
  for j in range(n):
    if l[i][j]:
      if c[j] is None:
        c[j] = i

vs = []
for k, v in collections.Counter(c).items():
  vs.append(v)

print(max(vs))


Fixed submission:
import collections
import sys

n, m = list(map(int, input().split()))
ab = [list(map(int, input().split())) for _ in range(m)]

l = []
for _ in range(n):
  l.append([])

# for x in range(n):
#   l[x]

for a, b in ab:
  a -= 1
  b -= 1
  l[a].append(b)
  l[b].append(a)

# c = [None] * n

# for i in range(n):
#   if c[i] is None:
#     c[i] = i
#   for f in l[i]:
#     if c[f] is None:
#       c[f] = i


# https://algo-logic.info/connected-components-num/

color = [None] * n

sys.setrecursionlimit(3*10**5)


def dfs(i, c):
  if color[i] is not None:
    return
  color[i] = c

  for f in l[i]:
    dfs(f, c)


for i in range(n):
  if color[i] is None:
    dfs(i, i)

print(max([v for k, v in collections.Counter(color).items()]))