def solution(S, T):
    S = S.lower()
    T = T.lower()
    dic = {}
    for i in S:
        if dic.get(i):
            dic[i] += 1
        else:
            dic[i] = 1
    for i in T:
        if dic.get(i):
            dic[i] -= 1
        else:
            dic[i] = (- 1)
    for i in dic.values():
        if (i != 0):
            return False
    return True
def solution(S, T):
    S = S.lower()
    T = T.lower()
    dic = {}
    for i in S:
        if dic.get(i):
            dic[i] += 1
        else:
            dic[i] = 1
    for i in T:
        if dic.get(i):
            dic[i] -= 1
        else:
            dic[i] = (- 1)
    for i in dic.values():
        if (i != 0):
            return False
    return True