And please explain the output of the below code as to why I am getting the output as written in the respective comments section of the code snippet:
class person():
pass
p=person
q=person
r=person()
p.no=1
print(p.no) #output : 1
print(q.no) #output : 1
print(r.no) #output : 1
q.no=2
print(p.no) #output : 2
print(r.no) #output : 2
r.no=3
print(r.no) #output : 3
print(p.no) #output : 2