This documentation is automatically generated by online-judge-tools/verification-helper
#define PROBLEM "http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=1617&lang=jp"
#include "../memo/macro.hpp"
#include "../string/string_split.cpp"
int main(void) {
while(1) {
string s, t;
cin >> s;
if(s == ".") break;
cin >> t;
if(s == t) {
cout << "IDENTICAL\n";
continue;
}
auto vs = split(s, '\"'), vt = split(t, '\"');
if(vs.size() != vt.size()) {
cout << "DIFFERENT\n";
continue;
}
ll cnt = 0;
bool diff = false;
const ll sz = vs.size();
REP(i, sz) {
if(i%2==0) {
if(vs[i] != vt[i]) {
diff = true;
break;
}
} else if(vs[i] != vt[i]) {
cnt++;
}
}
if(cnt > 1) diff = true;
if(diff) cout << "DIFFERENT\n";
else cout << "CLOSE\n";
}
return 0;
}
#line 1 "test/aoj1617.test.cpp"
#define PROBLEM "http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=1617&lang=jp"
#line 1 "memo/macro.hpp"
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using PII = pair<ll, ll>;
#define FOR(i, a, n) for (ll i = (ll)a; i < (ll)n; ++i)
#define REP(i, n) FOR(i, 0, n)
#define ALL(x) x.begin(), x.end()
template<typename T> void chmin(T &a, const T &b) { a = min(a, b); }
template<typename T> void chmax(T &a, const T &b) { a = max(a, b); }
struct FastIO {FastIO() { cin.tie(0); ios::sync_with_stdio(0); }}fastiofastio;
const ll INF = 1LL<<60;
#line 1 "string/string_split.cpp"
// BEGIN CUT
// sepで区切る
vector<string> split(const string &str, char sep) {
vector<string> v;
auto first = str.begin();
while( first != str.end() ) {
auto last = first;
while( last != str.end() && *last != sep ) ++last;
v.push_back(std::string(first, last));
if( last != str.end() ) ++last;
first = last;
}
return v;
}
// END CUT
#line 4 "test/aoj1617.test.cpp"
int main(void) {
while(1) {
string s, t;
cin >> s;
if(s == ".") break;
cin >> t;
if(s == t) {
cout << "IDENTICAL\n";
continue;
}
auto vs = split(s, '\"'), vt = split(t, '\"');
if(vs.size() != vt.size()) {
cout << "DIFFERENT\n";
continue;
}
ll cnt = 0;
bool diff = false;
const ll sz = vs.size();
REP(i, sz) {
if(i%2==0) {
if(vs[i] != vt[i]) {
diff = true;
break;
}
} else if(vs[i] != vt[i]) {
cnt++;
}
}
if(cnt > 1) diff = true;
if(diff) cout << "DIFFERENT\n";
else cout << "CLOSE\n";
}
return 0;
}