#include <bits/stdc++.h>
using namespace std;
template <class T>
void debug(T a, T b) {
  ;
}
template <class T>
void chmin(T& a, const T& b) {
  if (a > b) a = b;
}
template <class T>
void chmax(T& a, const T& b) {
  if (a < b) a = b;
}
namespace std {
template <class S, class T>
ostream& operator<<(ostream& out, const pair<S, T>& a) {
  out << '(' << a.first << ',' << a.second << ')';
  return out;
}
}  // namespace std
int n, m, k;
char buf[2005][2005];
int res[2005];
int main() {
  cin >> n >> m >> k;
  for (int i = 0; i < (n); ++i) scanf("%s", buf[i]);
  for (int i = 0; i < (m); ++i) {
    int cnt = 0;
    for (int j = 1; i - j >= 0 && j < n; ++j)
      if (buf[j][i - j] == 'R') ++cnt;
    for (int j = 1; i + j < m && j < n; ++j)
      if (buf[j][i + j] == 'L') ++cnt;
    for (int j = 2; j < n; j += 2)
      if (buf[j][i] == 'U') ++cnt;
    res[i] = cnt;
  }
  for (int i = 0; i < (m); ++i) printf("%d%c", res[i], i == m - 1 ? '\n' : ' ');
  return 0;
}
