def play(good, bad, trios):
    firstTwo = receiveGens( True, [] )
    assert len(firstTwo) == 2, "Starting with more than two plays: bad juju"
    game = GameState( firstTwo[0], firstTwo[1] )
    
    nPlays = game.getValidNextPlays()
    
    for play in nPlays:
        print( play, end = " ")
        k = checkIt( game.copy(), play, good, bad )
        if k==1:
            print( "We have found the good one!!!!", game.getPlays()+[play] )
    

    print("Good trios we've found:")
    for n in good:
        if (len(n) == 3) and (n not in trios):
            trios.append( n )
    
    trios = sortIt( trios )
    for n in trios:
        print( n, end = "\t" )

    save( good, "good" )
    save( bad, "bad" )
    save( trios, "trios")
    savetext( trios, "trios")
def play():
    global good
    global bad
    global trios
    twoPlays = receiveGens(True, [])
    assert len(twoPlays) == 2, "Starting with more than two plays; could cause errors"
    P1gens = NumericalSemigroup(receiveGens(True, [])).minGens

    thirdly = ExhaustiveGame(NumericalSemigroup(P1gens)).thirds

    for n in thirdly:
        print(n, end=" ")
        k = checkit(P1gens + [n])
        if k == 1:
            print("WE HAVE FOUND THE GOOD ONE!!!", P1gens + [n])

    # print( "Good (after P1) sets", good)
    # print( "Bad (after P1) sets", bad)
    # print( good )
    print("Good trios we've found:")
    for n in good:
        if (len(n) == 3) and (n not in trios):
            trios.append(n)

    trios = sortIt(trios)
    # good = sortIt( good )
    # bad = sortIt( bad )
    for n in trios:
        print(n, end="\t")

    save(good, "good")
    save(bad, "bad")
    save(trios, "trios")
    savetext(trios, "trios")