func_code_string: #include <bits/stdc++.h>   using namespace std;   long long n;   void solve() {     int m;     cin >> n >> m;     vector<string> a(n);     for (int i = (0); i <= int(n - 1); i++) cin >> a[i];     if (n < 3) {       cout << -1;       return;     }     int ans = 0;     vector<vector<int>> dp(n * m, vector<int>(4, 0));     vector<vector<int>> res;     for (int i = 0; i < n; i++) {       for (int j = 0; j < m; j++) {         if (a[i][j] ==  * ) {           dp[i * m + j][0] = 1 + (i - 1 >= 0 ? dp[(i - 1) * m + j][0] : 0);         }       }     }     for (int i = n - 1; i >= 0; i--) {       for (int j = 0; j < m; j++) {         if (a[i][j] ==  * ) {           dp[i * m + j][1] = 1 + (i + 1 < n ? dp[(i + 1) * m + j][1] : 0);         }       }     }     for (int i = 0; i < m; i++) {       for (int j = 0; j < n; j++) {         if (a[j][i] ==  * ) {           dp[j * m + i][2] = 1 + (i - 1 >= 0 ? dp[(j)*m + i - 1][2] : 0);         }       }     }     for (int i = m - 1; i >= 0; i--) {       for (int j = 0; j < n; j++) {         if (a[j][i] ==  * ) {           dp[j * m + i][3] = 1 + (i + 1 < m ? dp[(j)*m + i + 1][3] : 0);         }       }     }     for (int i = 0; i < n; i++) {       for (int j = 0; j < m; j++) {         int idx = i * m + j;         int mini = min({dp[idx][0], dp[idx][1], dp[idx][2], dp[idx][3]});         if (mini >= 2) {           mini--;           for (int k = i - mini; k <= i + mini; k++) {             a[k][j] =  . ;           }           for (int k = j - mini; k <= j + mini; k++) {             a[i][k] =  . ;           }           res.push_back({i + 1, j + 1, mini});         }       }     }     for (int i = 0; i < n; i++) {       for (int j = 0; j < m; j++) {         if (a[i][j] ==  * ) {           cout << -1;           return;         }       }     }     cout << res.size() <<   n ;     for (int i = 0; i < res.size(); i++) {       cout << res[i][0] <<     << res[i][1] <<     << res[i][2] <<   n ;     }   }   int main() {     ios_base::sync_with_stdio(false);     cin.tie(NULL);     long long t = 1;     while (t--) {       solve();     }   }   