d = {}
for line in open ("filename"): #open file
line = line.strip().split() #splitting file into columns
d.setdefault (line[-1],[-3],[])
d[-1][-3].append(line[0][1][3][4])
for i,j,k,l,m,n in d.iteritems ():
while i = +, j = +:
if (k<m, l<m):
print k, '\t', l, '\t', i, '\t', m, '\t', n,'\t', j, '\t', 'Good'
elif (k>n, l>n):
print k, '\t', l, '\t', i, '\t', m, '\t', n,'\t', j, '\t', 'Good'
elif (k>m, l<n):
print k, '\t', l, '\t', i, '\t', m, '\t', n,'\t', j, '\t', 'Bad'
elif (k<m, l<n):
print k, '\t', l, '\t', i, '\t', m, '\t', n,'\t', j, '\t', 'Average'
elif (k>m, l>n):
print k, '\t', l, '\t', i, '\t', m, '\t', n,'\t', j, '\t', 'Average'
break