import java.util.StringTokenizer;

interface BinaryIntTree {

    // Return whether or not I am empty.
    public boolean empty();


    // Make me contain all the integers in st.
    // If I already contain anything, that is lost.
    // If n is less than 1, I will be made empty.
    // Precondition: n is <= the number of integers in st.
    public void build(StringTokenizer st, int n);


    // Return true iff I contain i.
    public boolean contains(int i);


    // Return the number of times num occurs in me.
    public int numOccurrences(int num);

     
    // Return the biggest integer in me.
    // Precondition: I am not empty.
    public int biggest();


    // Replace every occurrence of old in my tree, with replacement.
    public void replace(int old, int replacement);

     
    // Flip me.  That is, for each node in me, swaps that node's left and
    // right child.
    public void flip();


    // Return a (possibly multi-line) string that nicely represents my 
    // contents and structure.  Indentation is used to help show my structure.
    public String toString();
}
