Buggy python submission (verdict: Runtime Error):
while True:
    s1 = input()
    if s1 == ".":
        break
    s2 = input()

    listed_s1 = [[]]
    listed_s2 = [[]]
    start = 0
    now = 0
    for i in range(len(s1)):
        if s1[i] == "\"" and not start:
            listed_s1.append([])
            now += 1
            start = 1
            listed_s1[now].append(s1[i])
        elif s1[i] == "\"" and start:
            listed_s1[now].append(s1[i])
            listed_s1.append([])
            now += 1
            start = 0
        else:
            listed_s1[now].append(s1[i])

    now = 0
    for i in range(len(s2)):
        if s2[i] == "\"" and not start:
            listed_s2.append([])
            now += 1
            start = 1
            listed_s2[now].append(s2[i])
        elif s2[i] == "\"" and start:
            listed_s2[now].append(s2[i])
            listed_s2.append([])
            now += 1
            start = 0
        else:
            listed_s2[now].append(s2[i])

    fist_wrong = 0
    ans = "IDENTICAL"
    for i in range(min(len(listed_s1), len(listed_s2))):
        if listed_s1[i] != listed_s2[i]:
            if listed_s1[i][0] == "\"" and listed_s2[i][-1] == "\"" and listed_s2[i][0] == "\"" and listed_s2[i][-1] == "\"":
                if fist_wrong:
                    ans = "DIFFERENT"
                else:
                    fist_wrong = 1
                    ans = "CLOSE"

            else:
                ans = "DIFFERENT"
        if ans == "DIFFERENT":
            break
    if len(listed_s1) != len(listed_s2):
        ans = "DIFEERENT"


    print(ans)


Fixed submission:
while True:
    s1 = input()
    if s1 == ".":
        break
    s2 = input()

    listed_s1 = [[]]
    listed_s2 = [[]]
    start = 0
    now = 0
    for i in range(len(s1)):
        if s1[i] == "\"" and not start:
            listed_s1.append([])
            now += 1
            start = 1
            listed_s1[now].append(s1[i])
        elif s1[i] == "\"" and start:
            listed_s1[now].append(s1[i])
            listed_s1.append([])
            now += 1
            start = 0
        else:
            listed_s1[now].append(s1[i])

    now = 0
    for i in range(len(s2)):
        if s2[i] == "\"" and not start:
            listed_s2.append([])
            now += 1
            start = 1
            listed_s2[now].append(s2[i])
        elif s2[i] == "\"" and start:
            listed_s2[now].append(s2[i])
            listed_s2.append([])
            now += 1
            start = 0
        else:
            listed_s2[now].append(s2[i])

    fist_wrong = 0
    ans = "IDENTICAL"
    if len(listed_s1) != len(listed_s2):
        ans = "DIFFERENT"

    for i in range(min(len(listed_s1), len(listed_s2))):
        if ans == "DIFFERENT":
            break
        if listed_s1[i] != listed_s2[i]:
            if listed_s1[i][0] == "\"" and listed_s2[i][-1] == "\"" and listed_s2[i][0] == "\"" and listed_s2[i][-1] == "\"":
                if fist_wrong:
                    ans = "DIFFERENT"
                else:
                    fist_wrong = 1
                    ans = "CLOSE"

            else:
                ans = "DIFFERENT"


    print(ans)

Buggy python submission (verdict: Runtime Error):
while True:
    s1 = input()
    if s1 == ".":
        break
    s2 = input()

    listed_s1 = [[]]
    listed_s2 = [[]]
    start = 0
    now = 0
    for i in range(len(s1)):
        if s1[i] == "\"" and not start:
            listed_s1.append([])
            now += 1
            start = 1
            listed_s1[now].append(s1[i])
        elif s1[i] == "\"" and start:
            listed_s1[now].append(s1[i])
            listed_s1.append([])
            now += 1
            start = 0
        else:
            listed_s1[now].append(s1[i])

    now = 0
    for i in range(len(s2)):
        if s2[i] == "\"" and not start:
            listed_s2.append([])
            now += 1
            start = 1
            listed_s2[now].append(s2[i])
        elif s2[i] == "\"" and start:
            listed_s2[now].append(s2[i])
            listed_s2.append([])
            now += 1
            start = 0
        else:
            listed_s2[now].append(s2[i])

    fist_wrong = 0
    ans = "IDENTICAL"
    for i in range(min(len(listed_s1), len(listed_s2))):
        if listed_s1[i] != listed_s2[i]:
            if listed_s1[i][0] == "\"" and listed_s2[i][-1] == "\"" and listed_s2[i][0] == "\"" and listed_s2[i][-1] == "\"":
                if fist_wrong:
                    ans = "DIFFERENT"
                else:
                    fist_wrong = 1
                    ans = "CLOSE"

            else:
                ans = "DIFFERENT"
        if ans == "DIFFERENT":
            break
    if len(listed_s1) != len(listed_s2):
        ans = "DIFEERENT"


    print(ans)


Fixed submission:
while True:
    s1 = input()
    if s1 == ".":
        break
    s2 = input()

    listed_s1 = [[]]
    listed_s2 = [[]]
    start = 0
    now = 0
    for i in range(len(s1)):
        if s1[i] == "\"" and not start:
            listed_s1.append([])
            now += 1
            start = 1
            listed_s1[now].append(s1[i])
        elif s1[i] == "\"" and start:
            listed_s1[now].append(s1[i])
            listed_s1.append([])
            now += 1
            start = 0
        else:
            listed_s1[now].append(s1[i])

    now = 0
    for i in range(len(s2)):
        if s2[i] == "\"" and not start:
            listed_s2.append([])
            now += 1
            start = 1
            listed_s2[now].append(s2[i])
        elif s2[i] == "\"" and start:
            listed_s2[now].append(s2[i])
            listed_s2.append([])
            now += 1
            start = 0
        else:
            listed_s2[now].append(s2[i])

    fist_wrong = 0
    ans = "IDENTICAL"
    if len(listed_s1) != len(listed_s2):
        ans = "DIFFERENT"

    for i in range(min(len(listed_s1), len(listed_s2))):
        if ans == "DIFFERENT":
            break
        if listed_s1[i] != listed_s2[i]:
            if listed_s1[i][0] == "\"" and listed_s2[i][-1] == "\"" and listed_s2[i][0] == "\"" and listed_s2[i][-1] == "\"":
                if fist_wrong:
                    ans = "DIFFERENT"
                else:
                    fist_wrong = 1
                    ans = "CLOSE"

            else:
                ans = "DIFFERENT"


    print(ans)