My first priority is paying off our credit card debt. It's the biggest monthly burden, drags down our credit scores, is viewed negatively by insurance companies and lenders, and causes the most angst (especially when the credit card companies change the repayment terms by adjusting interest rates and hiking minimum payments!).
But when the credit cards are gone, we'll have to decide what to tackle next. Aside from car loans, the major debts would be student loans and the mortgages. We have two student loans, each with about $25k owed, our second mortgage at around $27k, and our first mortgage at approximately $138k. I'm not going to even think twice about the primary mortgage, but the other three are all on my list of things to pay off quickly and ahead of schedule.
The student loans are on a 20-year repayment plan, with nearly 16 years left. The interest rates are pretty low, around 3.5% (fixed). They're through the federal government, and Hubby & I each have our own. If we are tight on money, we can easily put either or both into hardship deferral without any negative consequences. Student loan interest is tax-deductible for both state and federal income taxes. And if one of us dies, that person's loan is forgiven - I wouldn't be stuck paying off his, or vice versa. The down side is that if we were ever to declare bankruptcy, the student loans cannot be discharged.
The second mortgage is a 15-year balloon at just under 10% (fixed). We have 11.5 years left of payments, at which point we'd either have to pay a lump-sum (I think of approximately $20k), or we'd have to refinance and roll in the remainder. The mortgage interest we pay is tax deductible for federal income tax, but only if we itemize (which is highly likely for at least the next 5 years, and quite possibly longer). We would be able to eliminate this debt if we declare bankruptcy or gave the house back to the bank, and could get away paying pennies on the dollar if we did a short-sale.
Although this is one of those situations where Dave Ramsey recommends paying the student loans first, because the outstanding balance on each loan is smaller, I really can't convince myself of the wisdom in that. Pretty much every way I see it, paying off the second mortgage before the student loans makes infinitely more sense.