class Stack {

    public E remove(int index) {
        if (index >= mSize || index + mSize < 0) {
            throw new IndexOutOfBoundsException("Index: " + index + ", Size: " + mSize);
        }

        E ret = mElements.remove(index < 0 ? index + mSize : index);
        mSize--;
        return ret;
    }

    public  Stack();

}