#include <bits/stdc++.h>
using namespace std;
const int MOD = 1000000007;
const double PI = acos(-1.0);
const double EPS = 1e-10;
int in() {
  int r = 0, c;
  for (c = getchar(); c <= 32; c = getchar())
    ;
  if (c == '-') return -in();
  for (; c > 32; r = (r << 1) + (r << 3) + c - '0', c = getchar())
    ;
  return r;
}
char str[3000];
int mat[2020][2020];
int col[3000];
int main() {
  int n = in();
  int m = in();
  int k = in();
  memset(col, 0, sizeof col);
  int i, j;
  for (i = 0; i < n; i++) {
    scanf("%s", str);
    for (j = 0; j < m; j++) {
      if (str[j] == 'L')
        if (j - i >= 0) col[j - i]++;
      if (str[j] == 'R')
        if (j + i < m) col[j + i]++;
      if (str[j] == 'U')
        if (i % 2 == 0) col[j]++;
    }
  }
  for (i = 0; i < m; i++) cout << col[i] << ' ';
  cout << endl;
  return 0;
}
