Task5 - stack, task6 - queue