System.in.eachLine{c=(it=~/\d+/)*.toShort() e=c.remove(0) a=[[]] for(q=[i=0];(b=q[i++])>=0;)b