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, a, b) for(ll i = ll(a); i < ll(b); i++)
#define rer(i, a, b) for(ll i = ll(a) - 1; i >= ll(b); i--)
#define sz(v) (int)(v).size()
#define pb push_back
#define sc second
#define fr first
#define sor(v) sort(v.begin(),v.end())
#define rev(s) reverse(s.begin(),s.end())
#define lb(vec,a) lower_bound(vec.begin(),vec.end(),a)
#define ub(vec,a) upper_bound(vec.begin(),vec.end(),a)
#define uniq(vec) vec.erase(unique(vec.begin(),vec.end()),vec.end())
using namespace std;
typedef long long int ll;
typedef pair <int, int> P;

const ll MOD=1000000007;

int main() {
    ios::sync_with_stdio(false);
    cin.tie(0);
    for(;;){
        string s, t;
        cin>>s;
        if(s==".") return 0;
        cin>>t;
        int cnt=0;
        int cur=0;
        int i=0, j=0;
        while(i<s.length()&&j<t.length()){
            if(!cur){
                if(s[i]!=t[j]) break;
                else {
                    if(s[i]=='"'&&t[j]=='"'){
                        cur=1;
                    }
                    i++; j++;
                }
            }
            else{
                int x=i, y=j;
                while(s[x]!='"'){
                    x++;
                }
                while(t[y]!='"'){
                    y++;
                }
                if(s.substr(i,x-i)!=t.substr(j,y-j)) cnt++;
                i=x+1;
                j=y+1;
                cur=0;
            }
        }
        if(i==s.length()&&j==t.length()){
            if(cnt==0) cout <<"IDENTICAL"<<"\n";
            else if(cnt==1) cout <<"CLOSE"<<"\n";
            else cout <<"DIFFERENT"<<"\n";
        }
        else cout <<"DIFFERENT"<<"\n";
    }
}

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

bool check(string s1, string s2) {
    int l1 = 0, l2 = 0, diff = 0;
    while (l1 < s1.size() || l2 < s2.size()) {
        if (l1 == s1.size() || l2 == s2.size()) return false;
        if (s1[l1] != s2[l2]) return false;
        if (s1[l1] == '"') {
            l1++;
            string t1 = "";
            while (s1[l1] != '"') t1 += s1[l1++];
            l2++;
            string t2 = "";
            while (s2[l2] != '"') t2 += s2[l2++];
            l1++;
            l2++;
            if (t1 != t2) diff++;
        } else {
            l1++;
            l2++;
        }
    }
    return diff <= 1;
}

int main() {
    string s1, s2;
    while (1) {
        cin >> s1;
        if (s1 == ".") break;
        cin >> s2;
        if (s1 == s2) {
            cout << "IDENTICAL" << endl;
        } else {
            cout << (check(s1, s2) ? "CLOSE" : "DIFFERENT") << 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] = ".";
		}
		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;
        int maxnow;
        if(now1 < now2) maxnow = now2;
        else maxnow = now1;
		for(int i=0;i<maxnow;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 <algorithm>
#include <vector>
#include <string>
#define int long long
using namespace std;
signed main() {
	string s, t;
	while (cin >> s && s != ".") {
		cin >> t;
		string s_a[234], t_a[234];
		int i = 0, s_l = 0, t_l = 0;
		for (i = 0; i < s.size(); i++) {
			while (i < s.size() && s[i] != '"') {
				s_a[s_l] += s[i];
				i++;
			}
			s_l++;
		}
		for (i = 0; i < t.size(); i++) {
			while (i < t.size() && t[i] != '"') {
				t_a[t_l] += t[i];
				i++;
			}
			t_l++;
		}
		if (s_l != t_l) {
			cout << "DIFFERENT\n";
			goto heaven;
		}
		else {
			int cnt = 0;
			for (int i = 0; i < s_l; i++) {
				if (s_a[i] != t_a[i]) {
					if (i % 2 == 0) {
						cout << "DIFFERENT\n";
						goto heaven;
					}
					else cnt++;
				}
			}
			if (!cnt)cout << "IDENTICAL\n";
			else cout << (cnt == 1 ? "CLOSE\n" : "DIFFERENT\n");
		}heaven:;
	}
}