Yes, and then you move to a preferred claim. There are not many preferred claims, but one of the preferred claims is to the trustee, the actual monitor. One of the views is that you need someone to be able to take on the work of managing through an insolvency and getting parties to work out the arrangements so the monitor is paid as a preferred creditor.
The third is then secured creditors, those who have lent on the basis of a security against the estate and assets, and they then get paid.
Then there are unsecured creditors, who are a whole range of people. They could essentially be anybody who has an account on pay, which would include unfunded pension liabilities. There would also be any unpaid benefits, as well as any of the suppliers and contractors who may have been party to the process. These often include a significant number of small and medium-sized enterprises.
Finally, if there's any money left after those have been paid out, it's for shareholders, but the shareholders are almost never paid because, by definition, if you had money left to pay all of your debts, all of your secured claims and your unsecured claims, and still had money to return to your shareholders, you wouldn't be insolvent.