#include #include using namespace atcoder; using mint = modint998244353; using namespace std; #define rep(i,n) for (int i = 0; i < (n); ++i) #define Inf 1000000000 int main() { vector s(3); rep(i,3)cin>>s[i]; rep(i,3){ rep(j,3){ if(i!=2){ if(s[i][j]==s[i+1][j]){ cout<<"No"<