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

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: #!/usr/bin/env python3
# -*- coding: utf-8 -*-
import re
from typing import List

def rdp_connect() -> bool:
    global s1, s2
    s1 = input()
    if s1 == '.':
        return False
    s2 = input()
    return True

def rdp_token(s: str) -> List[str]:
    res = []
    while s:
        match = re.match(r'[a-zA-Z0-9;]+', s)
        if match:
            res.append(s[:match.end()])
            s = s[match.end():]
            continue
        match = re.match(r'"[^"]*"', s)
        if match:
            res.append(s[:match.end()-1])
            s = s[match.end():]
            continue
    return res

def rdp_check() -> bool:
    l1 = rdp_token(s1)
    l2 = rdp_token(s2)
    if len(l1) != len(l2):
        return False
    flag = True
    for t1, t2 in zip(l1, l2):
        if t1 == t2:
            continue
        if t1[0] == t2[0] == '"' and flag:
            flag = False
        else:
            return False
    return True

if __name__ == '__main__':
    while rdp_connect():
        if s1 == s2:
            print('IDENTICAL')
        elif rdp_check():
            print('CLOSE')
        else:
            print('DIFFERENT')

Python: while 1:
    s1 = input().split('"')
    if s1 == ['.']:
        break
    s2 = input().split('"')
    if len(s1) != len(s2):
        print("DIFFERENT")
        continue
    r = [0]*2
    for i in range(len(s1)):
        if s1[i] != s2[i]:
            r[i%2] += 1
    if [0,1]<r:
        print("DIFFERENT")
    else:
        print(["IDENTICAL","CLOSE"][r[1]])

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('CLOSE')
                break
        else:
            d = len(s2) - len(s1)
            if d >= 2:
                output.append('DIFFERENT')
                break
            elif d == 1:
                output.append('CLOSE')
                break


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

Python: def vals(arr):
    even = True
    res = [[], []]
    tmp = []
    for e in arr:
        if e == "\"":
            even = not even
            res[even].append(tmp)
            tmp = []
            continue
        tmp.append(e)
    even = not even
    res[even].append(tmp)
    return res


while True:
    str1 = input()
    if str1 == ".":
        break
    a = vals(str1)
    b = vals(input())
    res = 0
    for (x, y) in zip(a[0], b[0]):
        if x != y:
            res = 2
            break
    if res == 0:
        for (a, b) in zip(a[1], b[1]):
            if a != b:
                if res == 1:
                    break
                res += 1
    if res == 0:
        print("IDENTICAL")
    elif res == 1:
        print("CLOSE")
    else:
        print("DIFFERENT")

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