for order in orderings:
rules = [] # list of "ab" where a is before b in the alphabet
newNamesOrdering = [names[order[0]], names[order[1]], names[order[2]]]
if not findIfPossible(L, newNamesOrdering, rules):
result[order[1]] = "NO"

return result[0] + " " + result[1] + " " + result[2]

with open("C-large-practice.in", "r") as myFile:
T = eval(myFile.readline())
for case in range(T):

# This works fine for the small datasetdef solve():
for emp in range(len(experiences)):
hooked = False
for boss in range(emp+1, len(experiences)):
if acceptsEmployee(boss, emp) and not hooked:
takeEmployee(boss, emp)
hooked = True