sclass CombinedList extends RandomAccessAbstractList { int size; new LL lists; *() {} void addList(L l) { lists.add(l); size += l(l); } public int size() { ret size; } public A get(int index) { int idx = 0; for (L l : lists) { int j = idx+l(l); if (index < j) ret l.get(index-idx); idx = j; } throw new NoSuchElementException; } }