func_code_string: #include <bits/stdc++.h>   using namespace std;   string second[100];   int x[100], y[100];   vector<int> a, b;   bool u[100][100];   bool uu[100][100];   bool ux[100], uy[100];   int n, m;   void dfs(int x, int y) {     ux[x] = uy[y] = true;     u[x][y] = true;     for (int i = 0; i < n; i++)       if (second[i][y] ==  #  && !u[i][y]) dfs(i, y);     for (int j = 0; j < m; j++)       if (second[x][j] ==  #  && !u[x][j]) dfs(x, j);   }   int main() {     cin >> n >> m;     for (int i = 0; i < n; i++) cin >> second[i];     for (int i = 0; i < n; i++)       for (int j = 0; j < m; j++)         if (second[i][j] ==  #  && !u[i][j]) {           for (int i = 0; i < n; i++) ux[i] = false;           for (int i = 0; i < m; i++) uy[i] = false;           dfs(i, j);           a.clear();           b.clear();           for (int i = 0; i < n; i++)             if (ux[i]) a.push_back(i);           for (int j = 0; j < m; j++)             if (uy[j]) b.push_back(j);           for (int i = 0; i < n; i++)             for (int j = 0; j < m; j++) uu[i][j] = false;           for (int i = 0; i < a.size(); i++)             for (int j = 0; j < b.size(); j++) {               uu[a[i]][b[j]] = true;             }           for (int i = 0; i < n; i++)             for (int j = 0; j < m; j++) {               if (ux[i] && second[i][j] ==  #  && !uu[i][j]) {                 cout <<  No ;                 return 0;               }               if (second[i][j] ==  .  && uu[i][j]) {                 cout <<  No ;                 return 0;               }             }         }     cout <<  Yes ;     return 0;   }   