def isValidParenthesis(s: str) -> bool:
stack =[]
match={'(':')','[':']','{':'}'}
for char in s:
if char in match:
stack.append(char)
else:
if stack:
top=stack.pop()
if match[top]!=char:
return False
else:
return False
return True if not stack else False