#include <bits/stdc++.h>
using namespace std;
const int N = 2010;
const int INF = (int)1e9;
char ch[N][N];
int n, m, k;
int CountSpider(int x, int y, int time) {
  int ans = 0;
  if (x - time >= 1 && ch[y][x - time] == 'R') ans++;
  if (x + time <= m && ch[y][x + time] == 'L') ans++;
  if (y - time >= 1 && ch[y - time][x] == 'D') ans++;
  if (y + time <= n && ch[y + time][x] == 'U') ans++;
  return ans;
}
int main() {
  scanf("%d%d%d\n", &n, &m, &k);
  for (int i = 1; i <= n; ++i) {
    for (int j = 1; j <= m; ++j) scanf("%c", &ch[i][j]);
    scanf("\n");
  }
  for (int j = 1; j <= m; ++j) {
    int time = 0;
    int ans = 0;
    for (int i = 1; i <= n; ++i) {
      ans += CountSpider(j, i, time);
      time++;
    }
    printf("%d ", ans);
  }
  return 0;
}
