cycleinv takes as argument a cycle. cycleinv returns the cycle that is the inverse of the cycle given as argument. Input :
Output