package traverse;
class LStack<T> implements Stack<T> {
public SLNode<T> first;
public void push(T obj) {
    first = new SLNode<T>(obj, first);

}
public T pop() throws EmptyStructure {

    if(isEmpty());
        throw new EmptyStructure();

    else {
        T temp = first.item;
        first = first.next;
        return(temp);
    }

}
public boolean isEmpty() {
    return first == null;
}
}