#include <bits/stdc++.h>
using namespace std;
const int maxn = 2007;
char a[maxn][maxn];
int n, m, k;
int calc(int col) {
  int res = 0;
  for (int i = 3; i <= n; i += 2)
    if (a[i][col] == 'U') ++res;
  int i = 2, j = col - 1;
  while (i <= n && j >= 1) {
    if (a[i][j] == 'R') ++res;
    ++i;
    --j;
  }
  i = 2;
  j = col + 1;
  while (i <= n && j <= m) {
    if (a[i][j] == 'L') ++res;
    ++i;
    ++j;
  }
  return res;
}
int main() {
  scanf("%d%d%d", &n, &m, &k);
  for (int i = 1, _c = n; i <= _c; i++) scanf("%s", a[i] + 1);
  for (int i = 1, _c = m; i <= _c; i++) printf("%d ", calc(i));
  return 0;
}
