public String toString()
    {
        String output = "";
        int line = 1;
        for (int i = 0; i < array.length; i++)
        {
            if (i == line - 1)
            {
                output += "\n";
                line *= 2;
            }
            output += (array[i] == null ? "null" : array[i].toString()) + (i < array.length - 1 ? ", " : "");
        }
        return output;
    }