```
class Solution:
# @param {string} s
# @param {string} t
# @return {boolean}
def isIsomorphic(self, s, t):
if s==t:
return True
dic={}
for i in range(len(s)):
k=s[i]
if not dic.has_key(k):
if t[i] not in dic.values():
dic[k]=t[i]
else:
return False
elif t[i]!=dic[k]:
return False
return True
```