#include <bits/stdc++.h>
int n, m, s;
char g[2005][2005];
int cnt[2005];
int main() {
  memset(cnt, 0, sizeof(cnt));
  scanf("%d %d %d", &n, &m, &s);
  for (int i = 0; i < n; i++) {
    scanf("%s", g[i]);
    for (int j = 0; j < m; j++) {
      if (g[i][j] == 'R') {
        if (j + i < m) cnt[j + i]++;
      } else if (g[i][j] == 'L') {
        if (j - i >= 0) cnt[j - i]++;
      } else if (g[i][j] == 'U') {
        if (~i & 1) cnt[j]++;
      }
    }
  }
  for (int i = 0; i < m; i++) printf("%d ", cnt[i]);
  puts("");
}
