class Person:
    def __init__(self, name, cpr_number): # konstruktør
        self.__name = name
        self.__cpr_number = cpr_number
    def get_name(self):
        return(self.__name)
    def get_cpr_number(self):
        return(self.__cpr_number)
    def show(self):
        print("Name:", self.get_name(), "\nCPR number:", self.get_cpr_number())
    def set_name(self, name):
        self.__name = name


class Teacher(Person):
    no_instances = 0
    def __init__(self, name, cpr_number, staff_id, list_of_courses):
        super().__init__(name, cpr_number)
        self.__staff_id = staff_id
        self.__list_of_courses = list_of_courses
        Teacher.no_instances += 1

    def show(self):
        super().show()
        print("Teacher id: ", self.__staff_id)
        print("Courses: ")
        for i in self.__list_of_courses:
            print(i)

    def get_staff_id(self):
        return(self.__staff_id)

    def __str__(self):
        return "Name: " + str(self.get_name()) + " Teacher id: " + str(self.get_staff_id()) + " Courses: " + str(self.__list_of_courses)

    def __del__(self):
        Teacher.no_instances -= 1

idk = Teacher("Din mor", 12345678, 1234, (1202, 5860, 2719, 8746))

print(idk)
