#include <bits/stdc++.h>   using namespace std;   #pragma comment(linker,  /STACK:1024000000,1024000000 )   const double pi = 2.0 * asin(1.0), eps = 1e-12;   const int maxn = 2100, maxm = 1100000, inf = 0x3f3f3f3f;   char ch[maxn][maxn];   int ans[maxn];   int main() {     int n, m, i, j, l, x;     while (scanf( %d%d%d , &n, &m, &l) == 3) {       memset(ans, 0, sizeof(ans));       for (i = 0; i < n; i++) {         scanf( %s , ch[i]);         for (j = 0; j < m; j++) {           if (ch[i][j] ==  U ) {             if (i % 2 == 0) ans[j]++;           } else if (ch[i][j] ==  L ) {             x = j - i;             if (x >= 0) ans[x]++;           } else if (ch[i][j] ==  R ) {             x = j + i;             if (x < m) ans[x]++;           }         }       }       for (i = 0; i < m; i++) {         if (i != 0) printf(   );         printf( %d , ans[i]);       }       printf(  n );     }     return 0;   }   