Contrapasso (or, in modern Italian, contrappasso) is derived from the Latin contra and patior, which mean "suffer the opposite".Contrapasso refers to the punishment of souls in Dante's Inferno, "by a process either resembling or contrasting with the sin itself."
hope this helps! have an amazing day