class Interleaving:
    def __init__(self):
        print "call"
    def checkifisInter(self,s1,s2,s3):
        print s1,s2,len(s3)
        if (len(s1) + len(s2) != len(s3)):
            return False
        if (len(s1) == 0 and len(s2)==0 and len(s3)):
            return True
        s1flag=False    
        if (len(s1) > 0 and s1[0]==s3[0]):
            print s1flag
            s1flag=checkifisInter(s1[])
            


if __name__=='__main__':
    c=Interleaving()
    c.checkifisInter("abcd","ade","abadcde");
    