Implement a simple stack class.