In fact, they were assigned to these groups at random.
They were appointed to the groups at random.