https://practice.geeksforgeeks.org/problems/special-stack/1