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 <stdio.h>
#include <stdlib.h>
#include<limits.h>

int check2(char *a, char *b, int *i, int *j)
{
    int now = 0;
    for(; *i < 200 && *j < 200;)
    {
        //printf("A %c %c %d %d %d\n", a[*i], b[*j], a[*i] != b[*j], *i, *j);
        if(a[*i] != b[*j]) now = 1;
        if(a[*i] == '"' && b[*j] == '"')
        {
            return now;
        }
        if(a[*i] != '"') *i += 1;
        if(b[*j] != '"') *j += 1;
    }
}

int check(char *a, char *b, int *i, int *j)
{
    int now = 0;
    for(; *i < 200 && *j < 200;)
    {
        //printf("B %c %c %d %d %d\n", a[*i], b[*j], a[*i] != b[*j], *i, *j);
        if(a[*i] == '\0' && b[*j] == '\0') return now;
        if(a[*i] != b[*j]) return 404;
        if(a[*i] == '\"' && b[*j] == '\"') 
        {
            *i += 1;
            *j += 1;
            now += check2(a, b, i, j);
        }
        *i += 1;
        *j += 1;
    }
    return now;
}

int main()
{
    char a[201];
    char b[201];
    while(1)
    {
        scanf("%s", a);
        if(a[0] == '.' && a[1] == '\0') return 0;
        scanf("%s", b);
        int i = 0;
        int j = 0;
        int k = check(a, b, &i, &j);
        //printf("%d\n", k);
        if(k == 0) printf("IDENTICAL\n");
        else if(k == 1) printf("CLOSE\n");
        else printf("DIFFERENT\n");
    }
}

C++: #include <bits/stdc++.h>
using namespace std;
const long double PI = acos(-1);
typedef long long ll;
typedef pair<int64_t,int64_t> pll;
int dx[]={1,-1,0,0,1,-1,1,-1};
int dy[]={0,0,1,-1,1,-1,-1,1};
#define rep(i,a,b) for (int64_t i = (a); i < (b); i++)
#define REP(i,n) rep(i,0,n)
#define ALL(a) begin(a),end(a)
#define sz(s) (s).size()
#define pb push_back
//#define mp make_pair
#define fi first
#define se second

int main()
{
    string s1;string s2;
    while(getline(cin,s1))
    {
        if(s1==".")break;getline(cin,s2);
        if(s1==s2){cout<<"IDENTICAL"<<endl;continue;}
        bool flag=0;
        vector<int>c1(0);vector<int>c2(0);c1.pb(0);c2.pb(0);
        REP(i,s1.size())if(s1[i]=='\"')c1.pb(i);
        REP(i,s2.size())if(s2[i]=='\"')c2.pb(i);
        c1.pb(s1.size()-1);c2.pb(s2.size()-1);
        if(c1.size()!=c2.size()){cout<<"DIFFERENT"<<endl;continue;}
        int times=0;
        REP(i,c1.size()-1)
        {
            string t1=s1.substr(c1[i],c1[i+1]-c1[i]+1);
            string t2=s2.substr(c2[i],c2[i+1]-c2[i]+1);
            if(i%2)
            {
                if(t1!=t2)times++;
                if(times>1)break;
            }else
            {
                if(t1!=t2){times=10;break;}
            }
        }
        if(times>1)cout<<"DIFFERENT"<<endl;
        else if(times==1)cout<<"CLOSE"<<endl;
    }
}

C++: #include <bits/stdc++.h>
using namespace std;
#define rep(i,a,b) for(int i=(a);i<(b);i++)
#define rrep(i,a,b) for(int i=(b)-1;i>=(a);i--)

int main() {
	for (string s1, s2; cin >> s1&&s1 != ".";) {
		cin >> s2;
		vector<string> a1, a2;
		string b1, b2; // " ??????
		{
			bool l = false;
			string tmp = "";
			rep(i, 0, s1.size()) {
				if (l) {
					if (s1[i] == '"') {
						l = false;
						a1.push_back(tmp);
						tmp = "";
						b1 += s1[i];
						continue;
					}
					tmp += s1[i];
				}
				else {
					b1 += s1[i];
					if (s1[i] == '"') {
						l = true;
					}
				}
			}
		}
		{
			bool l = false;
			string tmp = "";
			rep(i, 0, s2.size()) {
				if (l) {
					if (s2[i] == '"') {
						l = false;
						a2.push_back(tmp);
						tmp = "";
						b2 += s2[i];
						continue;
					}
					tmp += s2[i];
				}
				else {
					b2 += s2[i];
					if (s2[i] == '"') {
						l = true;
					}
				}
			}
		}
		int cnt = 0;
		if (b1 != b2) {
			cout << "DIFFERENT" << endl;
		}
		else {
			rep(i, 0, a1.size()) {
				if (a1[i] != a2[i])
					cnt++;
			}
			if (cnt == 0) {
				cout << "IDENTICAL" << endl;
			}
			else if (cnt == 1) {
				cout << "CLOSE" << endl;
			}
			else {
				cout << "DIFFERENT" << endl;
			}
		}
	}
}