Why am I getting run-time error in this code. It was in June Long Challenge

def fun(z, m, n, o):

if m - z == o - n:

print(1)

return

elif z != 0 and n != 0 and m / z == o / n == m // z:

print(1)

return

else:

print(2)

return

for T in range(int(input())):

a, b, c = map(int, input().split())

p, q, r = map(int, input().split())

lis1 = [a, b, c]

lis3 = [a, b, c]

lis2 = [p, q, r]

```
if a == p and b == q and c == r:
print(0)
continue
if (a == p and b == q) or (a == p and c == r) or (b == q and c == r):
print(1)
continue
if a == p or b == q or c == r:
if a == p:
fun(b, q, c, r)
continue
elif b == q:
fun(a, p, c, r)
continue
else:
fun(a, p, b, q)
continue
if a != p and b != q and c != r:
if (a != 0 and b != 0 and c != 0) and (p / a == q / b == r / c == p // a):
print(1)
continue
if p - a == q - b == r - c:
print(1)
continue
if ((a != 0 and b != 0) and (p / a == q / b == p // a)) or (
(b != 0 and c != 0) and (q / b == r / c == q // b)) or (
(a != 0 and c != 0) and (p / a == r / c == p // a)):
print(2)
continue
if lis3.count(0) < 2:
X = (q - p) / (b - a)
if q * (c - a) + p * (b - c) + r * (a - b) == 0 and X == X // 1:
print(2)
continue
else:
print(3)
else:
print(3)
continue
```