Develop an algorithm or write a pseudo-code that accepts as input the names of an unspecified number of students who each have rented books form the school's book program and are now returning them.