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 <string.h>

int main() {
	while (1) {
		char s1[210];
		char s2[210];
		scanf("%s", s1);
		if (s1[0] == '.') break;
		scanf("%s", s2);
		int n1 = strlen(s1);
		int n2 = strlen(s2);
		
		if (n1 == n2) {
			bool j = true;
			for (int i = 0; i < n1; i++) {
				if (s1[i] != s2[i]) {
					j = false;
					break;
				}
			}
			if (j) {
				printf("IDENTICAL\n");
				continue;
			}
		}

		char s1str[100][210] = {};
		bool s1j[100] = {};
		char s2str[100][210] = {};
		bool s2j[100] = {};
		int a1;
		int a2;
		bool j = false;
		int a = 0;
		char z1[210];
		char z2[210];
		int z = 0;
		for (int i = 0; i < n1; i++) {
			if (s1[i] == '"') {
				
				s1j[a] = true;
				int j = 0;
				for (i++; i < n1; i++) {
					if (s1[i] != '"') {
						s1str[a][j] = s1[i];
					}
					else {
						s1str[a][j] = '\0';
						break;
					}
					j++;
				}
				a++;
				z1[z] = 'a';
				z++;
			}
			else {
				z1[z] = s1[i];
				z++;
			}
			
			a1 = a;
		}
		z1[z] = '\0';
		
		a = 0;
		z = 0;
		for (int i = 0; i < n2; i++) {
			if (s2[i] == '"') {
				
				s2j[a] = true;
				int j = 0;
				for (i++; i < n2; i++) {
					if (s2[i] != '"') {
						s2str[a][j] = s2[i];
					}
					else {
						s2str[a][j] = '\0';
						break;
					}
					j++;
				}
				a++;
				z2[z] = 'a';
				z++;
			}
			else {
				z2[z] = s2[i];
				z++;
			}
			
			a2 = a;
		}
		z2[z] = '\0';
		if (strcmp(z1, z2)) {
			printf("DIFFERENT\n");
			continue;
		}
		

		if (a1 != a2) {
			printf("DIFFERENT\n");
			continue;
		}
		else {
			int dif = 0;
			for (int i = 0; i < a1; i++) {
				if (strcmp(s1str[i], s2str[i])) {
					dif++;
				}
				if (dif >= 2) break;
			}
			if (dif >= 2) {
				printf("DIFFERENT\n");
				continue;
			}
			else {
				printf("CLOSE\n");
				continue;
			}
		}
	}
}

C++: #include <iostream>
#include <algorithm>
#include <vector>
#include <queue>
#include <stack>
#include <string>
#include <math.h>
#include <stdlib.h>
#include <string.h>

using namespace std;

// using ll = long long;
// using P = pair<int, int>;
// using minpq = priority_queue<int, vector<int>, greater<int> >;

int main() {
    while (true) {
        string s1, s2;
        cin >> s1;
        if (s1 == ".") break;
        cin >> s2;
        size_t i=0, j=0, len = s1.size(), len2 = s2.size();
        int cnt = 0;
        while (true) {
            if (s1[i] == '"' && s2[j] == '"') {
                i++; j++;
                size_t starti = i, startj = j;
                while (s1[i] != '"') i++;
                while (s2[j] != '"') j++;
                if (s1.substr(starti, i - starti) != s2.substr(startj, j - startj)) {
                    cnt++;
                    if (cnt > 1) break;
                }
            } else if (s1[i] != s2[j]) {
                cnt = 2;
                break;
            }
            i++; j++;
            if (i == len || j == len2) {
                if ((i == len) != (j == len2)) {
                    cnt = 2;
                }
                break;
            }
        }
        if (cnt == 0) {
            cout << "IDENTICAL\n";
        } else if (cnt == 1) {
            cout << "CLOSE\n";
        } else {
            cout << "DIFFERENT\n";
        }

    }
    return 0;
}

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

int main(){

  while(true){
    int wrongTime = 0;
    string str_in;
    string str_ans;
    vector <string> sub_in;
    vector <string> sub_ans;
    //input--------------------
    cin >> str_in;
    if( str_in == ".") break;
    cin>> str_ans;
    //split---------------------
    int start = 0;
    for(int i=0; i < str_in.size() ; i++){
      if(str_in[i] == '\"') {
        sub_in.push_back(str_in.substr(start,i-start));
        start = i+1;
      }
    }
    start = 0;
    for(int i=0; i < str_ans.size() ; i++){
      if(str_ans[i] == '\"') {
        sub_ans.push_back(str_ans.substr(start,i-start));
        start = i+1;
      }
    }

    if(sub_in.size() == 0) sub_in.push_back(str_in);
    if(sub_ans.size() == 0) sub_ans.push_back(str_ans);
    //split check
      // for(int i = 0; i < sub_in.size(); i++) cout << sub_in[i] << endl;
      // for(int i = 0; i < sub_ans.size(); i++) cout << sub_ans[i] << endl;
    //conpare
    if(sub_in.size() != sub_ans.size()){
      wrongTime = 2;
    }else{
      wrongTime = 0;
      for(int i = 0; i < sub_in.size(); i++){
        if(i%2 == 1){
          if(sub_in[i] != sub_ans[i]) wrongTime ++;
        }else{
          if(sub_in[i] != sub_ans[i]) wrongTime += 2;
        }
      }
    }
    if(wrongTime == 0) cout << "IDENTICAL" << endl;
    else if(wrongTime <= 1) cout << "CLOSE" << endl;
    else cout << "DIFFERENT" << endl;
    sub_in.clear();
    sub_ans.clear();
  }

  return 0;
}