func_code_string: #include <bits/stdc++.h>   using namespace std;   bool ispos(long long x, long long y, long long n, long long m) {     if (x < 0 or x >= n or y < 0 or y >= m)       return false;     else       return true;   }   signed solve() {     long long n, m;     cin >> n >> m;     string s[n];     for (long long i = 0; i < n; i++) cin >> s[i];     char a[n][m];     vector<pair<pair<long long, long long>, long long>> v;     for (long long i = 0; i < n; i++) {       for (long long j = 0; j < m; j++) a[i][j] =  . ;     }     for (long long i = 0; i < n; i++) {       for (long long j = 0; j < m; j++) {         long long sz = 0;         if (s[i][j] ==  * ) {           for (long long k = 1; k <= max(n, m); k++) {             if (ispos(i - k, j, n, m) and s[i - k][j] ==  *  and                 ispos(i, j - k, n, m) and s[i][j - k] ==  *  and                 ispos(i + k, j, n, m) and s[i + k][j] ==  *  and                 ispos(i, j + k, n, m) and s[i][j + k] ==  * ) {               sz++;             } else               break;           }         }         if (sz > 0) {           a[i][j] =  * ;           v.push_back({{i + 1, j + 1}, sz});           for (long long k = 1; k <= sz; k++) {             a[i - k][j] =  * ;             a[i + k][j] =  * ;             a[i][j - k] =  * ;             a[i][j + k] =  * ;           }         }       }     }     for (long long i = 0; i < n; i++) {       for (long long j = 0; j < m; j++) {         if (s[i][j] != a[i][j]) {           cout <<  -1                 <<   n ;           return 0;         }       }     }     cout << v.size() <<   n ;     for (long long i = 0; i < v.size(); i++) {       cout << v[i].first.first <<     << v[i].first.second <<     << v[i].second            <<   n ;     }   }   signed main() {     ios_base::sync_with_stdio(false);     cin.tie(0);     cout.tie(0);     long long tests = 1;     while (tests--) {       solve();     }   }   