5. Implemente la función invertirPrioridadTColaDePrioridadPerros