#include <bits/stdc++.h>   using namespace std;   #pragma comment(linker,  /STACK:200000000 )   const double EPS = 1E-9;   const int INF = 1000000000;   const long long INF64 = (long long)1E18;   const double PI = 3.1415926535897932384626433832795;   char s[2100][2100];   int ans[2100];   int main() {     int n, m, k;     scanf( %d%d%d n , &n, &m, &k);     for (int i = 0; i < (int)(n); i++) gets(s[i]);     for (int i = 0; i < (int)(n); i++)       for (int j = 0; j < (int)(m); j++) {         if (s[i][j] ==  .  || s[i][j] ==  D ) continue;         if (s[i][j] ==  U ) {           if (i % 2 == 1) continue;           ans[j]++;           continue;         }         int nj;         if (s[i][j] ==  L )           nj = j - i;         else           nj = j + i;         if (0 <= nj && nj < m) ans[nj]++;       }     for (int i = 0; i < (int)(m); i++) printf(i ?   %d  :  %d , ans[i]);     puts(  );     return 0;   }   