#include <bits/stdc++.h>
using namespace std;
long long br[1000009], i, j, k, l, m, n, sum, cnt, num, cr[1000009];
char ar[4000][4000];
int main() {
  scanf("%lld %lld %lld", &n, &m, &cnt);
  for (i = 0; i < n; i++) {
    scanf("%s", &ar[i]);
  }
  for (j = 0; j < m; j++) {
    for (i = 2; i < n; i = i + 2) {
      {
        if (ar[i][j] == 'U') cr[j]++;
      }
    }
  }
  for (i = 1; i < n; i++) {
    for (j = 0; j < m; j++) {
      if (ar[i][j] == 'L') {
        if (j - i >= 0) cr[j - i]++;
      } else if (ar[i][j] == 'R')
        if (j + i < m) cr[j + i]++;
    }
  }
  for (i = 0; i < m; i++) printf("%lld ", cr[i]);
  return 0;
}
