#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:66777216")
using namespace std;
const int N = 2007;
char st[N][N];
int n, m, k;
inline bool sym(char c) { return c == 'L' || c == 'R' || c == 'U' || c == 'D'; }
int main() {
  scanf("%d%d%d", &n, &m, &k);
  for (int i = 0; i < n; ++i) scanf("%s", st[i]);
  for (int j = 0; j < m; ++j) {
    int cur = 0;
    for (int i = 0; i < n; ++i) {
      if (st[i][j] == 'U' && i % 2 == 0) ++cur;
    }
    for (int k = 1; k < n; ++k)
      if (j >= k && st[k][j - k] == 'R') ++cur;
    for (int k = 1; k < n; ++k)
      if (j + k < m && st[k][j + k] == 'L') ++cur;
    printf("%d ", cur);
  }
  puts("");
  return 0;
}
