#include <bits/stdc++.h>
using namespace std;
char a[2010][2010];
int main() {
  int N, M, K, ans;
  while (scanf("%d%d%d", &N, &M, &K) != EOF) {
    for (int i = 0; i < N; i++) scanf("%s", a[i]);
    for (int j = 0; j < M; j++) {
      ans = 0;
      for (int i = 1; i < N; i++) {
        if (j - i >= 0 && a[i][j - i] == 'R') ans++;
        if (i + i < N && a[2 * i][j] == 'U') ans++;
        if (j + i < M && a[i][j + i] == 'L') ans++;
      }
      if (j != 0) printf(" ");
      printf("%d", ans);
    }
    cout << endl;
  }
  return 0;
}
