According to Catholicism, why are some demons more difficult to cast out than others? In the gospels we often read about Jesus casting out demons. But there is one episode, where the disciples were unable to cast out a demon (Mark 9: 27-28).

27 And when he was come into the house, his disciples secretly asked him: Why could not we cast him out?
28 And he said to them: This kind can go out by nothing, but by prayer and fasting.

Some time ago, I was reading an article stating that Pope John Paul II was unable to liberate an Italian teenager from a demon during an exorcism!
My question is this: according to Catholic teaching, why are some demons harder to cast out than others?
It is because there are different levels or hierarchies of angels, demons being fallen angels. If one gets possessed/oppressed by a more malignant demon, its exorcism would be more difficult because such a demon is more disobedient to God.

Listen to the talks here by a Catholic priest who is an expert in demonology and exorcism, e.g. the


ones listed under the heading "Angels and Demons"
"TU Newman Center Conference on Exorcism" talk
"Interview on Exorcism, Reason in Society, Philosophy and Theology"