#include <bits/stdc++.h>
enum { MAX = 2010 };
int result[MAX];
int main() {
  int n, m;
  scanf("%d%d%*d", &n, &m);
  for (int i = 0; i < n; i++)
    for (int j = 0; j < m; j++) {
      char c;
      scanf(" %c", &c);
      if (c == 'U' && !(i % 2)) result[j]++;
      if (c == 'R' && j + i < m) result[j + i]++;
      if (c == 'L' && j - i >= 0) result[j - i]++;
    }
  for (int i = 0; i < m; i++) printf("%d ", result[i]);
  printf("\n");
  return 0;
}
