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>
using namespace std;

int main(){
    while(1){
        string s, t;
        cin >> s;
        if (s == ".") break;
        cin >> t;
        if (s == t) cout << "IDENTICAL" << endl;
        else {
            int k = (int)s.size();
            vector<string> check_s;
            bool flag = false;
            int start = 0;
            for (int i = 0; i < k; i++){
                if (flag){
                    if (s[i]=='"'){
                        flag = false;
                        check_s.push_back(s.substr(start, i - start + 1));
                        start = i + 1;
                    }
                }
                else if (s[i] == '"'){
                    check_s.push_back(s.substr(start, i - start));
                    flag = true;
                    start = i;
                }
            }
            if (start != k) check_s.push_back(s.substr(start));

            int l = (int)t.size();
            vector<string> check_t;
            flag = false;
            start = 0;
            for (int i = 0; i < l; i++){
                if (flag){
                    if (t[i]=='"'){
                        flag = false;
                        check_t.push_back(t.substr(start, i - start + 1));
                        start = i + 1;
                    }
                }
                else if (t[i] == '"'){
                    check_t.push_back(t.substr(start, i - start));
                    flag = true;
                    start = i;
                }
            }
            if (start != l) check_t.push_back(t.substr(start));

            if (check_s.size() != check_t.size()) cout << "DIFFERENT" << endl;
            else{
                int y = (int)check_s.size();
                int ans = 0;
                int cnt = 0;
                for (int i = 0; i < y; i++){
                    if (check_s[i] != check_t[i]) cnt++;
                    if (check_s[i] != check_t[i] && i % 2) ans++;
                }
                if (ans == 0 && cnt == 0) cout << "IDENTICAL" << endl;
                else if (ans == 1 && cnt == 1) cout << "CLOSE" << endl;
                else cout << "DIFFERENT" << endl;
            }
        }
    }
}

C++: #include<iostream>

int strcmp(char s1[],char s2[]){
  int i=0;
  int count = 0;
  while(s1[i] != '\0' && s2[i] !='\0'){
    if(s1[i] == '\0' || s2[i] == '\0'){
      count++;
      return count;
    }else if(s1[i] != s2[i]){
      count++;
      if(count ==2){
	return -1;
      }
    }else{
      //std::cout << s1[i] << s2[i]  << ":一致\n";
    }
    i++;
  }
  return count;
}

int main(){
  char s1[200]= {} ;
  char s2[200] = {} ;
  for(int i=0;i<100;i++){
    std::cin >> s1 ;
    if(s1[0] == '.') break;
    std::cin >> s2;
    int compare = strcmp(s1,s2);
    if(compare == 0){
      std::cout << "IDENTICAL\n";
    }else if(compare == 1){
      std::cout << "CLOSE\n";
    }else{
      std::cout << "DIFFERENT\n";
    }
  }

  return 0;
}

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

int a[1000];

int main(void)
{
  while (1) {
    string s1, s2;
    vector<string> s1double;
    vector<string> s2double;
    vector<string> s1word;
    vector<string> s2word;
    cin >> s1 >> s2;
    if (s1[0] == '.') {
      break;
    }
    string tmp = "\0", tmpp = "\0";
    for (int i = 0; i < s1.size(); ++i) {
      if (s1[i] == '"') {
	if (tmpp != "\0")
	s1word.push_back(tmpp);
	tmpp = "\0";
        int j = i + 1;
	for (; s1[j] != '"'; ++j) {
	  tmp += s1[j];
	}
	i = j;
	s1double.push_back(tmp);
	tmp = "\0";
      } else {
	tmpp += s1[i];
      }
    }
    if (tmpp != "\0")
    s1word.push_back(tmpp);
    tmp = "\0", tmpp = "\0";
    for (int i = 0; i < s2.size(); ++i) {
      if (s2[i] == '"') {
	if (tmpp != "\0")
	s2word.push_back(tmpp);
	tmpp = "\0";
        int j = i + 1;
	for (; s2[j] != '"'; ++j) {
	  tmp += s2[j];
	}
	i = j;
	s2double.push_back(tmp);
	tmp = "\0";
      } else {
	tmpp += s2[i];
      }
    }
    if (tmpp != "\0")
    s2word.push_back(tmpp);
    int flag = 0;
    if (s1word.size() != s2word.size() || s1double.size() != s2double.size()) {
      flag = 2;
    } else {
      for (int i = 0; i < s1word.size(); ++i) {
	if (s1word[i] != s2word[i]) {
	  flag = 2;
	}
      }
      for (int i = 0; i < s1double.size(); ++i) {
	if (s1double[i] != s2double[i]) {
	  ++flag;
	}
      }
    }
    if (flag == 0) {
      cout << "IDENTICAL" << endl;
    } else if (flag == 1) {
      cout << "CLOSE" << endl;
    } else {
      cout << "DIFFERENT" << endl; 
    }
  }
  return 0;
}

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

using namespace std;

int main(){

  string s1,s2;
  bool t = false;

  while(1){
	int cnt = 0;
	cin>>s1;

	if(s1==".")
	  break;

	cin>>s2;

	if(s1==s2){
	  cout<<"IDENTICAL"<<endl;
	  continue;
	}

	else{
	  int i=0;
	  int j=0;
	  t = false;
	  
	  while(1){

		if(s1[i]=='\0' &&  s2[j]=='\0')
		  break;
		
		if(s1[i]!=s2[j]){
		  cout<<"DIFFERENT"<<endl;
		  t = true;
		  break;
		}
		
		if(s1[i]=='\"' && s2[j]=='\"'){
		  i++;
		  j++;
		  
		  while(1){
			if(s1[i]=='\"' && s2[j]=='\"')
			  break;
			
			if(s1[i]!=s2[j]){
			  cnt++;
			  while(s1[i]!='\"')
				i++;
			  while(s2[j]!='\"')
				j++;
			  break;
			}
			i++;
			j++;
		  } 
		}
		  i++;
		  j++;
	  }
	  if(t == true)
		continue;
	}
	if(cnt == 1)
	  cout<<"CLOSE"<<endl;
	else
	  cout<<"DEFFERENT"<<endl;
  }
}