#include <bits/stdc++.h>
using namespace std;
int n, m, k;
int a[2001];
char t;
int main() {
  scanf("%d%d%d\n", &n, &m, &k);
  for (int i = 1; i <= m; i++) a[i] = 0;
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= m; j++) {
      scanf("%c", &t);
      if ((t == 'U') and (i > 2) and (i % 2 == 1)) a[j]++;
      if ((t == 'R') and (i - 1 + j <= m)) a[j + i - 1]++;
      if ((t == 'L') and (j - i + 1 > 0)) a[j - i + 1]++;
    }
    scanf("\n");
  }
  for (int i = 1; i <= m; i++) printf("%d%c", a[i], ' ');
  return 0;
}
