p.rthread = False
q.right = p.right
q.rthread = True
p.right = q