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:
    key = 0
    s1 = input()
    if s1 == '.':
        break
    s2 = input()
    if len(s1) == len(s2):
        for i in range(len(s1)):
            if s1[i] != s2[i]:
                key += 1
            if key >= 2:
                output.append('DIFFERENT')
                break
        if key == 0:
            output.append('IDENTICAL')
        elif key == 1:
            output.append('CLOSE')

    else:
        if len(s1) > len(s2):
            d = len(s1) - len(s2)
            if d >= 2:
                output.append('DIFFERENT')
                break
            elif d == 1:
                output.append('DIFFERENT')
                break
        else:
            d = len(s2) - len(s1)
            if d >= 2:
                output.append('DIFFERENT')
                break
            elif d == 1:
                output.append('DIFFERENT')
                break


for i in range(len(output)):
    print(output[i])

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

    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 cnt_d == 1 and i % 2 == 1:
                    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")

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

Python: #!/usr/bin/python
import sys
if sys.version_info[0]>=3: raw_input=input

def solve(s,t):
	if s==t:
		return 'IDENTICAL'
	s=s.split('"')
	t=t.split('"')
	if len(s)==len(t):
		k0=sum(s[i]!=t[i] for i in range(0,len(s),2))
		k1=sum(s[i]!=t[i] for i in range(1,len(s),2))
		if k0==0 and k1==1:
			return 'CLOSE'
	return 'DIFFERENT'

try:
	while True:
		s=raw_input().strip()
		if s=='.': break
		t=raw_input().strip()
		print(solve(s,t))
except EOFError:
	pass

Python: s=[]

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

        if l1==l2:
            s+=["INDENTCAL"]
        elif len(set(l1+l2))==1:
            s+=["CLODSE"]
        else:
            s+=["DIFFERENT"]


print(s)

Python: #16D8101014F 久留米 竜之介 Python3
#a=[]
while(True):
	i=0
	tmp=0
	a=input().split('"') 
	aL=len(a)
	if a[0] ==".":
		break
	b=input().split('"')
	bL=len(b)
		
	if aL != bL:
		print("DIFFELENT")
	else:
		while(True):
			if a[i] != b[i]:
				print("DIFFERENT")
				break
			elif i > aL-2:
				if tmp==1:
					print("CLOSE")
					break
				else:
					print("IDENTICAL")
					break
			elif a[i+1] != b[i+1]:
				if tmp==1:
					print("DIFFERENT")
					break
				else: tmp=1
			i +=2

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(flag == 0):
            for i in range(l,n):
                if(a[i] == '\"'):
                    if(i+idx_dif < m and a[l:i+1] == b[l+idx_dif:i+idx_dif+1]):
                        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
 
        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+1] != b[l+idx_dif:j+1]):
                                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 or 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")

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