class QueuedSet<E> {

  private final Set<E> hs;
  private final LinkedList<E> ll;

  public QueuedSet() {
    this.hs = new HashSet<E>();
    this.ll = new LinkedList<E>();
  }

  public QueuedSet(List<E> os) {
    this();
    for (E o : os) {
      this.ll.addLast(o);
      this.hs.add(o);
    }
  }

  public QueuedSet(QueuedSet<E> qs) {
    this(qs.ll);
  }

  public boolean isEmpty() {
    return this.ll.isEmpty();
  }

  public boolean addLast(E o) {
    boolean r = this.hs.contains(o);
    if (!r) {
      this.ll.addLast(o);
      this.hs.add(o);
    }
    return r;
  }

  public int addLast(List<E> os) {<FILL_FUNCTION_BODY>}

  public E removeFirst() {
    E r = this.ll.removeFirst();
    this.hs.remove(r);
    return r;
  }
}

    int r = 0;
    for (E o : os) {
      if (this.addLast(o)) {
        r++;
      }
    }
    return r;
  
<no_super_class>