#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m, k, i, j, res, col;
  cin >> n >> m >> k;
  char park[n][m];
  for (i = 0; i < n; i++)
    for (j = 0; j < m; j++) cin >> park[i][j];
  for (col = 0; col < m; col++) {
    res = 0;
    i = 1;
    while (i < n && col + i < m) {
      if (park[i][col + i] == 'L') res++;
      i++;
    }
    i = 1;
    while (i < n && col - i >= 0) {
      if (park[i][col - i] == 'R') res++;
      i++;
    }
    i = 2;
    while (i < n) {
      if (park[i][col] == 'U' && i % 2 == 0) res++;
      i++;
    }
    cout << res << " ";
  }
  return 0;
}
