#include <bits/stdc++.h>
char a[4020][2010];
long b[2010];
int main() {
  int i, j, t, n, m;
  long k;
  while (scanf("%d%d%ld", &n, &m, &k) != EOF) {
    memset(b, 0, sizeof(b));
    for (i = 0; i < n; i++) scanf("%s", a[i]);
    for (t = 0; t < n; t++) {
      for (j = 0; j < m; j++) {
        if (a[t + t][j] == 'U' && t + t <= n - 1) b[j]++;
        if (a[t][j + t] == 'L' && j + t <= m - 1) b[j]++;
        if (a[t][j - t] == 'R' && j - t >= 0) b[j]++;
      }
    }
    printf("%ld", b[0]);
    for (j = 1; j < m; j++) printf("% ld", b[j]);
    printf("\n");
  }
}
