Who was more powerful in medieval time kings or pope?

pope, they had the choice of whether the king should have throne or not. in general the Church was in charge then came the king.