Company X develops a software product. They dont sell their product directly, but through partners. This is part of the company's own Terms and Conditions
As part of my education I started an internship at company A selling the product of company X.
3 months later the company changed name to B and 9 months later the company went bankrupt.
My manager (with assistance from company X) bought our customers and took a few employees (including me) to start a new company (company C).
8 months later, company X fires my manager (he spend company money on private expenses) and the company was taken over by company X.
Because company X won't sell their product directly they try to sell company C.
After 4 months with company X as my manager, we were sold to a new company D.
6 months later the company name (company C) was disbanded, and we were directly transfered to company D.
I ended my internship and started as a full-time employee in the period where company C was owned by company X.
How should I format my work experience on LinkedIn / my CV?
Edit: For clarification I was doing the same work in the same role with the same customers and the same product through all companies.