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>

int strcmp(char s1[],char s2[]){
  int i=0;
  int count = 0;
  while(s1[i] != '\0' && s2[i] !='\0'){
    if(s1[i] == '\0' || s2[i] == '\0'){
      count++;
      return count;
    }else if(s1[i] != s2[i]){
      count++;
      if(count ==2){
	return -1;
      }
    }else{
      //std::cout << s1[i] << s2[i]  << ":一致\n";
    }
    i++;
  }
  return count;
}

int main(){
  char s1[200]= {} ;
  char s2[200] = {} ;
  for(int i=0;i<100;i++){
    std::cin >> s1 ;
    if(s1[0] == '.') break;
    std::cin >> s2;
    int compare = strcmp(s1,s2);
    if(compare == 0){
      std::cout << "IDENTICAL\n";
    }else if(compare == 1){
      std::cout << "CLOSE\n";
    }else{
      std::cout << "DIFFERENT\n";
    }
  }

  return 0;
}

C++: #include <stdio.h>
#include <iostream>
#include <string>
#include <sstream>
#include <stack>
#include <algorithm>
#include <cmath>
#include <queue>
#include <map>
#include <set>
#include <cstdlib>
#include <bitset>
#include <tuple>
#include <assert.h>
#include <deque>
#include <bitset>
#include <iomanip>
#include <limits>
#include <chrono>
#include <random>
#include <array>
#include <unordered_map>
#include <functional>
#include <complex>
#include <numeric>
#include <cctype>


template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }
//constexpr long long MAX = 5100000;
constexpr long long INF = 1LL << 60;
constexpr int inf = 1000000007;
constexpr long long mod = 1000000007LL;
//constexpr long long mod = 998244353LL;
const long double PI = acos((long double)(-1));

using namespace std;
typedef unsigned long long ull;
typedef long long ll;
typedef long double ld;

pair<vector<string>, vector<string>> f(string& t) {
	string s;
	bool b = false;
	vector<string> res1, res2;
	for (int i = 0; i < t.size(); i++) {
		if (b) {
			if (t[i] == '"') {
				res2.emplace_back(s);
				b = false;
				s.clear();
			}
			else {
				s += t[i];
			}
		}
		else {
			if (t[i] == '"') {
				res1.emplace_back(s);
				b = true;
				s.clear();
			}
			else {
				s += t[i];
			}
		}
	}
	if (!s.empty()) res1.emplace_back(s);
	return { res1,res2 };
}

void solve() {
	string s; cin >> s; if (s == ".") exit(0);
	string t; cin >> t;
	if (s == t) {
		cout << "IDENTICAL" << "\n";
		return;
	}
	auto p = f(s);
	auto q = f(t);
	if (p.first != q.first or p.second.size() != q.second.size()) {
		cout << "DIFFERENT" << "\n";
		return;
	}
	int cnt = 0;
	for (int i = 0; i < p.second.size(); i++) {
		cnt += p.second[i] != q.second[i];
	}
	if (cnt == 1) {
		cout << "CLOSE" << "\n";
	}
	else {
		cout << "DIFFERENT" << "\n";
	}
}

int main()
{
	/*
	cin.tie(nullptr);
	ios::sync_with_stdio(false);
	*/
	int kkt = 89;
	while (kkt) {
		solve();
	}

}

C++: #include <iostream>
#include <algorithm>
#include <string>
using namespace std;
string s1, s2;

int main() {


  while (1) {
    int count = 0;
    int n1 = 0;
    int n2 = 0;
    int error = 0;

    cin >> s1 >> s2;
    if(s1 == '.')
      break;

    if(s1 == s2) {
      cout << "IDENTICAL" << endl;
      break;
    }
    else if(s1[n1] != s2[n2]) {
      cout << "DIFFERENT" << endl;
      break
    }

    while() {
      if(s1[n1] == '"' && = s2[n2] == '"') {
        while() {
          if (s1[n1] != s2[n2]) count++;
          if(s1[n1] != '"') n1++;
          if(s2[n2] != '"') n2++;
          if (s1[n1] == '"' && = s2[n2] == '"') {
            if(count > 0) error++;
            break;
          }
        }
      }
      if(s1[n1] != last) n1++;
      if(s2[n2] != last) n2++;
      if(s1[n1] == last && s2[n2] == last)  {
        if (error >= 2 )
          cout << "DIFFERENT" << endl;
        else
          cout << "CLOSE" << endl;
      }
    }

  return 0;
}

C++: #include<iostream>
#include<sstream>
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 <iostream>
#include <string>
using namespace std;
int main(){while(true){
	string s1;
	cin>>s1;
	if(s1==".")
		return 0;
	string s2;
	cin>>s2;
	if(s1==s2){
		cout<<"IDENTICAL"<<endl;
		continue;
	}
	string t1=s1;
	string t2=s2;
	while(true){
		size_t d1b=t1.find('\"');	//d1_begin
		if(d1b==string::npos)
			break;
		t1.replace(d1b,1,"@");

		size_t d1e=t1.find('\"');	//d1_end
		t1.replace(d1e,1,"@");

		size_t d2b=t2.find('\"');	//d2_begin
		if(d2b==string::npos)
			break;
		t2.replace(d2b,1,"@");

		size_t d2e = t2.find('\"');	//d2_end
		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;
	}
}}