l:0;.Q.fs[{if[x~l;:];-1 l::x}each]`:input
-1 distinct read0`:input
-1@?0:`:input
k)a:{-1@?0:`:input;};a[]
;