AppleOne Interview Question

implement a Q using two Stacka