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)
}

C++:                                         #include <bits/stdc++.h>
                                        #include<iostream>
                                        #include<cstdio>
                                        #include<vector>
                                        #include<queue>
                                        #include<map>
                                        #include<cstring>
                                        #include<string>
                                        #include <math.h>
                                        #include<algorithm>
                                    //    #include <boost/multiprecision/cpp_int.hpp>
                                        #include<functional>
                                #define int long long
                                        #define inf  1000000007
                                        #define pa pair<int,int>
                                        #define ll long long
                                        #define pal pair<double,pa>
                                        #define ppa pair<int,int>
                                        #define ppap pair<pa,pa>
                                        #define ssa pair<string,int>
                                        #define  mp make_pair
                                        #define  pb push_back
                                        #define EPS (1e-10)
                                        #define equals(a,b) (fabs((a)-(b))<EPS)
                                  #define VI vector<int>
                                        using namespace std;
                                        
                                  class pas{
                                    	public:
                                    	int x,y;
                                    	pas(int x=0,int y=0):x(x),y(y) {}
                                    	pas operator + (pas p) {return pas(x+p.x,y+p.y);}
                                    	pas operator - (pas p) {return pas(x-p.x,y-p.y);}
                                    	pas operator * (int a) {return pas(x*a,y*a);}
                                    	pas operator / (int a) {return pas(x/a,y/a);}
                                    //	double absv() {return sqrt(norm());}
                                    	int norm() {return x*x+y*y;}
                                    	bool operator < (const pas &p) const{
                                    		return x != p.x ? x<p.x: y<p.y;
                                    	}
                                    	bool operator == (const pas &p) const{
                                    		return x==p.x && y==p.y;
                                    	}
                                    };
int n,V,W,K,N,L,R;
vector<int>ve;

//int dp[2][10001]={0};
int a[1010] ;
int s;
           signed main(){
            string s1,s2;
           	while(cin>>s1){
           		if(s1==".")return 0;
           		cin>>s2;
           //		cout<<s1<<s2<<endl;
           		vector<int> ve1,ve2;
           		ve1.pb(-1);
           		ve2.pb(-1);
           		for(int i=0;i<s1.length();i++)if(s1[i]=='"')ve1.pb(i);
           		for(int i=0;i<s2.length();i++)if(s2[i]=='"')ve2.pb(i);
           		ve1.pb(s1.length());
           		ve2.pb(s2.length());
           		vector<string> ves1,ves2;
           		if(ve1.size()!=ve2.size()){
           			cout<<"DIFFERENT"<<endl;
           			continue;
           		}
           		for(int i=0;i<ve1.size()-1;i++){
           			ves1.pb(s1.substr(ve1[i]+1,ve1[i+1]-ve1[i]-1));
           			ves2.pb(s2.substr(ve2[i]+1,ve2[i+1]-ve2[i]-1));
           		}
           		
           		int ans=0;
           		for(int i=0;i<ves1.size();i++){
           			if(ves1[i]==ves2[i]) continue;
           			if(i%2) ans++;
           			else ans+=100;
           		}
           		if(ans>1) cout<<"DIFFERENT"<<endl;
           		else if(ans==1) cout<<"CLOSE"<<endl;
           		else cout<<"IDENTICAL"<<endl;
           		
           	}
           	
           	
           	
           	
           	
           }

C++: #include <bits/stdc++.h>
using namespace std; // スペル注意
#define rep(i,n) repi(i,0,n)
#define repi(i,a,b) for(int i=(int)(a);i<(int)(b);++i)

vector<string> split(string s, char sp){
    vector<string> vs;
    string t = "";
    for(char c : s){
        if(c == sp){
            vs.emplace_back(t);
            t = "";
        }
        else{
            t += c;
        }
    }
    vs.emplace_back(t);
    return vs;
}
string calc(string S, string T){
        if(S == T){
            return "IDENTICAL";
        }
        vector<string> P = split(S, '\"');
        vector<string> Q = split(T, '\"');
        if(P.size() != Q.size())return "DIFFERENT";
        int cnt = 0;
        rep(i, P.size()){
            //cout << P[i] << " " << Q[i] << endl;
            if(i % 2 == 0){
                if(P[i] != Q[i])return "DIFFERENT";
            }
            else{
                if(P[i] != Q[i])cnt++;
            }
        }
        if(cnt > 1)return "DIFFERENT";
        return "CLOSE";
}

int main(){
    string S, T;
    while(cin >> S, S != "."){
        cin >> T;
        cout << calc(S,T) << endl;
    }
    return 0;
}