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 <vector>
#include <math.h>
using namespace std;
typedef long long ll;

int main(void){
    while (1) {
        string s, t;
        cin >> s;
        if (s == ".") return 0;
        cin >> t;
        
        if (s == t) cout << "IDENTICAL" << endl;
        else {
            int s_idx = 0, t_idx = 0, diff = 0;
            while (s_idx < s.size()) {
                if (s[s_idx] != t[t_idx] || t_idx == t.size()) {
                    diff = -1;
                    cout << "DIFFERENT" << endl;
                    break;
                }
                else if (char(s[s_idx]) == '"') {
                    string a, b;
                    s_idx++;  t_idx++;
                    while (char(s[s_idx]) != '"') {
                        a += s[s_idx];
                        s_idx++;
                    }
                    while (char(t[t_idx]) != '"') {
                        b += t[t_idx];
                        t_idx++;
                    }
                    if (a != b) diff++;
                }
                s_idx++;  t_idx++;
            }
            if (diff == 1 && t_idx == t.size()) cout << "CLOSE" << endl;
            else if (diff != -1) cout << "DIFFERENT" << endl;
        }
        
    }
    
    
    
}

C++: #include <fstream>
#include <iostream>
#include <string>
#include <tuple>
#include <vector>

using namespace std;

int main()
{
    while (true) {
        string s1;
        cin >> s1;
        if (s1 == ".") {
            break;
        }
        string s2;
        cin >> s2;
        auto parse = [](const string& s) {
            vector<string> vc;
            vector<string> vo;
            bool inStringConstant{false};
            string b;
            for (auto&& c : s) {
                if (c == '"') {
                    if (inStringConstant) {
                        inStringConstant = false;
                        vc.push_back(b);
                    }
                    else {
                        inStringConstant = true;
                        vo.push_back(b);
                    }
                    b = "";
                }
                else {
                    b += c;
                }
            }
            if (!b.empty()) {
                vo.push_back(b);
            }
            return make_tuple(vo, vc);
        };

        vector<string> s1o;
        vector<string> s1c;
        vector<string> s2o;
        vector<string> s2c;
        tie(s1o, s1c) = parse(s1);
        tie(s2o, s2c) = parse(s2);

        if (s1c.size() != s2c.size() || s1o.size() != s2o.size()) {
            cout << "DIFFERENT" << endl;
            continue;
        }
        bool b{false};
        for (size_t i = 0; i < s1o.size(); ++i) {
            if (s1o[i] != s2o[i]) {
                cout << "DIFFERENT" << endl;
                b = true;
                break;
            }
        }
        if (b) {
            continue;
        }

        int count{0};
        for (size_t i = 0; i < s1c.size(); ++i) {
            if (s1c[i] != s2c[i]) {
                ++count;
            }
        }

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

C++: #include <bits/stdc++.h>

using namespace std;
using ll = long long;

vector<string> split(string s) {
  vector<string> ret;
  int bef = 0;
  for (int i = 0; i < s.size(); i++) {
    if (s[i] == '"') {
      ret.push_back(s.substr(bef, i - bef + 1));
      bef = i + 1;
    }
  }
  if (bef < s.size())
    ret.push_back(s.substr(bef));
  return ret;
}

int main() {
  while (true) {
    string s, t;
    cin >> s;
    if (s == ".")
      break;
    cin >> t;
    if (s == t) {
      cout << "IDENTICAL" << endl;
      continue;
    }
    char *p;
    vector<string> ss = split(s), tt = split(t);
    int c = 0;
    if (ss.size() == tt.size()) {
      for (int j = 0; j < ss.size(); j++) {
        if (ss[j] != tt[j]) {
          if (j % 2 == 1)
            c++;
          else
            c += 2;
        }
      }
    } else {
      c = 100;
    }
    if (c == 1) {
      cout << "CLOSE" << endl;
    } else {
      cout << "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;
		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";
	}
}