#include <bits/stdc++.h>
using namespace std;
template <class T>
T abs(T a) {
  return a >= 0 ? a : -a;
}
template <class T>
T gcd(T a, T b) {
  return b ? gcd(b, a % b) : a;
}
template <class T>
T mod(T a, T b) {
  T ret = a % b;
  if (ret < 0) ret += b;
  return ret;
}
long long mulmod(long long a, long long b, long long c) {
  if (b == 0LL) return 0LL;
  long long ret = mulmod(a, b >> 1, c);
  ret = (ret + ret) % c;
  if (b & 1LL) ret = (ret + a) % c;
  return ret;
}
long long powmod(long long a, long long b, long long c) {
  if (b == 0LL) return 1LL;
  long long ret = powmod(a, b >> 1, c);
  ret = ret * ret % c;
  if (b & 1LL) ret = ret * a % c;
  return ret;
}
template <class T>
inline void wt(T x) {
  if (x < 0) putchar('-'), x = -x;
  if (x < 10)
    putchar(x + '0');
  else
    wt(x / 10), putchar(x % 10 + '0');
}
template <class T>
inline void rd(T& x) {
  bool f = 0;
  char ch;
  for (ch = getchar(); ch <= 32; ch = getchar())
    ;
  if (ch == '-') f = 1, ch = getchar();
  for (x = 0; ch > 32; ch = getchar()) x = (x << 3) + (x << 1) + ch - '0';
  if (f) x = -x;
}
const int N = 2005;
int tt;
int u, v, w, n, m, k, ans[N];
string s[N];
int main() {
  rd(n), rd(m), rd(k);
  for (register int i = 1; i <= n; ++i) cin >> s[i - 1];
  for (register int i = 0; i <= n - 1; ++i)
    for (register int j = 0; j < int(s[i].size()); ++j) {
      char c = s[i][j];
      if (c == 'U') {
        if (i % 2 == 0) ans[j]++;
      } else if (c == 'R') {
        u = i + j;
        if (u < m) ans[u]++;
      } else if (c == 'L') {
        u = j - i;
        if (u >= 0) ans[u]++;
      }
    }
  for (register int i = 1; i <= m; ++i) wt(ans[i - 1]), putchar(' ');
  puts("");
  return 0;
}
