Complex sentence: All rational agents rationally will themselves to be an end and never merely a means, entailing that it is morally obligatory that all rational agents be treated as ends in themselves, and never merely as means.
Split into simpler sentences: All rational agents "rationally" will themselves to be an end and never merely a means. Therefore, it is morally obligatory that all rational agents be treated as ends in themselves, and never merely as means.