class Solution:
def FindFirstCommonNode(self , pHead1 , pHead2 ):
# write code here
mark1,mark2=pHead1,pHead2
while mark1!=mark2:
mark1=mark1.next if mark1 else pHead2
mark2=mark2.next if mark2 else pHead1
else:
return mark1
return None