chandan's submission of Stacks | CodeChef