Buggy python submission (verdict: Time Limit Exceeded):
def solve():
    alpha = "abcdefghijklmnopqrstuvwxyz"
    inp1, inp2 = input(), input()
    sz = dict(zip(list(alpha), [0] * 26))
    tz = dict(zip(list(alpha), [0] * 26))
    siz = dict(
        zip(list(alpha), [[0 for i in range(2 * (10 ** 5))] for _ in range(26)]))
    tiz = dict(
        zip(list(alpha), [[0 for i in range(2 * (10 ** 5))] for _ in range(26)]))
    for i in range(len(inp1)):
        sz[inp1[i]] += 1
        tz[inp2[i]] += 1
        siz[inp1[i]][i] = i
        tiz[inp2[i]][i] = i
        if (sz[inp1[i]] != tz[inp2[i]]
                or set(siz[inp1[i]]) ^ set(tiz[inp2[i]])):
            print("No")
            return
    print("Yes")


solve()


Fixed submission:
def solve():
  from collections import Counter
  s = [i for i in sorted(Counter(input()).values())]
  t = [i for i in sorted(Counter(input()).values())]
  print(["No","Yes"][s==t])

solve()

Buggy python submission (verdict: Runtime Error):
def solve():
    alpha = "abcdefghijklmnopqrstuvwxyz"
    inp1, inp2 = input(), input()
    sz = dict(zip(list(alpha), [0] * 26))
    tz = dict(zip(list(alpha), [0] * 26))
    siz = dict(
        zip(list(alpha), [[0 for i in range(10 ** 5)] for _ in range(26)]))
    tiz = dict(
        zip(list(alpha), [[0 for i in range(10 ** 5)] for _ in range(26)]))
    for i in range(len(inp1)):
        sz[inp1[i]] += 1
        tz[inp2[i]] += 1
        siz[inp1[i]][i] = i
        tiz[inp2[i]][i] = i
        if (sz[inp1[i]] != tz[inp2[i]]):
            print("No")
            return
    for e in alpha:
        if set(siz[e]) ^ set(tiz[e]):
            print("No")
            return
    print("Yes")


solve()


Fixed submission:
def solve():
  from collections import Counter
  s = [i for i in sorted(Counter(input()).values())]
  t = [i for i in sorted(Counter(input()).values())]
  print(["No","Yes"][s==t])

solve()

Buggy python submission (verdict: Runtime Error):
def solve():
    alpha = "abcdefghijklmnopqrstuvwxyz"
    inp1, inp2 = input(), input()
    sz = dict(zip(list(alpha), [0] * 26))
    tz = dict(zip(list(alpha), [0] * 26))
    siz = dict(
        zip(list(alpha), [[0 for i in range(10 ** 5)] for _ in range(26)]))
    tiz = dict(
        zip(list(alpha), [[0 for i in range(10 ** 5)] for _ in range(26)]))
    for i in range(len(inp1)):
        sz[inp1[i]] += 1
        tz[inp2[i]] += 1
        siz[inp1[i]][i] = i
        tiz[inp1[i]][i] = i
        if (sz[inp1[i]] != tz[inp2[i]]):
            print("No")
            return
    for e in alpha:
        if set(siz[e]) - set(tiz[e]):
            print("No")
            return
    print("Yes")


solve()


Fixed submission:
def solve():
  from collections import Counter
  s = [i for i in sorted(Counter(input()).values())]
  t = [i for i in sorted(Counter(input()).values())]
  print(["No","Yes"][s==t])

solve()

Buggy python submission (verdict: Time Limit Exceeded):
def solve():
    alpha = "abcdefghijklmnopqrstuvwxyz"
    inp1, inp2 = input(), input()
    sz = dict(zip(list(alpha), [0] * 26))
    tz = dict(zip(list(alpha), [0] * 26))
    siz = dict(zip(list(alpha), [set([]) for _ in range(26)]))
    tiz = dict(zip(list(alpha), [set([]) for _ in range(26)]))
    for i in range(len(inp1)):
        sz[inp1[i]] += 1
        tz[inp2[i]] += 1
        siz[inp1[i]].add(i)
        tiz[inp2[i]].add(i)
        if (sz[inp1[i]] != tz[inp2[i]]
                or siz[inp1[i]] ^ tiz[inp2[i]]):
            print("No")
            return
    print("Yes")


solve()


Fixed submission:
def solve():
  from collections import Counter
  s = [i for i in sorted(Counter(input()).values())]
  t = [i for i in sorted(Counter(input()).values())]
  print(["No","Yes"][s==t])

solve()

Buggy python submission (verdict: Time Limit Exceeded):
def solve():
    alpha = "abcdefghijklmnopqrstuvwxyz"
    inp1, inp2 = input(), input()
    sz = dict(zip(list(alpha), [0] * 26))
    tz = dict(zip(list(alpha), [0] * 26))
    siz = dict(zip(list(alpha), [[] for _ in range(26)]))
    tiz = dict(zip(list(alpha), [[] for _ in range(26)]))
    for i in range(len(inp1)):
        sz[inp1[i]] += 1
        tz[inp2[i]] += 1
        siz[inp1[i]].append(i)
        tiz[inp2[i]].append(i)
        if (sz[inp1[i]] != tz[inp2[i]]
                or siz[inp1[i]] != tiz[inp2[i]]):
            print("No")
            return
    print("Yes")


solve()


Fixed submission:
def solve():
  from collections import Counter
  s = [i for i in sorted(Counter(input()).values())]
  t = [i for i in sorted(Counter(input()).values())]
  print(["No","Yes"][s==t])

solve()