#include <bits/stdc++.h>
using namespace std;
int mang[111111];
int m, n, k;
char a[2222][2222];
int main() {
  scanf("%d%d%d\n", &m, &n, &k);
  for (int i = 1; i <= m; i++) {
    for (int j = 1; j <= n; j++) scanf("%c", &a[i][j]);
    scanf("\n");
  }
  memset(mang, 0, sizeof(mang));
  int x;
  for (int i = 1; i <= m; i++)
    for (int j = 1; j <= n; j++)
      if (a[i][j] != '.') {
        if (a[i][j] == 'D')
          continue;
        else if (a[i][j] == 'U') {
          if (i % 2) mang[j]++;
        } else if (a[i][j] == 'R') {
          x = j + (i - 1);
          if (x <= n) mang[x]++;
        } else if (a[i][j] == 'L') {
          x = j - (i - 1);
          if (x >= 1) mang[x]++;
        }
      }
  for (int i = 1; i <= n; i++) printf("%d ", mang[i]);
  return 0;
}
