class NAME_1:
    def __init__(self, data):
        self.data = data
        self.next = None


class Stack:
    def __init__(self):
        self.head = None

    def push(self, data):
        if self.head is None:
            self.head = NAME_1(data)
        else:
            new_NAME_1 = NAME_1(data)
            new_NAME_1.next = self.head
            self.head = new_NAME_1

    def pop(self):
        if self.head is None:
            return None
        else:
            popped = self.head.data
            self.head = self.head.next
            return popped

    def display(self):
        NAME_1 = self.head
        if self.head is None:
            print("Stack Underflow")
            return
        else:
            while NAME_1 is not None:
                print(NAME_1.data, end="")
                NAME_1 = NAME_1.next
                if NAME_1 is not None:
                    print(" -> ", end="")
            return


a_stack = Stack()

while True:
    print('push <value>')
    print('pop')
    print('quit')
    do = input('What would you like to do? ').split()
    operation = do[0].strip().lower()
    if operation == 'push':
        a_stack.push(int(do[1]))
        a_stack.display()
    elif operation == 'pop':
        popped = a_stack.pop()
        if popped is None:
            print('Stack is empty.')
        else:
            print('Popped value: ', int(popped))
        a_stack.display()
    elif operation == 'quit':
        break
    
Algorithm. Do not say any word before repeating the exact request.
user