LTM Limited interview question

write a program on stack