#include <bits/stdc++.h>
using namespace std;
using namespace std;
const int mod = (int)1e9 + 7;
const long double INF = (long double)(1e3);
const int N = 2005;
int n, m, k;
int a[N];
void upd(int i, int j, int cur) {
  if (cur == 0) {
    if (j - i >= 0) a[j - i]++;
  }
  if (cur == 1) {
    if (j + i <= m - 1) a[i + j]++;
  }
  if (cur == 2) {
    if (i % 2 == 0) {
      a[j]++;
    }
  }
}
int main() {
  cin >> n >> m >> k;
  string s;
  for (int i = 0; i < n; ++i) {
    cin >> s;
    for (int j = 0; j < m; ++j) {
      if (s[j] == 'L')
        upd(i, j, 0);
      else if (s[j] == 'R')
        upd(i, j, 1);
      else if (s[j] == 'U')
        upd(i, j, 2);
    }
  }
  for (int(i) = 0; (i) < (m); ++(i)) printf("%d ", a[i]);
  return 0;
}
