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 int long long
using namespace std;

signed main(){
  
  while(1){
    
    string s1, s2;
    cin>>s1;
    if( s1 == "." ) break;
    cin>>s2;
  
    if( s1 == s2 ){
      cout<<"IDENTICAL"<<endl;
      continue;
    }
  
    int cnt1 = 0;
    string str;
  
    vector<string> A, B;
  
    for(int i=0;i<(int)s1.size();i++){
    
      if( s1[i] == '\"' ){
      
	if( cnt1 % 2 == 0 ) A.push_back( str );
	else B.push_back( str );
      
	str = "";
      
	cnt1++;
      
      }
      else str += s1[i];
    
    }
    
    A.push_back( str );
    
    int cnt2 = 0;
    
    str = "";
    
    vector<string> C, D;
    
    for(int i=0;i<(int)s2.size();i++){
    
      if( s2[i] == '\"' ){
      
	if( cnt2 % 2 == 0 ) C.push_back( str );
	else D.push_back( str );
      
	str = "";
      
	cnt2++;
      
      }
      else str += s2[i];
    
    }
    
    C.push_back( str );
    
    if( cnt1 != cnt2 ) cout<<"DIFFERENT"<<endl;
    else{
      
      int flag = 0;
	
      for(int i=0;i<(int)A.size();i++){
	
	if( A[i] != C[i] ){
	  cout<<"DIFFERENT"<<endl;
	  flag = 1;
	  break;
	}
	
      }
      
      if( flag == 0 ){
	
	int cnt = 0;
	  
	for(int i=0;i<(int)B.size();i++){
	  
	  if( B[i] != D[i] ) cnt++;
	  
	}
	  
	if( cnt == 1 ) cout<<"CLOSE"<<endl;
	else cout<<"DIFFERENT"<<endl;
	
      }
    
    }

  }
  
  return 0;
}

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

using namespace std;

int main()
{
  string S, T;
  while(cin >> S, S != ".") {
    cin >> T;
    int beet = 0;
    string latte, malta;
    vector< string > oi, ushi;
    for(int i = 0; i < S.size(); i++) {
      if(beet % 2 == 0) latte += S[i], oi.push_back("");
      else oi.back() += S[i];
      if(S[i] == '\"') ++beet;
    }
    beet = 0;
    for(int i = 0; i < T.size(); i++) {
      if(beet % 2 == 0) malta += T[i], ushi.push_back("");
      else ushi.back() += T[i];
      if(T[i] == '\"') ++beet;
    }
    int incorrect = 0;
    if(oi.size() != ushi.size()) incorrect = 114514;
    else for(int i = 0; i < oi.size(); i++) incorrect += oi[i] != ushi[i];

    if(latte != malta || incorrect >= 2) {
      cout << "DIFFERENT" << endl;
    } else if(S == T) {
      cout << "IDENTICAL" << endl;
    } else {
      cout << "CLOSE" << endl;
    }
  }
}

C++: #include <bits/stdc++.h>
  
using namespace std;
  
#define rep(i,n) REP(i,0,n)
#define REP(i,s,e) for(int i=(s); i<(int)(e); i++)
#define pb push_back
#define all(r) r.begin(),r.end()
#define rall(r) r.rbegin(),r.rend()
#define fi first
#define se second
  
typedef long long ll;
typedef vector<int> vi;
typedef vector<ll> vl;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
 
const int INF = 1e9;
const ll MOD = 1e9 + 7;
double EPS = 1e-8;

#define DEBUG_MODE
#ifdef DEBUG_MODE
#define dump(x) cout << #x << " : " << x << endl
#define LINE cout << "line : " << __LINE__ << endl
#define dumpV(v) cout << #v << " : ["; for(auto& t : v) cout << t << ", "; cout<<"]" << endl;
#define STOP assert(false);
#else
#define dump(x) ;
#define LINE 	;
#define dumpV(v);
#define STOP 	;
#endif

namespace std{
  template<class S,class T>
  ostream &operator <<(ostream& out,const pair<S,T>& a){
    out<<'('<<a.fi<<", "<<a.se<<')';
    return out;
  }
}


vector<string> split(const string& s, char c = ' ') {
	vector<string> ret;
	stringstream ss(s);
	string t;
	while(getline(ss, t, c)) ret.push_back(t);
	return ret;
}

int main(){
	string s, t;
	while(cin >> s) {
		if(s == ".") break;
		cin >> t;
		if(s == t) {
			cout << "IDENTICAL" << endl;
			continue;
		}
		auto vs = split(s, '\"');
		auto vt = split(t, '\"');
		if(vs.size() != vt.size()) {
			cout << "DIFFERENT" << endl;
			continue;
		}
		int diff = 0;
		for(int i = 0; i < vs.size(); i+= 2) {
			if(vs[i] != vt[i]) diff++;
		}
		if(diff > 0) {
			cout << "DIFFERENT" << endl;
			continue;
		}
		for(int i = 1; i < vs.size(); i += 2) {
			if(vs[i] != vt[i]) diff++;
		}
		cout << (diff == 1 ? "CLOSE" : "DIFFERENT") << endl;
	}
	return 0;
}