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