<prompt> Tumia stack ya mwisho-katika-kwanza-nje LIFO kwa kutumia foleni mbili tu. Stack iliyofanywa inapaswa kusaidia kazi zote za stack ya kawaida kusukuma, juu, pop, na tupu. Tumia darasa la MyStack: - void pushint x Inasukuma kipengele x hadi juu ya stack. - int pop Inaondoa kipengele juu ya stack na inarudi. - int top Inarudi kipengele juu ya stack. - boolean tupu Inarudi kweli ikiwa stack ni tupu, vinginevyo uongo.  <response>: To implement a LIFO stack using two queues, we need to make sure that the front of the queue behaves like the top of the stack. Here is how we can do it:1. We will maintain two queues, q1 and q2.2. Whenever we push an element, we will insert it into q1.3. When we need to pop an element, we will move all the elements except the last one from q1 to q2. The last element in q1 will be the top element of the stack, which we will return after removing it from q1.4. If we need to get the top element of the stack, we will move all the elements except the last one from q1 to q2. The last element in q1 will be the top element of the stack, which we will return. We will also move this element to q2 so that q1 remains empty while q2 now contains all the elements except the top element.5. To check if the stack is empty, we will check if both q1 and q2 are empty.Here is the implementation of the MyStack class:class MyStack private Queue q1 new LinkedList; private Queue q2 new LinkedList; public void pushint x q1.addx; public int pop while q1.size 1 q2.addq1.poll; int top q1.poll; Queue temp q1; q1 q2; q2 temp; return top; public int top while q1.size 1 q2.addq1.poll; int top q1.poll; q2.addtop; Queue temp q1; q1 q2; q2 temp; return top; public boolean empty return q1.isEmpty q2.isEmpty; 