class EmptyChainSingleton {
    static final EmptyChain<Object> INSTANCE = new EmptyChain<Object>();
  }

  public static <X> EmptyChain<X> v() {
    @SuppressWarnings("unchecked")
    EmptyChain<X> retVal = (EmptyChain<X>) EmptyChainSingleton.INSTANCE;
    return retVal;
  }

  @Override
  public String toString() {
    return "[]";
  }

  @Override
  public boolean isEmpty() {
    return true;
  }

  @Override
  public boolean contains(Object o) {
    return false;
  }

  @Override
  public Object[] toArray() {
    return new Object[0];
  }

  @Override
  public <X> X[] toArray(X[] a) {
    @SuppressWarnings("unchecked")
    X[] retVal = (X[]) new Object[0];
    return retVal;
  }

  @Override
  public boolean add(T e) {
    throw new RuntimeException("Cannot add elements to an unmodifiable chain");
  }

  @Override
  public boolean containsAll(Collection<?> c) {
    return false;
  }

  @Override
  public boolean addAll(Collection<? extends T> c) {
    throw new RuntimeException("Cannot add elements to an unmodifiable chain");
  }

  @Override
  public boolean removeAll(Collection<?> c) {
    throw new RuntimeException("Cannot remove elements from an unmodifiable chain");
  }

  @Override
  public boolean retainAll(Collection<?> c) {
    throw new RuntimeException("Cannot add elements to an unmodifiable chain or remove ones from such chain");
  }

  @Override
  public void clear() {
    throw new RuntimeException("Cannot remove elements from an unmodifiable chain");
  }

  @Override
  public void insertBefore(List<T> toInsert, T point) {
    throw new RuntimeException("Cannot add elements to an unmodifiable chain");
  }

  @Override
  public void insertAfter(List<T> toInsert, T point) {
    throw new RuntimeException("Cannot add elements to an unmodifiable chain");
  }

  @Override
  public void insertAfter(T toInsert, T point) {
    throw new RuntimeException("Cannot add elements to an unmodifiable chain");
  }

  @Override
  public void insertBefore(T toInsert, T point) {
    throw new RuntimeException("Cannot add elements to an unmodifiable chain");
  }

  @Override
  public void insertBefore(Chain<T> toInsert, T point) {<FILL_FUNCTION_BODY>

    throw new RuntimeException("Cannot add elements to an unmodifiable chain");
  
<no_super_class>