def get_current_operator(client):
    """ Returns the symbol of the currently selected operator on the deepest state for the given SoarClient
        (Prints the stack and gets the bottom operator) """
    stack = client.execute_command("p --stack").split("\n")
    # Find the last line in the stack printout that matches '  :        O: O452 (operator-name)'
    for line in reversed(stack):
        words = line.split()
        if len(words) >= 3 and words[1] == 'O:':
            return words[2]
    return ""