This is a solution I prepared for the problem --> Eidi Gift.

**What’s wrong with this code??**

**I couldn’t find any test cases not working successfully !!!
Please help !**

```
def eidi(l):
if len(set(l[:3])) == len(set(l[3:])):
F = l[:3]
S = l[3:]
for i in range(2):
if F.index(min(F)) == S.index(min(S)):
F.pop(F.index(min(F)))
S.pop(S.index(min(S)))
continue
else:
return "NOT FAIR"
return "FAIR"
else:
return "NOT FAIR"
check = list()
for i in range(int(input())):
l = list(map(int, input().split()))
check.append(eidi(l))
print(*check, sep="\n")
```