class Student:
    insti = "IITM"

    def __init__(self, rollno, hostel, facad):
        print("inside __init__ constructor");
        self.rollno = rollno
        self.hostel = hostel
        self.facad  = facad

    def getHostel(self):
        return self.hostel

    def changeHostel(this, newhostel):
        this.hostel = newhostel

    def __str__(self):
        return f'''<h1>{self.rollno}</h1>
                  I am a student of {self.insti}.<br>
                  I stay in the brand new hostel <i>{self.hostel}</i>.<br>
                  My faculty advisor is {self.facad}.<p>
               '''

kavish = Student("CS25B061", "Mandakini", "KC")
print(kavish.getHostel())
kavish.changeHostel("Godavari")
print(kavish.getHostel())

print(kavish)   # can print an object, calls __str__ method
