public TreeNode search(String s){

        //Only continue the search if there are nodes in the open list
        if(open.getLength() >0){

            System.out.println("\nNext Step:");
            System.out.println("Open List: "+open.getStringRepresentation());
            System.out.println("Closed List: " + closed.getStringRepresentation());

            TreeNode t = open.pop();    //Get the first thing in open list

            System.out.println("Node Being Considered: " + t.getValueAsString());

            //If t is the value being searched for, return it.
            if(t.getValue().equals(s)){
                System.out.println("Node Found");
                return t;
            }

            //Get the children from t
            ArrayList<TreeNode> tArray = t.getChildren();
            TreeNode p;


            for(TreeNode n : tArray){

                //Set parents for all the nodes so long as they have not already been set
                if(!open.isInStack(n) && !closed.inQueue(n)){
                    n.setParent(t);
                }

                //If any of the children are what is being searched for, return it
                if(n.getValue().equals(s)){
                    System.out.println("Node Found");
                    return n;
                }
            }

            //Push children on the stack in inverse order to match the order defined in the lecture slides
            for(int i= tArray.size(); i>0; i--){
                p=tArray.get(i-1);
                if(!open.isInStack(p) && !closed.inQueue(p)){
                    open.push(p);
                }
            }

            //Close the current node
            closed.queue(t);

            //Continue the search
            return search(s);
        }

        //Their are no more nodes in the open list, so the searched for value is unfindable
        return null;
    }