#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m, k;
  cin >> n >> m >> k;
  if (n > 1 && n <= 2000 && m > 1 && m <= 2000 && k >= 0 && k <= m * (n - 1)) {
    char *park = new char[n * m];
    int *ans = new int[m];
    for (int i = 0; i < m; i++) {
      ans[i] = 0;
    }
    for (int r = 0; r < n; r++) {
      for (int c = 0; c < m; c++) {
        cin >> park[r * m + c];
        if (park[r * m + c] == 'U' && r % 2 == 0)
          ans[c]++;
        else if (park[r * m + c] == 'R') {
          if ((r + c) < m) ans[r + c]++;
        } else if (park[r * m + c] == 'L')
          if ((c - r) >= 0) ans[c - r]++;
      }
    }
    for (int i = 0; i < m; i++) {
      cout << ans[i] << " ";
    }
  }
  return 0;
}
