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>
using namespace std;
#define ll long long
typedef pair<ll,ll> P;
typedef pair<ll,P> PP;
const ll MOD = 1e9+7;

int main(){
  string s,t;
  while(cin>>s,s!="."){
	cin>>t;
	//cout<<"A"<<endl;
	vector<string> vs[2],vt[2];
	int cnt=0;
	string tmp="";
	for(int i=0;i<s.size();i++){
	  if(s[i]=='"'){
		vs[cnt%2].push_back(tmp);
		tmp="";
		cnt++;
	  }else tmp+=s[i];
	}
	vs[cnt%2].push_back(tmp);
	//cout<<"A"<<endl;
	
	tmp="";
	cnt=0;
	for(int i=0;i<t.size();i++){
	  if(t[i]=='"'){
		vt[cnt%2].push_back(tmp);
		tmp="";
		cnt++;
	  }else tmp+=t[i];
	}
	vt[cnt%2].push_back(tmp);
	//	cout<<"A"<<endl;
	int flg=0;
	for(int i=0;i<2;i++)
	  if(vs[i].size()!=vt[i].size()){
		cout<<"DIFFERENT"<<endl;
		flg=1;
		break;
	  }
	if(flg)continue;
	//	cout<<"A"<<endl;
	int f=0;
	for(int i=0;i<vs[0].size();i++){
	  if(vs[0][i]!=vt[0][i])f+=2;
	}
	for(int i=0;i<vs[1].size();i++){
	  if(vs[1][i]!=vt[1][i])f+=1;
	}
	if(f==0)cout<<"IDENTICAL"<<endl;
	else if(f==1)cout<<"CLOSE"<<endl;
	else cout<<"DIFFERENT"<<endl;
  }
  return 0;
}

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

int main() {
    while (true){
  string s1,s2;
  int u=-1,t=0,v=0;
  cin >> s1 >> s2;
  if (s1==".") break;
  vector<string> a(0),b(0);
  string y1="",y2="";
  for (int i=0;i<s1.size();i++){
    if (s1.at(i)=='"') {
      a.push_back("");
      u++;
      i++;
      while (true){
        if (s1.at(i)=='"') break;
        else a.at(u)=a.at(u)+s1.at(i);
        i++;
      }
    }
    y1=y1+s1.at(i);
  }
  u=-1;
  for (int i=0;i<s2.size();i++){
    if (s2.at(i)=='"') {
      b.push_back("");
      u++;
      i++;
      while (true){
        if (s2.at(i)=='"') break;
        else b.at(u)=b.at(u)+s2.at(i);
        i++;
      }
    }
    y2=y2+s2.at(i);
  }
  if (y1!=y2) {cout << "DIFFERENT" << endl;return 0;}
  for (int i=0;i<a.size();i++){
    if (a.at(i)!=b.at(i)) v++;
  }
  if (v==0) cout << "IDENTICAL" << endl;
  if (v==1) cout << "CLOSE" << endl;
  if (v>1) cout << "DIFFERENT" << endl;
}
}

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

int main(){
	while(1){
		string s1,s2;
		cin>>s1;
		if(s1==".")return 0;
		cin>>s2;
		string s11[201],s22[201];
		for(int i=0;i<201;i++){
			s11[i]=".";s22[i]=".";
		}
		s11[0]="";s22[0]="";
		int now1=0,now2=0;
		for(int i=0;i<(int)s1.length();i++){
			if(s1[i]=='"'){
				now1++;
				s11[now1]="";
			}else s11[now1]+=s1[i];
		}
		for(int i=0;i<(int)s2.length();i++){
			if(s2[i]=='"'){
				now2++;
				s22[now2]="";
			}else s22[now2]+=s2[i];
		}
		int d=0;
		for(int i=0;i<201;i++){
			if(s11[i]!=s22[i]){
				if(i&1){
					d++;
				}else d+=2;
			}
		}
		if(d==0)cout<<"IDENTICAL";
		else if(d==1)cout<<"CLOSE";
		else cout<<"DIFFERENT";
		cout<<"\n";
	}
}

C++: #include <bits/stdc++.h>
using namespace std;
const int maxn=1e5+10;
char s1[maxn],s2[maxn];
string temp1,temp2;
int l,r,tim;
int flag=0;
void com(){
	temp1="";temp2="";
	l++;r++;
	while(s1[l]!='"'){
		temp1+=s1[l];
		l++;
	}
	l++;
	while(s2[r]!='"'){
		temp2+=s2[r];
		r++;
	}
	r++;
	if(temp1!=temp2){
		tim++;
	}
	return;
}

int main(){
	//freopen("in.txt","r",stdin);
	//freopen("out.txt","w",stdout);
	while(scanf("%s%s",s1,s2)==2){
		int len1=strlen(s1),len2=strlen(s2);
		l=0,r=0;tim=0;
		while(l<len1&&r<len2){
			if(s1[l]=='"'&&s2[r]=='"'){
				com();
				if(tim>1){
					printf("DIFFERENT\n");
					l=len1+1;r=len2+1;
					break;
				}
			}else{
				if(s1[l]==s2[r]){
					l++;r++;
				}else{
					printf("DIFFERENT\n");
					l=len1+1;r=len2+1;
					break;
				}
			}
		}
		if(l<len1||r<len2){
			printf("DIFFERENT\n");
			continue;
		}
		if(l==len1&&r==len2){
			if(tim==1)
				printf("CLOSE\n");
			else
				printf("IDENTICAL\n");	
		}
	}
}