Problem:


Almost Identical Programs

The programming contest named
Concours de Programmation Comtemporaine Interuniversitaire (CPCI)
has a judging system similar to that of ICPC;
contestants have to submit correct outputs for two different inputs
to be accepted as a correct solution.

Each of the submissions should include the program that generated
the output.  A pair of submissions is judged to be a correct
solution when, in addition to the correctness of the outputs, they
include an identical program.

Many contestants, however, do not stop including a different version
of their programs in their second submissions, after modifying a
single string literal in their programs representing 
the input file name, attempting to process different input.

The organizers of CPCI are exploring the possibility of showing a
special error message for such close submissions, 
indicating contestants what's wrong with such submissions.

Your task is to detect such close submissions.

Input

The input consists of at most 100 datasets, each in the following format.

s1
s2

Each of s1 and s2 is
a string written in a line, with the length between 1 and 200, inclusive.
They are the first and the second submitted programs respectively.

A program consists of lowercase letters (a, b, ..., z), uppercase letters (A, B, ..., Z),
digits (0, 1, ..., 9), double quotes ("), and semicolons (;).
When double quotes occur in a program, there are always even number of them.

The end of the input is indicated by a line containing one '.' (period).

Output

For each dataset, print the judge result in a line.

If the given two programs are identical, print IDENTICAL.
If two programs differ with only one corresponding string literal, print CLOSE.
Otherwise, print DIFFERENT.

A string literal is a possibly empty sequence of characters between an
odd-numbered occurrence of a double quote and the next occurrence of
a double quote.

Sample Input

print"hello";print123
print"hello";print123
read"B1input";solve;output;
read"B2";solve;output;
read"C1";solve;output"C1ans";
read"C2";solve;output"C2ans";
""""""""
"""42"""""
slow"program"
fast"code"
"super"fast"program"
"super"faster"program"
X""
X
I"S""CREAM"
I"CE""CREAM"
11"22"11
1"33"111
.

Output for the Sample Input

IDENTICAL
CLOSE
DIFFERENT
CLOSE
DIFFERENT
DIFFERENT
DIFFERENT
CLOSE
DIFFERENT



Sample input:
print"hello";print123
print"hello";print123
read"B1input";solve;output;
read"B2";solve;output;
read"C1";solve;output"C1ans";
read"C2";solve;output"C2ans";
""""""""
"""42"""""
slow"program"
fast"code"
"super"fast"program"
"super"faster"program"
X""
X
I"S""CREAM"
I"CE""CREAM"
11"22"11
1"33"111
.


Sample output:
IDENTICAL
CLOSE
DIFFERENT
CLOSE
DIFFERENT
DIFFERENT
DIFFERENT
CLOSE
DIFFERENT

Submission status: Wrong Answer

Solution code:
# from sys import exit

while(True):
    S0 = str(input())
    if S0 == ".":
        exit()
    S1 = str(input())
    if S0 == S1:
        print("IDENTICAL")
        continue
    S0else = set(S0.split('"')[0::2])
    S1else = set(S1.split('"')[0::2])
    if S0else != S1else:
        print("DIFFERENT")
        continue
    S0str = set(S0.split('"')[1::2])
    S1str = set(S1.split('"')[1::2])
    sol = S0str | S1str
    if len(sol) - 1 == len(S0str):
        print("CLOSE")
    else:
        print("DIFFERENT")

Submission status: Wrong Answer

Solution code:
results=[]
while True:
    a=input()
    if a==".":
        break
    b=input()
    count=0
    for i,j in zip(a,b):
        if(a!=b):
            count+=1
    if count==0:
        results.append(0)
    elif count==1:
        results.append(1)
    else:
        results.append(2)
for i in results:
    if i==0:
        print("IDENTICAL")
    if i==1:
        print("CLOSE")
    if i==2:
        print("DIFFERENT")

Submission status: Wrong Answer

Solution code:
results=[]
while True:
    a=list(input())
    if a[0]==".":
        break
    b=list(input())
    count=0
    for i,j in zip(a,b):
        if(a!=b):
            count+=1
    if count==0:
        results.append(0)
    elif count==1:
        results.append(1)
    else:
        results.append(2)
for i in results:
    if i==0:
        print("IDENTICAL")
    if i==1:
        print("CLOSE")
    if i==2:
        print("DIFFERENT")

Submission status: Wrong Answer

Solution code:
while 1:
    s1 = input()
    if s1 == '.': break
    s2 = input()
    S1 = s1.partition('\"')
    S2 = s2.partition('\"')

    jdg = 1
    cnt_d = 0

    if len(S1) != len(S2):
        if '\"' in s1 or '\"' in s2:
            jdg = 1
            print("CLOSE")
        else:
            jdg = 0
            print("DIFFERENT")
    else:
        l = len(S1)
        i = 0
        while i < l:
            if S1[i] != S2[i]:
                cnt_d += 1
                if '\"' in S1[i] and '\"' in S2[i]:
                    jdg = 1
                else:
                    jdg = 0
                    break
            i += 1

        if jdg == 1 and cnt_d == 1: print("CLOSE")
        elif jdg == 0 or cnt_d > 1: print("DIFFERENT")
        else: print("IDENTICAL")

Submission status: Wrong Answer

Solution code:
results=[]
while True:
    a=input().split("\"")
    if a[0]==".":
        break
    b=input().split("\"")
    count=0
    for i,j in zip(a,b):
        for k,l in zip(i,j):
            if(k!=l):
                count+=1
    if count==0:
        results.append(0)
    elif count==1:
        results.append(1)
    else:
        results.append(2)
for i in results:
    if i==0:
        print("IDENTICAL")
    if i==1:
        print("CLOSE")
    if i==2:
        print("DIFFERENT")

Submission status: Wrong Answer

Solution code:
while 1:
    s1 = input()
    if s1 == '.': break
    s2 = input()
    S1 = s1.partition('\"')
    S2 = s2.partition('\"')

    jdg = 1
    cnt_d = 0

    if len(S1) != len(S2): print("DIFFERENT")
    else:
        l = len(S1)
        i = 0
        while i < l:
            if S1[i] != S2[i]:
                cnt_d += 1
                if '\"' in S1[i] and '\"' in S2[i]:
                    jdg = 1
                else:
                    jdg = 0
                    break
            i += 1

        if jdg == 1 and cnt_d == 1: print("CLOSE")
        elif jdg == 0 or cnt_d > 1: print("DIFFERENT")
        else: print("IDENTICAL")

Submission status: Wrong Answer

Solution code:
while 1:
    s1 = input().split('"')
    l1 = len(s1)
    if s1[0] == ".": break
    s2 = input().split('"')
    l2 = len(s2)
    if l1 != l2:
        print("DIFFERENT")
        break
    i = 0
    j = 0
    k = 0
    flag_1 = 0
    flag_2 = 0
    cnt = 0
    x1 = []
    x2 = []
    while 1:
        if i > l1-2:
            if cnt == 1:
                print("CLOSE")
                break
            else:
                print("IDENTICAL")
                break
        if s1[i] != s2[i]:
            print("DIFFERENT")
            break
        if s1[i+1] != s2[i+1]:
            if cnt == 1:
                print("DIFFERENT")
                break
            else: cnt = 1
        i += 2

Submission status: Wrong Answer

Solution code:
while 1:
    s1 = input().split('"')
    l1 = len(s1)
    if s1[0] == ".": break
    s2 = input().split('"')
    l2 = len(s2)
    if l1 != l2:
        print("DIFFERENT")
        continue
    i = 0
    j = 0
    k = 0
    flag_1 = 0
    flag_2 = 0
    cnt = 0
    x1 = []
    x2 = []
    while 1:
        if i > l1-2:
            if cnt == 1:
                print("CLOSE")
                break
            else:
                print("IDENTICAL")
                break
        if s1[i] != s2[i]:
            print("DIFFERENT")
            break
        if s1[i+1] != s2[i+1]:
            if cnt == 1:
                print("DIFFERENT")
                break
            else: cnt = 1
        i += 2

Submission status: Wrong Answer

Solution code:
while 1:
    s1 = input().split('"')
    l1 = len(s1)
    if s1[0] == ".": break
    s2 = input().split('"')
    l2 = len(s2)
    if l1 != l2:
        print("DIFFERENT")
        continue
    i = 0
    cnt = 0
    while 1:
        if i > l1-2:
            if cnt == 1:
                print("CLOSE")
                break
            else:
                print("IDENTICAL")
                break
        if s1[i] != s2[i]:
            print("DIFFERENT")
            break
        if s1[i+1] != s2[i+1]:
            if cnt == 1:
                print("DIFFERENT")
                break
            else: cnt = 1
        i += 2

Submission status: Wrong Answer

Solution code:
while 1:
    s1 = input().split('\"')
    l1 = len(s1)
    if s1[0] == ".": break
    s2 = input().split('\"')
    l2 = len(s2)
    if l1 != l2:
        print("DIFFERENT")
        continue
    i = 0
    cnt = 0
    while 1:
        if i > l1-2:
            if cnt == 1:
                print("CLOSE")
                break
            else:
                print("IDENTICAL")
                break
        if s1[i] != s2[i]:
            print("DIFFERENT")
            break
        if s1[i+1] != s2[i+1]:
            if cnt == 1:
                print("DIFFERENT")
                break
            else: cnt = 1
        i += 2

Submission status: Wrong Answer

Solution code:
def p(A,s):
    i=0
    j=0
    s=[]
    while(len(A)>i):
        if A[i]=='"':
            list1=A.partition('"')
            s.append(list1[0])
            A=list1[2]
            i=0
            j+=1
        elif A[i]==';':
            list1=A.partition(';')
            s.append(list1[0])
            A=list1[2]
            i=0
            j+=1
        else:
            i+=1
            if len(A)==i:
                s.append(A)
    return s
A=input()
s1=[]
s2=[]
O=[]
while 1:
    i=0
    cnt=0
    B=input()
    s1=p(A,s1)
    s2=p(B,s2)
    while i<len(s1) and i<len(s2):
        if s1[i]!=s2[i]:
            cnt+=1
        i+=1
    if cnt==0:
        O.append("IDENTICAL")
    elif cnt==1:
        O.append("CLOSE")
    else:
        O.append("DIFFERENT")
    A=input()
    if A==".":
        break
   
for i in range(len(O)):
    print(O[i])

Submission status: Wrong Answer

Solution code:

Submission status: Wrong Answer

Solution code:
results=[]
while True:
    a=input().split("\"")
    if a[0]==".":
        break
    b=input().split("\"")
    count1=0
    count2=0
    if len(a) != len(b):
        results.append(2)
    else:
        for i in range(len(a)):
            if(i%2==1):
                for (k,l) in zip(a[i],b[i]):
                    if(k!=l):
                        count1+=1
            else:
                for k,l in zip(a[i],b[i]):
                    if(k!=l):
                        count2+=1
        if count1==0 and count2==0:
            results.append(0)
        elif count1==1 and count2==0:
            results.append(1)
        else:
            results.append(2)
for i in results:
    if i==0:
        print("IDENTICAL")
    if i==1:
        print("CLOSE")
    if i==2:
        print("DIFFERENT")

Submission status: Wrong Answer

Solution code:
results=[]
while True:
    a=input().split("\"")
    if a[0]==".":
        break
    b=input().split("\"")
    count1=0
    count2=0
    if len(a) != len(b):
        results.append(2)
    else:
        for i in range(len(a)):
            if(i%2==1):
                for k,l in zip(a[i],b[i]):
                    if(k!=l):
                        count1+=1
            else:
                for k,l in zip(a[i],b[i]):
                    if(k!=l):
                        count2+=1
        if count1==0 and count2==0:
            results.append(0)
        elif count1==1 and count2==0:
            results.append(1)
        else:
            results.append(2)
for i in results:
    if i==0:
        print("IDENTICAL")
    if i==1:
        print("CLOSE")
    if i==2:
        print("DIFFERENT")

Submission status: Wrong Answer

Solution code:
while 1:
	s1=input().split('"')
	if s1[0]==".":
		break
	s2=input().split('"')
	
	cnt1=0
	cnt2=0
	i=0
	
	if len(s1)!=len(s2):
		print("DIFFERENT")
	else:
		while i<len(s1):
			if s1[i]==s2[i]:
				cnt1+=1
			elif s1[i]!=s2[i] and i%2==0:
				print("DIFFERENT")
				break
			elif s1[i]!=s2[i] and i%2!=0:
				cnt2+=1
				if cnt2>1:
					print("DIFFERENT")
					break
			i+=1
				
		if cnt2==1:
			print("CLOSE")
		if cnt1==len(s1):
			print("IDENTICAL")

Submission status: Wrong Answer

Solution code:
while 1:
	s1=input().split('"')
	if s1[0]==".":
		break
	s2=input().split('"')
	
	cnt1=0
	cnt2=0
	i=0
	
	if len(s1)!=len(s2):
		print("DIFFERENT")
	else:
		while i<len(s1):
			if s1[i]==s2[i]:
				cnt1+=1
			elif s1[i]!=s2[i] and i%2==0:
				print("DIFFERENT")
				break
			elif s1[i]!=s2[i] and i%2!=0:
				cnt2+=1
				if cnt2>1:
					print("DIFFERENT")
					break
			i+=1
				
		if cnt2==1:
			print("CLOSE")
		elif cnt1==len(s1):
			print("IDENTICAL")

Submission status: Wrong Answer

Solution code:
while 1:
	s1=input().split('"')
	if s1[0]==".":
		break
	s2=input().split('"')
	
	cnt1=0
	cnt2=0
	i=0
	
	if len(s1)!=len(s2):
		print("DIFFERENT")
	else:
		while i<len(s1):
			if s1[i]==s2[i]:
				cnt1+=1
			elif s1[i]!=s2[i] and i%2==0:
				print("DIFFERENT")
				break
			elif s1[i]!=s2[i] and i%2!=0:
				cnt2+=1
				if cnt2>1:
					print("DIFFERENT")
					break
			i+=1
				
		if cnt2==1:
			print("CLOSE")
		elif cnt1==len(s1):
			print("IDENTICAL")

Submission status: Wrong Answer

Solution code:
results=[]
while True:
    a=input().split("\"")
    if a[0]==".":
        break
    b=input().split("\"")
    count1=0
    count2=0
    if len(a) != len(b):
        results.append(2)
    else:
        for i in range(len(a)):
            if(i%2==1):
                for k,l in zip(a[i],b[i]):
                    if k is None and l is None:
                        pass
                    elif k is None and l is not None:
                        count1+=1
                    elif k is not None and l is None:
                        count1+=1
                    elif(k!=l):
                        count1+=1
            else:
                for k,l in zip(a[i],b[i]):
                    if k is None and l is None:
                        pass
                    elif k is None and l is not None:
                        count2+=1
                    elif k is not None and l is None:
                        count2+=1
                    if(k!=l):
                        count2+=1
            print("a[{}]\n{}".format(i,a[i]))
            print("b[{}]\n{}".format(i,b[i]))
            print("count1:{}".format(count1))
            print("count2:{}".format(count2))
        if count1==0 and count2==0:
            results.append(0)
        elif count1==1 and count2==0:
            results.append(1)
        else:
            results.append(2)
for i in results:
    if i==0:
        print("IDENTICAL")
    if i==1:
        print("CLOSE")
    if i==2:
        print("DIFFERENT")

Submission status: Wrong Answer

Solution code:
#16D8103010K Ko Okasaki
#1617

while 1:
	s1=input().split('"')
	if s1[0]==".":
		break
	s2=input().split('"')
	
	cnt1=0
	cnt2=0
	i=0
	
	if len(s1)!=len(s2):
		print("DIFFERENT")
	else:
		while i<len(s1):
			if s1[i]==s2[i]:
				cnt1+=1
			elif s1[i]!=s2[i] and i%2==0:
				print("DIFFERENT")
				break
			else:
				cnt2+=1
				if cnt2>1:
					print("DIFFERENT")
					break
			i+=1
				
		if cnt2==1:
			print("CLOSE")
		elif cnt1==len(s1):
			print("IDENTICAL")

Submission status: Wrong Answer

Solution code:
while 1:
	s1=input().split('"')
	if s1[0]==".":
		break
	s2=input().split('"')
	
	cnt1=0
	cnt2=0
	i=0
	
	if len(s1)!=len(s2):
		print("DIFFERENT")
	else:
		while i<len(s1):
			if s1[i]==s2[i]:
				cnt1+=1
			elif s1[i]!=s2[i] and i%2==0:
				print("DIFFERENT")
				break
			else:
				cnt2+=1
				if cnt2>1:
					print("DIFFERENT")
					break
			i+=1
				
		if cnt2==1:
			print("CLOSE")
		elif cnt1==len(s1):
			print("IDENTICAL")

Submission status: Wrong Answer

Solution code:
results=[]
while True:
    a=input().split("\"")
    if a[0]==".":
        break
    b=input().split("\"")
    count1=0
    count2=0
    if len(a) != len(b):
        results.append(2)
    else:
        for i in range(len(a)):
            if(i%2==1):
                if len(a[i]) == 0 and len(b[i]) != 0:
                    count1+=1
                elif len(a[i]) != 0 and len(b[i]) == 0:
                    count1+=1 
                else:
                    for k,l in zip(a[i],b[i]):
                        if(k!=l):
                            count1+=1
            else:
                if len(a[i]) == 0 and len(b[i]) != 0:
                    count2+=1
                elif len(a[i]) != 0 and len(b[i]) == 0:
                    count2+=1 
                else:
                    for k,l in zip(a[i],b[i]):
                        if(k!=l):
                            count2+=1           
        if count1==0 and count2==0:
            results.append(0)
        elif count1==1 and count2==0:
            results.append(1)
        else:
            results.append(2)
for i in results:
    if i==0:
        print("IDENTICAL")
    if i==1:
        print("CLOSE")
    if i==2:
        print("DIFFERENT")

Submission status: Wrong Answer

Solution code:
results=[]
while True:
    a=input().split("\"")
    if a[0]==".":
        break
    b=input().split("\"")
    count1=0
    count2=0
    if len(a) != len(b):
        results.append(2)
    else:
        for i in range(len(a)):
            if(i%2==1):
                if len(a[i]) == len(b[i]):
                    count1+=1
                else:
                    for k,l in zip(a[i],b[i]):
                        if(k!=l):
                            count1+=1
            else:
                if len(a[i]) == len(b[i]):
                    count2+=1
                else:
                    for k,l in zip(a[i],b[i]):
                        if(k!=l):
                            count2+=1           
        if count1==0 and count2==0:
            results.append(0)
        elif count1==1 and count2==0:
            results.append(1)
        else:
            results.append(2)
for i in results:
    if i==0:
        print("IDENTICAL")
    if i==1:
        print("CLOSE")
    if i==2:
        print("DIFFERENT")

Submission status: Wrong Answer

Solution code:
while True:
    s1=input().split('"')
    if s1==["."]: break
    s2=input().split('"')
    if len(s1)!=len(s2):
        print("DIFFERENT")
        continue
    else:
        cnt=0
        for i in range(len(s1)):
            if s1[i]!=s2[i]:
                cnt+=1
            else: pass
        if cnt==0:
            print("IDENTICAL")
        elif cnt==1:
            print("CLOSE")
        else: 
            print("DEFFERENT")

Submission status: Wrong Answer

Solution code:
ans=[]
while True:
    s1=input().split('"')
    if s1==["."]: break
    s2=input().split('"')
    if len(s1)!=len(s2):
        ans.append("DIFFERENT")
        continue
    else:
        cnt=0
        for i in range(len(s1)):
            if s1[i]!=s2[i]:
                cnt+=1
            else: pass
        if cnt==0:
            ans.append("IDENTICAL")
        elif cnt==1:
            ans.append("CLOSE")
        else: 
            ans.append("DEFFERENT")
for i in range(len(ans)):
    print(ans[i])

Submission status: Wrong Answer

Solution code:

while True:
    s1=input().split('"')
    if s1==["."]: break
    s2=input().split('"')
    if len(s1)!=len(s2):
        print("DIFFERENT")
        continue
    else:
        cnt=0
        for i in range(len(s1)):
            if s1[i]!=s2[i]:
                cnt+=1
            else: pass
        if cnt==0:
            print("IDENTICAL")
        elif cnt==1:
            print("CLOSE")
        else: 
            print("DIFFERENT")

Submission status: Wrong Answer

Solution code:
ans=[]
while True:
    s1=input().split('"')
    if s1==["."]: break
    s2=input().split('"')
    if len(s1)!=len(s2):
        ans.append("DIFFERENT")
        continue
    else:
        cnt=0
        for i in range(len(s1)):
            if s1[i]!=s2[i]:
                cnt+=1
            else: pass
        if cnt==0:
            ans.append("IDENTICAL")
        elif cnt==1:
            ans.append("CLOSE")
        else: 
            ans.append("DIFFERENT")
for i in range(len(ans)):
    print(ans[i])

Submission status: Wrong Answer

Solution code:
ans=[]
while 1:
    s1=input().split('"')
    if s1==["."]: break
    s2=input().split('"')
    if len(s1)!=len(s2):
        ans.append("DIFFERENT")
        continue
    else:
        cnt=0
        for i in range(len(s1)):
            if s1[i]!=s2[i]:
                cnt+=1
            else: pass
        if cnt==0:
            ans.append("IDENTICAL")
        elif cnt==1:
            ans.append("CLOSE")
        else: 
            ans.append("DIFFERENT")
for i in range(len(ans)):
    print(ans[i])

Submission status: Wrong Answer

Solution code:
while 1:
    s1=input().split('"')
    if s1==["."]: break
    s2=input().split('"')
    if len(s1)!=len(s2):
        print("DIFFERENT")
        continue
    else:
        cnt=0
        for i in range(len(s1)):
            if s1[i]!=s2[i]:
                cnt+=1
            else: pass
        if cnt==0:
            print("IDENTICAL")
        elif cnt==1:
            print("CLOSE")
        else: 
            print("DIFFERENT")

Submission status: Wrong Answer

Solution code:
while 1:
	s1=input().split('"')
	if s1[0]==".":
		break
	s2=input().split('"')
	
	cnt1=0
	cnt2=0
	
	if len(s1)!=len(s2):
		print("DIFFERENT")
	else:
		i=0
		while i<len(s1):
			if s1[i]==s2[i]:
				cnt1+=1
			elif i%2==0:
				print("DIFFERENT")
				break
			else:
				cnt2+=1
				if cnt2>1:
					print("DIFFERENT")
					break
			i+=1
				
		if cnt2==1:
			print("CLOSE")
		elif cnt1==len(s1):
			print("IDENTICAL")

Submission status: Wrong Answer

Solution code:
while 1:
	s1=input().split('"')
	if s1[0]==".":
		break
	s2=input().split('"')
	
	cnt1=0
	cnt2=0
	flag=0
	
	if len(s1)!=len(s2):
		print("DIFFERENT")
	else:
		i=0
		while i<len(s1):
			if s1[i]==s2[i]:
				cnt1+=1
			elif i%2==0:
				print("DIFFERENT")
				flag=1
				break
			else:
				cnt2+=1
				if cnt2>1:
					print("DIFFERENT")
					break
			i+=1
				
		if flag==1:
			break
		elif cnt2==1:
			print("CLOSE")
		elif cnt1==len(s1):
			print("IDENTICAL")

Submission status: Wrong Answer

Solution code:
while 1:
	s1=input().split('"')
	if s1[0]==".":
		break
	s2=input().split('"')
	
	cnt1=0
	cnt2=0
	flag=0
	
	if len(s1)!=len(s2):
		print("DIFFERENT")
	else:
		i=0
		while i<len(s1):
			if s1[i]==s2[i]:
				cnt1+=1
			elif i%2==0:
				print("DIFFERENT")
				flag=1
				break
			else:
				cnt2+=1
				if cnt2>1:
					print("DIFFERENT")
					break
			i+=1
				
		if flag==1 and cnt2==1:
			print("CLOSE")
		elif cnt1==len(s1):
			print("IDENTICAL")

Submission status: Wrong Answer

Solution code:
s=[]

while 1:
    l1=input()
    if l1==".":
        break
    l2=input()

    sp1=l1.split('"')
    sp2=l2.split('"')
    
    t=0
    if len(sp1)==len(sp2):
        for i in range(len(sp1)):
            if i%2==1 and sp1[i]!=sp2[i]:
                t+=1
            elif i%2!=1 and sp1[i]!=sp2[i]:
                t+=2


    if sp1==sp2:
        s+=["INDENTCAL"]
    elif t==1:
        s+=["CLODSE"]
    else:
        s+=["DIFFERENT"]

for x in s:
    print(x)

Submission status: Wrong Answer

Solution code:
s=[]

while 1:
    l1=input()
    if l1==".":
        break
    l2=input()

    sp1=l1.split('"')
    sp2=l2.split('"')
    
    t=0
    if len(sp1)==len(sp2):
        for i in range(len(sp1)):
            if i%2==1 and sp1[i]!=sp2[i]:
                t+=1
            elif i%2!=1 and sp1[i]!=sp2[i]:
                t+=2


    if sp1==sp2:
        s+=["IDENTCAL"]
    elif t==1:
        s+=["CLOSE"]
    else:
        s+=["DIFFERENT"]

for x in s:
    print(x)

Submission status: Wrong Answer

Solution code:
def p(A,s):
    i=0
    j=0
    s=[]
    while(len(A)>i):
        if A[i]=='"':
            list1=A.partition('"')
            s.append(list1[0])
            A=list1[2]
            i=0
            j+=1
        else:
            i+=1
            if len(A)==i:
                s.append(A)
    return s
A=input()
s1=[]
s2=[]
O=[]
while 1:
    i=0
    cnt=0
    B=input()
    s1=p(A,s1)
    s2=p(B,s2)
    l1=len(s1)
    l2=len(s2)    
    while i<l1 and i<l2:
        if s1[i]!=s2[i]:
            cnt+=1
        i+=1
    if cnt==0:
        O.append("IDENTICAL")
    elif cnt==1:
        O.append("CLOSE")
    else:
        O.append("DIFFERENT")
    A=input()
    if A==".":
        break
    
for i in range(len(O)):
    print(O[i])

Submission status: Wrong Answer

Solution code:
A=[]
while True:	
	a=input().split('"')
	if a[0]==".":
		break
	b=input().split('"')
	
	cnt=0

	if len(a)!=len(b):
		A.append(-1)
	else:
		for i in range(len(a)):
			if(a[i]==b[i]):
				pass
			else:
				cnt+=1
			if cnt==2:
				A.append(-1)
		if cnt==1:
			A.append(0)
		if cnt==0:
			A.append(1)

A.reverse()
for i in range(len(A)):
	tmp=A.pop()
	if tmp==-1:
		print("DIFFERENT")
	elif tmp==0:
		print("CLOSE")
	else:
		print("IDENTICAL")

Submission status: Wrong Answer

Solution code:
A=[]
while True:	
	a=input().split('"')
	if a[0]==".":
		break
	b=input().split('"')
	
	cnt=0

	if len(a)!=len(b):
		A.append(-1)
	else:
		for i in range(len(a)):
			if(a[i]==b[i]):
				pass
			else:
				cnt+=1
		if cnt==2:
			A.append(-1)
		if cnt==1:
			A.append(0)
		if cnt==0:
			A.append(1)

A.reverse()
#print(A)
for i in range(len(A)):
	tmp=A.pop()
	if tmp==-1:
		print("DIFFERENT")
	elif tmp==0:
		print("CLOSE")
	else:
		print("IDENTICAL")

Submission status: Wrong Answer

Solution code:
A=[]
while True:	
	a=input().split('"')
	if a[0]==".":
		break
	b=input().split('"')
	
	cnt=0

	if len(a)!=len(b):
		A.append(-1)
	else:
		for i in range(len(a)):
			if(a[i]==b[i]):
				pass
			else:
				cnt+=1
		if cnt==2:
			A.append(-1)
		if cnt==1:
			A.append(0)
		if cnt==0:
			A.append(1)

A.reverse()
#print(A)
for i in range(len(A)):
	tmp=A.pop()
	if tmp==-1:
		print("DIFFERENT")
	elif tmp==0:
		print("CLOSE")
	else:
		print("IDENTICAL")

Submission status: Wrong Answer

Solution code:
A=[]
while True:	
	a=input().split('"')
	if a[0]==".":
		break
	b=input().split('"')
	
	cnt=0

	if len(a)!=len(b):
		A.append(-1)
	else:
		for i in range(len(a)):
			if(a[i]==b[i]):
				pass
			else:
				cnt+=1
		print(cnt)
		if cnt>=2:
			A.append(-1)
		if cnt==1:
			A.append(0)
		if cnt==0:
			A.append(1)

A.reverse()
#print(A)
for i in range(len(A)):
	tmp=A.pop()
	if tmp==-1:
		print("DIFFERENT")
	elif tmp==0:
		print("CLOSE")
	else:
		print("IDENTICAL")

Submission status: Wrong Answer

Solution code:
A=[]
while True:	
	a=input().split('"')
	if a[0]==".":
		break
	b=input().split('"')
	
	cnt=0

	if len(a)!=len(b):
		A.append(-1)
	else:
		for i in range(len(a)):
			if(a[i]==b[i]):
				pass
			else:
				cnt+=1
		if cnt>=2:
			A.append(-1)
		if cnt==1:
			A.append(0)
		if cnt==0:
			A.append(1)

A.reverse()
#print(A)
for i in range(len(A)):
	tmp=A.pop()
	if tmp==-1:
		print("DIFFERENT")
	elif tmp==0:
		print("CLOSE")
	else:
		print("IDENTICAL")

Submission status: Wrong Answer

Solution code:
a1 = input()
a2 = input()
b1 = a1.split('"')
b2 = a2.split('"')
cnt = 0
if len(b1)==len(b2):
    for i in range(0,len(b1)):
        if i%2==0:
            if b1[i]!=b2[i]:
                cnt+=10000
                break
        if i%2!=0:
            if b1[i]!=b2[i]:
                cnt+=1
else:
    cnt+=10000

if cnt>1:
    print("DIFFERENT")
if cnt==1:
    print("CLOSE")
if cnt==0:
    print("IDENTICAL")

Submission status: Wrong Answer

Solution code:
while 1:
    s1=input().split('"')
    if s1[0]==".":
        break
    s2=input().split('"')
     
    flag2=0
    cnt2=0
    flag=0
     
    if len(s1)!=len(s2):
        print("DIFFERENT")
    else:
        i=0
        while i<len(s1):
            if s1[i]==s2[i]:
                flag2=1
            elif i%2==0:
                print("DIFFERENT")
                flag=1
                break
            else:
                cnt2+=1
                if cnt2>1:
                    print("DIFFERENT")
                    break
            i+=1
                 
        if flag==0 and cnt2==1:
            print("CLOSE")
        if flag2==1:
            print("IDENTICAL")

Submission status: Wrong Answer

Solution code:
while(1):
    a = input()
    if(a == '.'):
        break
    b = input()
    n = len(a)
    m = len(b)
    l = 0;
    flag = 0
    idx_dif = 0
    error_cou = 0

    while(1):
        if(l >= n-1 or l+idx_dif >= m-1):
            flag = 2

        if(flag == 0):
            for i in range(l,n):
                if(a[i] == '\"'):
                    #for j in range(l+idx_dif,m):
                        #if(b[j] == '\"'):
                            #if(a[l:i] == b[l+idx_dif:j]):
                    if(a[l:i] == b[l+idx_dif:i+idx_dif]):
                        l = i+1
                        flag = 1
                    else:
                        flag = 2
                    break
                                #idx_dif = j-i
                                #l = i+1
                                #flag = 1
                            #else:
                                #flag = 2
                            #break
                elif(i == n-1):
                    if(a[l:i] != b[l+idx_dif:m-1]):
                        flag = 2
                    else:
                        l = n-1
                    break
                if(flag != 0):
                    break

        elif(flag == 1):
            for i in range(l,n):
                if(a[i] == '\"'):
                    for j in range(l+idx_dif,m):
                        if(b[j] == '\"'):
                            if(a[l:i] != b[l+idx_dif:j]):
                                error_cou += 1
                            idx_dif = j-i
                            l = i+1
                            flag = 0
                            break
                        if(j == m-1):
                            flag = 2
                            break

                if(flag != 1):
                    break

        if(flag == 2):
            break
        if(l >= n-1 or l+idx_dif >= m-1):
            break

    if(error_cou >= 2 or flag == 2):
        print("DIFFERENT")
    elif(error_cou == 1):
        print("CLOSE")
    elif(error_cou == 0):
        print("IDENTICAL")