Task 3 done. Implemented a stack that can process the statements.