Buggy python submission (verdict: Runtime Error):
n = int(input()))
for i in range(n):
    M = [0] * n
    u = list(map(int, input().split()))
    v = u[0]
    k = u[0]
    for j in range(k):
        M[u - 1][v - 1] = 1

for i in range M:
    print(i, sep = " ")

Fixed submission:
n = int(input())
M = [[0] * n for i in range (n)]
for i in range(n):
    u = list(map(int, input().split()))
    v = u[0]
    for j in u[2:]:
        M[v - 1][j - 1] = 1

for i in M:
    print(*i)

Buggy python submission (verdict: Runtime Error):
n = int(input()))
for i in range(n):
    M = [0] * n
    u = list(map(int, input().split()))
    v = u[0]
    k = u[1]
    for j in range(k):
        M[u - 1][v - 1] = 1

for i in range n:
    for j in range n:
        if (j):
            print(" ")
        print(M[i-1][j-1]

Fixed submission:
n = int(input())
M = [[0] * n for i in range (n)]
for i in range(n):
    u = list(map(int, input().split()))
    v = u[0]
    for j in u[2:]:
        M[v - 1][j - 1] = 1

for i in M:
    print(*i)

Buggy python submission (verdict: Runtime Error):
n = int(input()))
for i in range(n):
    M = [0] * n
    u = list(map(int, input().split()))
    v = u[0]
    for j in u[2:]:
        M[u - 1][v - 1] = 1

for i in M:
    print(*i)

Fixed submission:
n = int(input())
M = [[0] * n for i in range (n)]
for i in range(n):
    u = list(map(int, input().split()))
    v = u[0]
    for j in u[2:]:
        M[v - 1][j - 1] = 1

for i in M:
    print(*i)

Buggy python submission (verdict: Runtime Error):
n = int(input()))
M = [[0] * n for i in range(n)]
for i in range(n):
    u = list(map(int, input().split()))
    v = u[0]
    for j in u[2:]:
        M[u - 1][v - 1] = 1

for i in M:
    print(*i)

Fixed submission:
n = int(input())
M = [[0] * n for i in range (n)]
for i in range(n):
    u = list(map(int, input().split()))
    v = u[0]
    for j in u[2:]:
        M[v - 1][j - 1] = 1

for i in M:
    print(*i)

Buggy python submission (verdict: Runtime Error):
n = int(input()))
for i in range(n):
    M = [0] * n
    u = list(map(int, input().split()))
    v = u[0]
    for j in u[2:]:
        M[v - 1][j - 1] = 1

for i in M:
    print(*i)

Fixed submission:
n = int(input())
M = [[0] * n for i in range (n)]
for i in range(n):
    u = list(map(int, input().split()))
    v = u[0]
    for j in u[2:]:
        M[v - 1][j - 1] = 1

for i in M:
    print(*i)

Buggy python submission (verdict: Runtime Error):
n = int(input()))
M = [[0] * n in  range (n)]
for i in range(n):
    u = list(map(int, input().split()))
    v = u[0]
    for j in u[2:]:
        M[v - 1][j - 1] = 1

for i in M:
    print(*i)

Fixed submission:
n = int(input())
M = [[0] * n for i in range (n)]
for i in range(n):
    u = list(map(int, input().split()))
    v = u[0]
    for j in u[2:]:
        M[v - 1][j - 1] = 1

for i in M:
    print(*i)

Buggy python submission (verdict: Runtime Error):
n = int(input()))
M = [[0] * n for i in range (n)]
for i in range(n):
    u = list(map(int, input().split()))
    v = u[0]
    for j in u[2:]:
        M[v - 1][j - 1] = 1

for i in M:
    print(*i)

Fixed submission:
n = int(input())
M = [[0] * n for i in range (n)]
for i in range(n):
    u = list(map(int, input().split()))
    v = u[0]
    for j in u[2:]:
        M[v - 1][j - 1] = 1

for i in M:
    print(*i)

Buggy python submission (verdict: Runtime Error):
n = int(input())
M = [[0] * n for i in range???(n)]
for i in range(n):
    u = list(map(int, input().split()))
    v = u[0]
    for j in u[2:]:
        M[v - 1][j - 1] = 1

for i in M:
    print(*i)

Fixed submission:
n = int(input())
M = [[0] * n for i in range (n)]
for i in range(n):
    u = list(map(int, input().split()))
    v = u[0]
    for j in u[2:]:
        M[v - 1][j - 1] = 1

for i in M:
    print(*i)