Buggy python submission (verdict: Time Limit Exceeded):
S = str(input())
T = str(input())
alp = "abcdefghijklmnopqrstuvwxyz"
for i in range(0,len(S)):
  alp.replace(S[i],"")
  if S[i] != T[i]:
    S = S.translate(str.maketrans({S[i]:T[i], T[i]:S[i]}))
  else:
    pass
  if S == T:
    print("Yes")
    exit()
  if alp == "":
    break
print("No")

Fixed submission:
S = str(input())
T = str(input())
alp = "abcdefghijklmnopqrstuvwxyz"
for i in range(0,min(len(S),len(alp)*2)):
  if S[i] != T[i]:
    S = S.translate(str.maketrans({S[i]:T[i], T[i]:S[i]}))
  else:
    pass
  if S == T:
    print("Yes")
    exit()
print("No")

Buggy python submission (verdict: Time Limit Exceeded):
S = str(input())
T = str(input())
alp = "abcdefghijklmnopqrstuvwxyz"
for i in range(0,min(len(S),len(alp)**2)):
  if S[i] != T[i]:
    S = S.translate(str.maketrans({S[i]:T[i], T[i]:S[i]}))
  else:
    pass
  if S == T:
    print("Yes")
    exit()
print("No")

Fixed submission:
S = str(input())
T = str(input())
alp = "abcdefghijklmnopqrstuvwxyz"
for i in range(0,min(len(S),len(alp)*2)):
  if S[i] != T[i]:
    S = S.translate(str.maketrans({S[i]:T[i], T[i]:S[i]}))
  else:
    pass
  if S == T:
    print("Yes")
    exit()
print("No")

Buggy python submission (verdict: Time Limit Exceeded):
S = str(input())
T = str(input())
alp = "abcdefghijklmnopqrstuvwxyz"
for i in range(0,min(len(S),10**5)):
  if S[i] != T[i]:
    S = S.translate(str.maketrans({S[i]:T[i], T[i]:S[i]}))
  if S == T:
    print("Yes")
    exit()
print("No")

Fixed submission:
S = str(input())
T = str(input())
alp = "abcdefghijklmnopqrstuvwxyz"
for i in range(0,min(len(S),len(alp)*2)):
  if S[i] != T[i]:
    S = S.translate(str.maketrans({S[i]:T[i], T[i]:S[i]}))
  else:
    pass
  if S == T:
    print("Yes")
    exit()
print("No")

Buggy python submission (verdict: Runtime Error):
S = str(input())
T = str(input())
alp = "abcdefghijklmnopqrstuvwxyz"
for i in range(0,10**7):
  if S[i] != T[i]:
    S = S.translate(str.maketrans({S[i]:T[i], T[i]:S[i]}))
  if S == T:
    print("Yes")
    exit()
print("No")

Fixed submission:
S = str(input())
T = str(input())
alp = "abcdefghijklmnopqrstuvwxyz"
for i in range(0,min(len(S),len(alp)*2)):
  if S[i] != T[i]:
    S = S.translate(str.maketrans({S[i]:T[i], T[i]:S[i]}))
  else:
    pass
  if S == T:
    print("Yes")
    exit()
print("No")

Buggy python submission (verdict: Runtime Error):
S = str(input())
T = str(input())
alp = "abcdefghijklmnopqrstuvwxyz"
for i in range(0,len(alp)):
  if S[i] != T[i]:
    S = S.translate(str.maketrans({S[i]:T[i], T[i]:S[i]}))
  if S == T:
    print("Yes")
    exit()
print("No")

Fixed submission:
S = str(input())
T = str(input())
alp = "abcdefghijklmnopqrstuvwxyz"
for i in range(0,min(len(S),len(alp)*2)):
  if S[i] != T[i]:
    S = S.translate(str.maketrans({S[i]:T[i], T[i]:S[i]}))
  else:
    pass
  if S == T:
    print("Yes")
    exit()
print("No")

Buggy python submission (verdict: Time Limit Exceeded):
S = str(input())
T = str(input())
alp = "abcdefghijklmnopqrstuvwxyz"
for i in range(0,len(S)):
  if S[i] != T[i]:
    S = S.translate(str.maketrans({S[i]:T[i], T[i]:S[i]}))
  if S == T:
    print("Yes")
    exit()
print("No")

Fixed submission:
S = str(input())
T = str(input())
alp = "abcdefghijklmnopqrstuvwxyz"
for i in range(0,min(len(S),len(alp)*2)):
  if S[i] != T[i]:
    S = S.translate(str.maketrans({S[i]:T[i], T[i]:S[i]}))
  else:
    pass
  if S == T:
    print("Yes")
    exit()
print("No")