#include <bits/stdc++.h>
using namespace std;
const int N = 2010;
int n, m, k;
int co[N];
char s[N];
int main() {
  ios::sync_with_stdio(0);
  cin >> n >> m >> k;
  for (int i = 1; i <= n; ++i) {
    cin >> s;
    for (int j = 0; j < m; ++j) {
      if (s[j] == 'L')
        if (j - i + 1 >= 0) co[j - i + 1]++;
      if (s[j] == 'R')
        if (j + i - 1 < m) co[j + i - 1]++;
      if (s[j] == 'U')
        if (i % 2 != 0) co[j]++;
    }
    memset(s, 0, sizeof(s));
  }
  for (int i = 0; i < m; ++i) cout << co[i] << ' ';
  cout << '\n';
  return 0;
}
