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<iostream>
#include<string>
using namespace std;

int main(){
  while(true){
    string s1;
    cin >> s1;

    if(s1==".")
      break;

    string s2;
    cin >> s2;

    if(s1==s2){
      cout << "IDENTICAL" << endl;
      continue;
    }

    string t1 = s1;
    string t2 = s2;

    while(true){
      size_t d1b = t1.find('\"');
      if(d1b==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;
      u1.replace(d1b+1, d1e-d1b-1, "");
      string u2 = s2;
      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;
    }
  }
  return 0;
}

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

#ifdef __linux
#define _U(s) s##_unlocked
#else
#define _U(s) _##s##_nolock
#define _CRT_DISABLE_PERFCRIT_LOCKS
#endif
#define gcu _U(getchar)
#define pcu _U(putchar)
#define _DEF(r, n, ...) inline r n(__VA_ARGS__) noexcept
#define _T template <typename T>
#define _HT template <typename H,typename... T>
#define _OP(t) inline operator t()
struct _in {
#ifdef _GLIBCXX_STRING
	_OP(string){string s;for(char c;c=gcu(),c!=' '&&c!='\n'&&c!=EOF;)s+=c;return s;}
#define _S
#endif
	_OP(char){char c=gcu();gcu();return c;}
	_OP(double){double d; scanf("%lf",&d); gcu();return d;}
	_T _OP(T){T n{},m{1},c;if((c=gcu())=='-')m=-1,c=gcu();do{n=10*n+(c-'0'),c=gcu();}while(c>='0'&&c<='9');return m*n;}
} in;
#define _SCAN(...) _DEF(bool,scan,__VA_ARGS__)
#ifdef _S
_SCAN(string &o) {int c{gcu()};if(c==EOF)return false;else{ungetc(c,stdin);string t=move(in);o=t;return true;}}
#endif
_T _SCAN(T &o) {int c{gcu()};return c==EOF?false:(ungetc(c,stdin),o=in,true);}
_HT _SCAN(H &h,T&&... t){return scan(h)&&scan(t...);}
#define _OUT(...) _DEF(void,out,__VA_ARGS__)
#define _OUTL(...) _DEF(void,outl,__VA_ARGS__)
_OUT(bool b){pcu('0'+b);}
_OUT(const char *s){while(*s)pcu(*s++);}
_OUT(char c){pcu(c);}
#ifdef _S
_OUT(string &s){for(char c:s)pcu(c);}
#endif
_T _OUT(T n){static char b[20];char *p=b;T m=n<0?pcu('-'),-1:1;
	if(!n)*p++='0';else while(n)*p++=(char)(n%10*m+'0'),n/=10;while(p!=b)pcu(*--p);}
_OUTL(){out('\n');}
#ifdef _GLIBCXX_VECTOR
	_T _OUT(vector<T> &v){for(T &x:v)out(&x == &v[0]?"":" "),out(x);}
#endif
	_HT _OUT(H &&h, T... t){out(h);out(t...);}
	template <typename... T> _OUTL(T... t){out(t...);outl();}
	struct range{
		int e,b=0,s=1;range(int _b,int _e,int _s):e(_e),b(_b),s(_s){} range(int _b,int _e): e(_e), b(_b){} range(int _e):e(_e){}
		struct it{int v,s; it(int _v,int _s):v(_v),s(_s){} operator int()const{return v;} operator int&(){return v;}int operator*()const{return v;}
			it& operator++(){v+=s;return *this;} }; it begin(){return {b,s};} it end(){return {e,s};}};
#define times(i,n) for(int i=n;i;i--)

struct O {
	string s;
	bool q;
};

O strip (string::iterator &i, string::iterator e) {
	O o;
	if (*i == '\"') {
		o.q = true;
		i++;
		while (*i != '\"')
			o.s.push_back(*i++);
		i++;
	} else {
		o.q = false;
		while (*i != '\"' && i != e)
			o.s.push_back(*i++);
	}
	return o;
}

int main() {
	for (;;) {
		string s1 = in, s2 = in;
		if (s1 == ".")
			return 0;
		[&] {
			bool f {};
			for (auto i1 {begin(s1)}, i2 {begin(s2)}; i1 != end(s1) || i2 != end(s2);) {
				O o1 {strip(i1, end(s1))}, o2 {strip(i2, end(s2))};
				if (o1.q && o2.q && o1.s != o2.s) {
					if (f) {
						outl("DIFFERENT");
						return;
					} else
						f = true;
				} else if (o1.s != o2.s || o1.q != o2.q) {
					outl("DIFFERENT");
					return;
				}
			}
			outl(f ? "CLOSE" : "IDENTICAL");
		}();
	}
}

C++: #include<iostream>
#include<string>
#include<utility>

using namespace std;

int main(){

  char s1[200]={0};
  char s2[200]={0};
  char t1[200]={0};
  char t2[200]={0};
  int c=0,flag=0,j=0,k=0;

  cin>>s1>>s2;
 
  for(int i=0;i<200;i++){
    if(s1[i]=='"'){
      if(flag==0){
	flag=1;
	
      }else if(flag==1){
	flag=0;
	
      }
    }

    if(flag==1){
      t1[j]=s1[i];
      j++;
      
    }

  }
  j=0;

 for(int i=0;i<200;i++){

    if(s2[i]=='"'){
      if(flag==0){
	flag=1;
	
      }else if(flag==1){
	flag=0;
	
      }
    }

    if(flag==1){
      t2[j]=s2[i];
      j++;
    }

  }
 j=0;
 flag=0;

  cout<<t1<<endl;
 cout<<t2<<endl;

 //kyuukei~~~

   
  for(int i=0;i<150;i++){


    if(flag==1){
    if(t1[j]!=t2[k]){
      c++;
      flag=0;
    }

    if(t1[j]=='"' && t2[k]!='"'){
      j--;
    }
    if(t2[k]=='"' && t1[j]!='"'){
      k--;
    }

    j++;
    k++;

    }

   if(t1[j]=='"' && t2[k]=='"'){
     flag=1;

    }



  

  }


    if(c==0){
      cout<<"IDENTICAL"<<endl;
    }else if(c==1){
      cout<<"CLOSE"<<endl;
    }else{
      cout<<"DIFFERENT"<<endl;
    }
  
return 0;
}