#include <bits/stdc++.h>
using namespace std;
int n, m, k, res[2020] = {0};
string s[2020];
int main() {
  cin >> n >> m >> k;
  for (int i = 0; i < n; i++) cin >> s[i];
  for (int i = 1; i < n; i++)
    for (int j = 0; j < m; j++) {
      if (j - i >= 0 && s[i][j - i] == 'R') res[j]++;
      if (j + i < m && s[i][j + i] == 'L') res[j]++;
      if (i + i < n && s[i + i][j] == 'U') res[j]++;
    }
  for (int i = 0; i < m; i++) cout << res[i] << " ";
}
