#include //#include //#include using namespace std; void ans(int p,char a,char b) { printf("%d\n",p); printf("\"%c\"\n",a); printf("\"%c\"\n",b); } int main() { int p = 0; string line1,line2,line3; for (int j=0;j<2;++j) { getline(cin,line1); getline(cin,line2); getline(cin,line3); int n = line1.size() + 1; if (line2[0] != '/') { ans(p + n,'/',line2[0]); return 0; } if (line2[1] != '/') { ans(p + n + 1,'/',line2[1]); return 0; } if (line3[0] != '/') { ans(p + n + 2 + n,'/',line3[0]); return 0; } if (line3[1] != '/') { ans(p + n + 2 + n + 1,'/',line3[1]); return 0; } for (int i = 0; i < (int)line1.size(); ++i) { if (line1[i] == line2[i+2] && line1[i] != line3[i+2]) { ans(p + n + 2 + n + 2 + i,line1[i],line3[i+2]); return 0; } else if (line1[i] == line3[i+2] && line1[i] != line2[i+2]) { ans(p + n + 2 + i,line1[i],line2[i+2]); return 0; } else if (line2[i+2] == line3[i+2] && line1[i] != line2[i+2]) { ans(p + i,line2[i+2],line1[i]); return 0; } } p += n + 2 + n + 2 + n; } } //using namespace std; void ans(int p,char a,char b) { printf("%d\n",p); printf("\"%c\"\n",a); printf("\"%c\"\n",b); } int main() { int p = 0; string line1,line2,line3; for (int j=0;j<2;++j) { getline(cin,line1); getline(cin,line2); getline(cin,line3); int n = line1.size() + 1; if (line2[0] != '/') { ans(p + n,'/',line2[0]); return 0; } if (line2[1] != '/') { ans(p + n + 1,'/',line2[1]); return 0; } if (line3[0] != '/') { ans(p + n + 2 + n,'/',line3[0]); return 0; } if (line3[1] != '/') { ans(p + n + 2 + n + 1,'/',line3[1]); return 0; } for (int i = 0; i < (int)line1.size(); ++i) { if (line1[i] == line2[i+2] && line1[i] != line3[i+2]) { ans(p + n + 2 + n + 2 + i,line1[i],line3[i+2]); return 0; } else if (line1[i] == line3[i+2] && line1[i] != line2[i+2]) { ans(p + n + 2 + i,line1[i],line2[i+2]); return 0; } else if (line2[i+2] == line3[i+2] && line1[i] != line2[i+2]) { ans(p + i,line2[i+2],line1[i]); return 0; } } p += n + 2 + n + 2 + n; } } //using namespace std; void ans(int p,char a,char b) { printf("%d\n",p); printf("\"%c\"\n",a); printf("\"%c\"\n",b); } int main() { int p = 0; string line1,line2,line3; for (int j=0;j<2;++j) { getline(cin,line1); getline(cin,line2); getline(cin,line3); int n = line1.size() + 1; if (line2[0] != '/') { ans(p + n,'/',line2[0]); return 0; } if (line2[1] != '/') { ans(p + n + 1,'/',line2[1]); return 0; } if (line3[0] != '/') { ans(p + n + 2 + n,'/',line3[0]); return 0; } if (line3[1] != '/') { ans(p + n + 2 + n + 1,'/',line3[1]); return 0; } for (int i = 0; i < (int)line1.size(); ++i) { if (line1[i] == line2[i+2] && line1[i] != line3[i+2]) { ans(p + n + 2 + n + 2 + i,line1[i],line3[i+2]); return 0; } else if (line1[i] == line3[i+2] && line1[i] != line2[i+2]) { ans(p + n + 2 + i,line1[i],line2[i+2]); return 0; } else if (line2[i+2] == line3[i+2] && line1[i] != line2[i+2]) { ans(p + i,line2[i+2],line1[i]); return 0; } } p += n + 2 + n + 2 + n; } }