#include <bits/stdc++.h>
using namespace std;
int n, m, k;
int ans[2005];
char mat[2005][2005];
void read() {
  scanf("%d %d %d", &n, &m, &k);
  for (int i = 1; i <= n; i++) scanf("%s", mat[i] + 1);
  return;
}
void solve() {
  int i, j;
  for (i = 1; i <= n; i++)
    for (j = 1; j <= m; j++)
      if (mat[i][j] == 'R') {
        int t = j + (i - 1);
        if (t <= m) ans[t]++;
      } else if (mat[i][j] == 'L') {
        int t = j - (i - 1);
        if (t >= 1) ans[t]++;
      } else if (mat[i][j] == 'U')
        if (i & 1) ans[j]++;
  for (i = 1; i <= m; i++) printf("%d ", ans[i]);
  puts("");
  return;
}
int main() {
  read();
  solve();
  return 0;
}
