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: 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]):
                                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 or error_cou == 2):
            break
 
    if(error_cou >= 2 or flag == 2):
        print("DIFFERENT")
    elif(error_cou == 1):
        print("CLOSE")
    elif(error_cou == 0):
        print("IDENTICAL")

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

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

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

Python: def check(s1,s2):
    l1 = s1.split('"')
    l2 = s2.split('"')
    if len(l1) != len(l2):
        return "DIFFERENT"
    close = 0
    for i in range(len(l1)):
        if l1[i] != l2[i]:
            if i % 2 == 0: return "DIFFERENT"
            else : close += 1
    if close == 1: return "CLOSE"
    if close == 0: return "IDENTICAL"
    return "DIFFERENT"

if __name__ == '__main__':
    while True:
        s1 = input()
        if s1 == ".": break
        s2 = input()
        print(check(s1,s2))

Python: #2行の文字列を受け取る
while True:
    str1 = input()
    if str1 == ".":
        break

    str2 = input()
#完全一致か判定する→「完全一致なら：ＸＸＸｘとだす」
    if str1 == str2:
        print("IDENTICAL")
        continue

#完全一致じゃない場合は→""でsplitする→頭が"ならば、奇数番目、頭が"じゃなければ、偶数番目にかこまれているやつはくる
        
    str1 = str1.split("\"")
    str2 = str2.split("\"")
    if not len(str1)==len(str2):
        print("DIFFERENT")
        continue
    
#""で囲まれていない場所が違っていたら、そもそもdiffrentをだす
    flg = 0
    for i in range(0,len(str1),2):
        if not str1[i] == str2[i]:
            flg = 1
            print("DIFFERENT")
            break
    if flg == 1:
        continue
    

#""で囲まれている場所を確認し、相違が1つだけならXXXXXを、2つ以上あればdiffrentをだす
    count = 0
    for i in range(1,len(str1),2):
        if not str1[i] == str2[i]: count +=1
        if count >= 2:
            break
    if count == 1:
        print("CLOSE")
    else:
        print("DIFFERENT")