A.s->next=head;head=s; B.s->next=head->next;head->next=s; C.head=s;s->next=head; D.head->next=s;s->next=head->next;
A.q=s->next;s=p->next; B.q->next=s;s->next=p; C.s=p->next;q=s->next; D.s->next=p;q->next=s;
A.p->next=s;s->next=p->next; B.s->next=p-next;p->next=s; C.p=s->next;s=p->next; D.s=p->next;p=s->next;