Go: package main

import (
	"bufio"
	"fmt"
	"os"
	"strconv"
	"strings"
)

func main() {
	io := NewIo()
	defer io.Flush()
	for {
		s := io.NextLine()
		if s == "." {
			break
		}
		t := io.NextLine()
		if s == t {
			io.Println("IDENTICAL")
			continue
		}
		ss := strings.Split(s, "\"")
		tt := strings.Split(t, "\"")
		if len(ss) != len(tt) {
			io.Println("DIFFERENT")
			continue
		}
		cnt := 0
		for i := 0; i < len(ss); i++ {
			if i%2 == 0 {
				if ss[i] != tt[i] {
					cnt = -1
					break
				}
			} else {
				if ss[i] != tt[i] {
					cnt++
				}
			}
		}
		if cnt > 1 || cnt == -1 {
			io.Println("DIFFERENT")
		} else {
			io.Println("CLOSE")
		}
	}
}

// I/O template
type Io struct {
	reader    *bufio.Reader
	writer    *bufio.Writer
	tokens    []string
	nextToken int
}

func NewIo() *Io {
	return &Io{
		reader: bufio.NewReader(os.Stdin),
		writer: bufio.NewWriter(os.Stdout),
	}
}

func (io *Io) Flush() {
	err := io.writer.Flush()
	if err != nil {
		panic(err)
	}
}

func (io *Io) NextLine() string {
	var buff []byte
	for {
		line, isPrefix, err := io.reader.ReadLine()
		if err != nil {
			panic(err)
		}
		buff = append(buff, line...)
		if !isPrefix {
			break
		}
	}
	return string(buff)
}

func (io *Io) Next() string {
	for io.nextToken >= len(io.tokens) {
		line := io.NextLine()
		io.tokens = strings.Fields(line)
		io.nextToken = 0
	}
	s := io.tokens[io.nextToken]
	io.nextToken++
	return s
}

func (io *Io) NextInt() int {
	i, err := strconv.Atoi(io.Next())
	if err != nil {
		panic(err)
	}
	return i
}

func (io *Io) NextFloat() float64 {
	i, err := strconv.ParseFloat(io.Next(), 64)
	if err != nil {
		panic(err)
	}
	return i
}

func (io *Io) Println(a ...interface{}) {
	fmt.Fprintln(io.writer, a...)
}

func (io *Io) Printf(format string, a ...interface{}) {
	fmt.Fprintf(io.writer, format, a...)
}

func (io *Io) PrintIntSlice(a []int) {
	b := []interface{}{}
	for _, x := range a {
		b = append(b, x)
	}
	io.Println(b...)
}

func (io *Io) PrintStringSlice(a []string) {
	b := []interface{}{}
	for _, x := range a {
		b = append(b, x)
	}
	io.Println(b...)
}

func Log(name string, value interface{}) {
	fmt.Fprintf(os.Stderr, "%s=%+v\n", name, value)
}

func ExampleIo() {
	io := NewIo()
	defer io.Flush()
	a := make([]int, 0, 3)
	a[0], a[1], a[2] = io.NextInt(), io.NextInt(), io.NextInt()
	io.Println(a)
	io.PrintIntSlice(a)
	Log("io", a)
}

Python: def solve(s1, s2):
    if len(s1) != len(s2):
        return "DIFFERENT"
    for i in range(0, len(s1), 2):
        if s1[i] != s2[i]:
            return "DIFFERENT"
    diff_count = 0
    for i in range(1, len(s1), 2):
        if s1[i] != s2[i]:
            diff_count += 1
    if diff_count == 0:
        return "IDENTICAL"
    elif diff_count == 1:
        return "CLOSE"
    else:
        return "DIFFERENT"


if __name__ == "__main__":
    i = 1
    while True:
        s1 = input()
        if s1 == ".":
            break
        s2 = input()
        #
        s1_list = s1.split('"')
        s2_list = s2.split('"')
        print(solve(s1_list, s2_list))

Python: ans=[]

while 1:
	s1=input().split('"')
	if s1[0]==".":
		break

	s2=input().split('"')
	
	if len(s1)!=len(s2):
		ans.append("DIFFERENT")
		continue
	else:
	
		cnt=0
		flag=0
		
		for i in range(len(s1)):
		
			if s1[i]!=s2[i]:
			
				if i==0:
					flag=1
					break
					
				elif i%2==0:
					flag=1
					break
				else:
					cnt+=1
			
		if flag==1 or cnt>1:
			ans.append("DIFFERENT")
		elif cnt==1:
			ans.append("CLOSE")
		else:
			ans.append("IDENTICAL")

for a in ans:
	print(a)

Python: ans_list = []

def solve():
    S = input()
    if S == ".":
        return "end"
    T = input()

    if S == T:
        return "IDENTICAL"

    cs = []
    ct = []

    ns = []
    nt = []

    tmp = ""
    flag = False
    for s in S:
        if s == '"':
            if flag:
                flag = False
                cs.append(tmp)
            else:
                flag = True
                ns.append(tmp)
            tmp = ""
            continue
        tmp += s
    ns.append(tmp)

    tmp = ""
    flag = False
    for t in T:
        if t == '"':
            if flag:
                flag = False
                ct.append(tmp)
            else:
                flag = True
                nt.append(tmp)
            tmp = ""
            continue
        tmp += t
    nt.append(tmp)

    if ns != nt or len(cs) != len(ct):
        return "DIFFERENT"
    
    cnt = 0
    for csi, cti in zip(cs, ct):
        if csi != cti:
            cnt += 1
    
    if cnt == 1:
        return "CLOSE"
    else:
        return "DIFFERENT"
    

while True:
    ans = solve()
    if ans == "end":
        break
    ans_list.append(ans)

for ans in ans_list:
    print(ans)

Python: results=[]
while True:
    a=input().split("\"")
    if a[0]==".":
        break
    b=input().split("\"")
    count=0
    for i in range(0,int(len(a)/2)):
        for k,l in zip(a[2*i+1],b[2*i+1]):
            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")

Python: 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])

Python: s=[]
while True:
    l1=input()
    if l1==".":
        break
    l2=input()
 
    sp1=l1.split('"')
    sp2=l2.split('"')
     
    m=0
    if len(sp1)==len(sp2):
        for i in range(len(sp1)):
            if i%2==1 and sp1[i]!=sp2[i]:
                m+=1
            elif i%2!=1 and sp1[i]!=sp2[i]:
                m+=2
 
 
    if sp1==sp2:
        s+=["IDENTICAL"]
    elif m==1:
        s+=["CLOSE"]
    else:
        s+=["DIFFERENT"]
 
for x in s:
    print(x)

Python: 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")