func_code_string: #include <bits/stdc++.h>   using namespace std;   int n, m, k;   char s[504][504];   int vis[504][504];   vector<pair<char, pair<int, int> > > v;   vector<pair<int, int> > ord;   int dx[] = {1, 0, -1, 0};   int dy[] = {0, 1, 0, -1};   void dfs(int x, int y) {     ord.push_back(make_pair(x, y));     for (int i = 0; i < 4; i++)       if (x + dx[i] < n and y + dy[i] < m and x + dx[i] >= 0 and           y + dy[i] >= 0 and s[x + dx[i]][y + dy[i]] !=  #  and           !vis[x + dx[i]][y + dy[i]]) {         vis[x + dx[i]][y + dy[i]] = 1;         dfs(x + dx[i], y + dy[i]);       }   }   int main() {     scanf( %d%d%d , &n, &m, &k);     for (int i = 0; i < n; i++) scanf( %s , &s[i]);     for (int i = 0; i < n; i++)       for (int j = 0; j < m; j++)         if (s[i][j] ==  . ) v.push_back(make_pair( B , make_pair(i, j)));     for (int i = 0; i < n; i++)       for (int j = 0; j < m; j++)         if (!vis[i][j] and s[i][j] !=  # ) {           ord.clear();           vis[i][j] = 1;           dfs(i, j);           for (int k = ord.size() - 1; k >= 1; k--) {             v.push_back(make_pair( D , ord[k]));             v.push_back(make_pair( R , ord[k]));           }         }     printf( %d n , v.size());     for (int i = 0; i < v.size(); i++)       printf( %c %d %d n , v[i].first, v[i].second.first + 1,              v[i].second.second + 1);     return 0;   }   