#include <bits/stdc++.h>
using namespace std;
int n, m, p;
int main() {
  while (cin >> n >> m >> p) {
    string line;
    bool a = true;
    int ans[m];
    memset(ans, 0, sizeof(ans));
    for (int i = 0; i < n; ++i) {
      getline(cin, line);
      if (i == 0) {
        if (a) {
          i--;
          a = false;
        }
        continue;
      }
      for (int j = 0; j < m; ++j) {
        if (line[j] == '.') continue;
        if (line[j] == 'R') {
          if (i + j >= m) continue;
          ans[j + i]++;
        }
        if (line[j] == 'L') {
          if (j - i < 0) continue;
          ans[j - i]++;
        }
        if (line[j] == 'U') {
          if (i % 2 == 0) ans[j]++;
        }
      }
    }
    for (int i = 0; i < m; ++i) {
      printf("%d ", ans[i]);
    }
    cout << endl;
  }
  return 0;
}
