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>
#define rep(i,j,k) for(int i=(int)j;i<(int)k;i++)
#define itrep(x) for(auto it=(x).begin();it!=(x).end();it++) 
#define Sort(x) sort((x).begin(),(x).end())
#define all(x) (x).begin(),(x).end()
#define fi first
#define se second
#define vi vector<int>
#define INF (int)1e9
#define INFL 1e18
#define MOD 1000000007
#define pb push_back
#define MP make_pair
#define PI 3.1415926535
typedef long long int ll;
typedef std::pair<int,int> P;
int D=1;
int dx[4]={0,1,0,-1},dy[4]={1,0,-1,0};
 
using namespace std;

vector<string> split(string s, char c){
    if(s[s.size()-1]!=c)s.push_back(c);
    
    vector<string> v;
    int pos=0;
    for(int i=0;i<s.size();i++){
        if(s[i]==c){
            v.push_back(s.substr(pos,i-pos));
            pos=i+1;
        }
    }
    return v;
}

int main(){
    string s,t;
    while(getline(cin,s)){
        if(s==".")break;
        getline(cin,t);
        if(s==t){
            cout<<"IDENTICAL"<<endl;
            continue;
        }
    
        vector<string> ss=split(s,'"'), tt=split(t,'"');
        if(ss.size()!=tt.size()){
            cout<<"DIFFERENT"<<endl;
            continue;
        }
        int count=0;
        rep(i,0,ss.size()){
            if(ss[i]!=tt[i]){
                if(i%2==0){
                    cout<<"DIFFERENT"<<endl;
                    goto AWAY;
                }else {
                    count++;
                }
            }
        }
        if(count>1)cout<<"DIFFERENT"<<endl;
        else cout<<"CLOSE"<<endl;
        AWAY:;
    
    }
    return 0;
}

C++: #include <bits/stdc++.h>

#define ALL(a) (a).begin(), (a).end()
#define llong long long

using namespace std;

string pickword(const string &str, int &i){
	int j = 0;
	for(; i+j < str.size() && str[i+j] != '"'; j++);
	string ret = j == 0 ? "" : str.substr(i, j);
	i += j;
	return ret;
}

signed main(){
	while(true){
		string str; cin >> str;
		if(str == ".")break;
		string tgt; cin >> tgt;
		bool yellow = false;
		int ans = 1;
		for(int i = 0, j = 0; i < str.size() && j < str.size(); i++, j++){
			if(str[i] == tgt[j] && str[i] == '"'){
				i++; j++;
				string word = pickword(str, i);
				if(word != pickword(tgt, j)){
					if(yellow){
						ans = -1;
						break;
					}
					else{
						yellow = true;
						ans = 0;
					}
				}
			}
			if(str[i] != tgt[j]){
				ans = -1;
				break;
			}
		}
		if(ans == 1)cout << "IDENTICAL" << endl;
		else if(ans == 0)cout << "CLOSE" << endl;
		else cout << "DEFFERENT" << endl;
	}

	return 0;
}

C++: #include <bits/stdc++.h>
using namespace std;

#define INF_LL (int64)1e18
#define INF (int32)1e9
#define REP(i, n) for(int64 i = 0;i < (n);i++)
#define FOR(i, a, b) for(int64 i = (a);i < (b);i++)
#define all(x) x.begin(),x.end()
#define fs first
#define sc second

using int32 = int_fast32_t;
using uint32 = uint_fast32_t;
using int64 = int_fast64_t;
using uint64 = uint_fast64_t;
using PII = pair<int32, int32>;
using PLL = pair<int64, int64>;

const double eps = 1e-10;

template<typename A, typename B>inline void chmin(A &a, B b){if(a > b) a = b;}
template<typename A, typename B>inline void chmax(A &a, B b){if(a < b) a = b;}

template<typename T>
vector<T> make_v(size_t a){return vector<T>(a);}

template<typename T,typename... Ts>
auto make_v(size_t a,Ts... ts){
  return vector<decltype(make_v<T>(ts...))>(a,make_v<T>(ts...));
}

template<typename T,typename U,typename... V>
typename enable_if<is_same<T, U>::value!=0>::type
fill_v(U &u,const V... v){u=U(v...);}

template<typename T,typename U,typename... V>
typename enable_if<is_same<T, U>::value==0>::type
fill_v(U &u,const V... v){
  for(auto &e:u) fill_v<T>(e,v...);
}

vector<string> parse(string s) {
  vector<string> ret;
  string now = "";
  REP(i, s.size()) {
    if (s[i] == '\"') {
      ret.push_back(now);
      now = "";
    } else {
      now += s[i];
    }
  }
  ret.push_back(now);
  return ret;
}

int main(void) {
  string s, t;
  while (cin >> s && s != ".") {
    cin >> t;
    auto s1 = parse(s), s2 = parse(t);
    int64 cnt = 0;
    bool ok = 1;
    if (s1.size() != s2.size()) {
      ok = 0;
    } else {
      REP(i, s1.size()) {
        if (i % 2 == 0) {
          if (s1[i] != s2[i]) ok = 0;
        } else {
          if (s1[i] != s2[i]) cnt++;
        }
      }
    }
    if (!ok || cnt >= 2) {
      cout << "DIFFERENT" << endl;
    } else if (cnt == 1) {
      cout << "CLOSE" << endl;
    } else {
      cout << "IDENTICAL" << endl;
    }
  }
}

C++: #include<iostream>
#include<string>
using namespace std;

int main(){
	while(1){
		string s1,s2;
		cin>>s1>>s2;
		
		if(s1=="."){
			break;
		}
		
		if(s1==s2){
			cout<<"IDENTICAL"<<endl;
		}
		
		string t1=s1;
		string t2=s2;
		
		while(1){
			size_t d1b=t1.find('\"');
			if(dib==string::npos){
				break;
			}
			t1.replace(d1b,1,"@");
			size_t d1e=t1.find('\"');
			t1.replace(d1e,1,"@");
			
			size_t d2b=t2.find('\"');
			if(d2b==string::npos){
				break;
			}
			t2.replace(d2b,1,"@");
			size_t d2e=t2.find('\"');
			t2.replace(d2e,1,"@");
		
			string u1=s1;
			string u2=s2;
			u1.replace(d1b+1,d1e-d1b-1,"");
			u2.replace(d2b+1,d2e-d2b-1,"");
	
			if(u1==u2){
				t1=u1;
				t2=u2;
				break;
			}
		}
		if(t1==t2){
			cout<<"CLOSE"<<endl;
		}else{
			cout<<"DIFFERENT"<<endl;
		}
			
	}
	return0;
}