// returns (row, col) or null static Pair indexOfIndexOf(LL l, A a) { for i over l: { L row = l.get(i); int j = row.indexOf(a); if (j >= 0) ret pair(i, j); } null; }