public Object[] next()
            {
                Object[] tr = output.toArray();

                Object to;
                while (true)
                {
                    if (itering.size() == 0)
                    {
                        output = null;
                        return tr;
                    }
                    to = itering.getLast();
                    output.removeLast();
                    if (to instanceof Iterator)
                    {
                        Iterator it = (Iterator)to;
                        if (it.hasNext())
                        {
                            output.addLast(it.next());
                            break;
                        }
                    }
                    itering.removeLast();
                }
                for (int i = itering.size(); i < proto.length; i++)
                {
                    if (proto[i] instanceof Collection)
                    {
                        Iterator it = ((Collection)proto[i]).iterator();
                        if (!it.hasNext())
                        {
                            output = null;
                            break;
                        }
                        itering.addLast(it);
                        output.addLast(it.next());
                    }
                    else
                    {
                        itering.addLast(proto[i]);
                        output.addLast(proto[i]);
                    }
                }
                return tr;
            }