Buggy python submission (verdict: Runtime Error):
l = []
N = int(input())
for i in range(N):
	a,b,c = map(int,input().split(' '))
	d = a + b + c
	l.append(d)

e = l.count(9)
f = l.count(8)
g = l.count(7)
h = l.count(6)

ans = 0

if e>1:
	ans += e - 1
if f>1:
	ans += f - 1
if g>1:
	ans += g - 1
if h>1:
	ans += h - 1

if e = 1 and f = 1 and g = 1 and h = 1:
	ans = 4

print(ans)

Fixed submission:
N = int(input())
l = []
s = set()
for i in range(N):
	a,b,c = map(int,input().split(' '))
	l.append(a)
	l.append(b)
	l.append(c)
	l.sort()
	d = str(l[0])
	e = str(l[1])
	f = str(l[2])
	g = d + e + f
	s.add(g)
	l = []
print(N - len(s))

Buggy python submission (verdict: Runtime Error):
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner s = new Scanner(System.in);
		int N = s.nextInt();
		int[] I = new int[N];
		int D = 0;
		int E = 0;
		int F = 0;
		int G = 0;
		int ans = 0;

		for(int i=0;i<N;i++){
			int a = s.nextInt();
			int b = s.nextInt();
			int c = s.nextInt();

			int n = a + b + c;
			I[i] = n;
		}
		for(int j=0;j<N;j++){
			int d = I[j];
			if(d==9){
				if(D!=1){
					D += 1;
				}else{
					ans += 1;
				}
			}
			if(d==8){
				if(E!=1){
					E += 1;
				}else{
					ans += 1;
				}
			}
			if(d==7){
				if(F!=1){
					F += 1;
				}else{
					ans += 1;
				}
			}
			if(d==6){
				if(G!=1){
					G += 1;
				}else{
					ans += 1;
				}
			}
		}
		System.out.println(ans);
	}
}

Fixed submission:
N = int(input())
l = []
s = set()
for i in range(N):
	a,b,c = map(int,input().split(' '))
	l.append(a)
	l.append(b)
	l.append(c)
	l.sort()
	d = str(l[0])
	e = str(l[1])
	f = str(l[2])
	g = d + e + f
	s.add(g)
	l = []
print(N - len(s))

Buggy python submission (verdict: Runtime Error):
N = int(input())
s = set()
for i in range(N):
	a = map(int,input().split(' '))
	b = sorted(a)
	s.add(d)
print(N - len(s))

Fixed submission:
N = int(input())
l = []
s = set()
for i in range(N):
	a,b,c = map(int,input().split(' '))
	l.append(a)
	l.append(b)
	l.append(c)
	l.sort()
	d = str(l[0])
	e = str(l[1])
	f = str(l[2])
	g = d + e + f
	s.add(g)
	l = []
print(N - len(s))

Buggy python submission (verdict: Runtime Error):
N = int(input())
s = set()
for i in range(N):
	a,b,c = map(str,input().split(' '))
	e = a + b + c
	e = sorted(d)
	s.add(e)
print(N - len(s))

Fixed submission:
N = int(input())
l = []
s = set()
for i in range(N):
	a,b,c = map(int,input().split(' '))
	l.append(a)
	l.append(b)
	l.append(c)
	l.sort()
	d = str(l[0])
	e = str(l[1])
	f = str(l[2])
	g = d + e + f
	s.add(g)
	l = []
print(N - len(s))

Buggy python submission (verdict: Runtime Error):
N = int(input())
s = set()
l = []
for i in range(N):
	a,b,c = map(int,input().split(' '))
	l.append(a,b,c)
	e = sorted(l)
	s.add(e)
	l = 0
print(N - len(s))

Fixed submission:
N = int(input())
l = []
s = set()
for i in range(N):
	a,b,c = map(int,input().split(' '))
	l.append(a)
	l.append(b)
	l.append(c)
	l.sort()
	d = str(l[0])
	e = str(l[1])
	f = str(l[2])
	g = d + e + f
	s.add(g)
	l = []
print(N - len(s))

Buggy python submission (verdict: Runtime Error):
N = int(input())
l = []
for i in range(N):
	a,b,c = map(int,input().split(' '))
	l.append(a,b,c)
	l.sort()
	s.add(l)
	l = []
print(N - len(s))

Fixed submission:
N = int(input())
l = []
s = set()
for i in range(N):
	a,b,c = map(int,input().split(' '))
	l.append(a)
	l.append(b)
	l.append(c)
	l.sort()
	d = str(l[0])
	e = str(l[1])
	f = str(l[2])
	g = d + e + f
	s.add(g)
	l = []
print(N - len(s))

Buggy python submission (verdict: Runtime Error):
N = int(input())
l = []
for i in range(N):
	a,b,c = map(int,input().split(' '))
	l.append(a)
	l.append(b)
	l.append(c)
	l.sort()
	s.add(l)
	l = []
print(N - len(s))

Fixed submission:
N = int(input())
l = []
s = set()
for i in range(N):
	a,b,c = map(int,input().split(' '))
	l.append(a)
	l.append(b)
	l.append(c)
	l.sort()
	d = str(l[0])
	e = str(l[1])
	f = str(l[2])
	g = d + e + f
	s.add(g)
	l = []
print(N - len(s))

Buggy python submission (verdict: Runtime Error):
N = int(input())
l = []
s = set()
for i in range(N):
	a,b,c = map(int,input().split(' '))
	l.append(a)
	l.append(b)
	l.append(c)
	l.sort()
	s.add(l)
	l = []
print(N - len(s))

Fixed submission:
N = int(input())
l = []
s = set()
for i in range(N):
	a,b,c = map(int,input().split(' '))
	l.append(a)
	l.append(b)
	l.append(c)
	l.sort()
	d = str(l[0])
	e = str(l[1])
	f = str(l[2])
	g = d + e + f
	s.add(g)
	l = []
print(N - len(s))