class Stack():

    def __init__(self):
        self.list = []

    # push() dodaj coś do stosu
    def push(self, item):
        return self.list.append(item)

    # pop() zdejmij element z stosu
    def pop(self):
        if self.list:
            ost_elem = self.list[-1]
            self.list.remove(ost_elem)
            return ost_elem
            # return self.list.pop()

    # peek() podejrzyj element na stosie
    def peek(self):
        if self.list:
            return self.list[-1]

    # show() pokaż stos
    def show(self):
        if not self.list:
            print('Stos jest pusty')
            return
        
        print(self.list)

    # is_empty() sprawdź czy coś jest na stosie
    def is_empty(self):
        # return bool(self.list)
        return not len(self.list) == 0

stack = Stack()
stack.show()
stack.push('Kamienie na szaniec')
stack.push('Krzyzacy')
stack.push('Potop')
stack.push('Quo Vadis')
stack.push('Hobbit')
stack.show()
print(stack.peek())
stack.pop()
stack.show()
stack.pop()
stack.show()
print(stack.is_empty())
stack.pop()
stack.pop()
stack.pop()
print(stack.is_empty())
stack.show()