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,n) for(int i=0;i<(int)n;i++)
#define all(c) (c).begin(),(c).end()
#define pb push_back
#define dbg(...) do{cerr<<__LINE__<<": ";dbgprint(#__VA_ARGS__, __VA_ARGS__);}while(0);

using namespace std;

namespace std{template<class S,class T>struct hash<pair<S,T>>{size_t operator()(const pair<S,T>&p)const{return ((size_t)1e9+7)*hash<S>()(p.first)+hash<T>()(p.second);}};template<class T>struct hash<vector<T>>{size_t operator()(const vector<T> &v)const{size_t h=0;for(auto i : v)h=h*((size_t)1e9+7)+hash<T>()(i)+1;return h;}};}
template<class T>ostream& operator<<(ostream &os, const vector<T> &v){os<<"[ ";rep(i,v.size())os<<v[i]<<(i==v.size()-1?" ]":", ");return os;}template<class T>ostream& operator<<(ostream &os,const set<T> &v){os<<"{ "; for(const auto &i:v)os<<i<<", ";return os<<"}";}
template<class T,class U>ostream& operator<<(ostream &os,const map<T,U> &v){os<<"{";for(const auto &i:v)os<<" "<<i.first<<": "<<i.second<<",";return os<<"}";}template<class T,class U>ostream& operator<<(ostream &os,const pair<T,U> &p){return os<<"("<<p.first<<", "<<p.second<<")";}
void dbgprint(const string &fmt){cerr<<endl;}template<class H,class... T>void dbgprint(const string &fmt,const H &h,const T&... r){cerr<<fmt.substr(0,fmt.find(","))<<"= "<<h<<" ";dbgprint(fmt.substr(fmt.find(",")+1),r...);}
typedef long long ll;typedef vector<int> vi;typedef pair<int,int> pi;const int inf = (int)1e9;const double INF = 1e12, EPS = 1e-9;

int main(){
	cin.tie(0); cin.sync_with_stdio(0);
	
	string s, t;
	while(cin >> s >> t, s != "."){
		if(s == t){
			cout << "IDENTICAL" << endl;
			continue;
		}
		auto split = [](string s, char d){
			vector<string> ans;
			int p, cnt = 0;
			while((p = s.find(d)) != s.npos){
				ans.pb(s.substr(0, p));
				s = s.substr(p + 1);
			}
			if(s.size()) ans.pb(s);
			return ans;
		};
		vector<string> sv = split(s, '\"');
		vector<string> st = split(t, '\"');
		
		if(sv.size() == st.size()){
			int even = 0, odd = 0;
			rep(i, sv.size()) if(sv[i] != st[i]){
				if(i % 2) odd++;
				else even++;
			}
			if(odd == 1 && even == 0){
				cout << "CLOSE" << endl;
				continue;
			}
		}
		cout << "DIFFERENT" << endl;
	}
	
	return 0;
}

C++: #define  _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
#include <algorithm>
#include <utility>
#include <functional>
#include <cstring>
#include <queue>
#include <stack>
#include <math.h>
#include <iterator>
#include <vector>
#include <string>
#include <set>
#include <math.h>
#include <iostream> 
#include <random>
#include<map>
#include <iomanip>
#include <time.h>
#include <stdlib.h>
#include <list>
#include <typeinfo>
#include <list>
#include <set>
#include <cassert>
#include<fstream>
#include <unordered_map>  
using namespace std;
#define Ma_PI 3.141592653589793
#define eps 0.00000000000000000000000001
#define LONG_INF 10000000000000000
#define GOLD 1.61803398874989484820458
#define MAX_MOD 1000000007
#define REP(i,n) for(long long i = 0;i < n;++i)
int main() {
	while (true) {
		string a, b;
		cin >> a;
		if (a == ".") return 0;
		cin >> b;
		int ok = 1;
		vector<string> gogo[2][2];
		string now = "";
		int bad = 0;
		for (int i = 0; i < a.length(); ++i) {
			if (a[i] == '"') {
				gogo[0][bad].push_back(now);
				now = "";
				bad = (bad + 1) % 2;
			}
			else {
				now.push_back(a[i]);
			}
		}
		gogo[0][bad].push_back(now);
		now = "";
		for (int i = 0; i < b.length(); ++i) {
			if (b[i] == '"') {
				gogo[1][bad].push_back(now);
				now = "";
				bad = (bad + 1) % 2;
			}
			else {
				now.push_back(b[i]);
			}
		}
		gogo[1][bad].push_back(now);
		if (gogo[0][0] != gogo[1][0]||gogo[0][1].size() != gogo[1][1].size()) {
			cout << "DIFFERENT" << endl;
			continue;
		}
		int choice = 0;
		for (int q = 0; q < gogo[1][1].size(); ++q) {
			if (gogo[0][1][q] != gogo[1][1][q]) choice++;
		}
		if (choice == 0) {
			cout << "IDENTICAL" << endl;
		}
		else if (choice == 1) {
			cout << "CLOSE" << endl;
		}
		else cout << "DIFFERENT" << endl;
	}
}

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

int main(void){
    
    string p = "\"";
    string s1,s2;
    string a[300]={},b[300]={};
    int i=0,n,m,x=0,y=0;
    int count = 0;
    
    while(1){
        
        cin >> s1;
        if(s1 == ".") break;
        n = s1.size();
        
        cin >> s2;
        if(s2 == ".") break;
        m = s2.size();
        x=0;
        y=0;
        count = 0;
        
        for(i=0;i<300;i++){
            a[i] = "";
            b[i] = "";
        }
        
        for(i=0;i<n;i++){
            a[x].push_back(s1[i]);
            if(s1[i] == p[0]) x++;
            
        }
        
        for(i=0;i<m;i++){
            b[y].push_back(s2[i]);
            if(s2[i] == p[0]) y++;
        }
        
        if(x != y) {
            count = 2;;
        }
        

        for(i=0; i<x+1;i++){
    
            if( a[i] != b[i] ){
                if( i % 2 == 1) {
                    count += 1;
                }
                
                else count += 2;
                
            }
            
            if(count >1) break;
        }
        if ( count == 0 ) cout << "IDENTICAL" << endl;
        else if (count == 1) cout << "CLOSE" << endl;
        else cout << "DIFFERENT" << endl;
        
        
    }
    
    
   return 0;
}