Solution of the contractive projection problem