#include <bits/stdc++.h>
using namespace std;
int kkaass = 1;
char B[2009][2009];
int n, m;
int main() {
  int i, j, k;
  while (cin >> n >> m >> k) {
    for (i = (1); i <= (n); i++)
      for (j = (1); j <= (m); j++) scanf(" %c", &B[i][j]);
    int ans[2009] = {0};
    for (i = (2); i <= (n); i++) {
      for (j = (1); j <= (m); j++) {
        if (B[i][j] == 'R') {
          int t = i - 1;
          if (j + t < 2009) ans[j + t]++;
        } else if (B[i][j] == 'L') {
          int t = i - 1;
          if (j - t >= 0) ans[j - t]++;
        } else if (B[i][j] == 'U') {
          int t = i;
          if (t & 1) ans[j]++;
        }
      }
    }
    for (i = (1); i <= (m); i++) {
      if (i == 1)
        cout << ans[i];
      else
        cout << " " << ans[i];
    }
    cout << endl;
  }
  return 0;
}
