阅读下列算法,并回答问题:
void f30(SeqStack S)
{    int k=0;
     CirQueue Q;
     SeqStack T;
     InitQueue(&Q); //初始化队列Q
       InitStack(&T); //初始化栈T
       while (!StackEmpty(&S))
    {      k++;
        if (k%2!=0) Push(&T, Pop(&S));
        else EnQueue(&Q, Pop(&S)); 
  } //第一个循环
     while (!QueueEmpty(&Q)) //第二个循环
      Push(&S, DeQueue(&Q));
       while(!StackEmpty(&T)) //第三个循环
        Push(&S,Pop(&T));
 }
设栈S=(1,2,3,4,5,6,7),其中7为栈顶元素。调用函数f30(S)后,
(1)第一个循环结束后,栈T和队列Q中的内容各是什么?
(2)第三个循环语句结束后,栈S中的内容是什么?