#include <bits/stdc++.h>
#pragma comment(linker, "/stack:16777216")
using namespace std;
const double Pi = acos(-1.0);
const int INF = 1000000000;
const int MOD = 1000000007;
string s[2005];
char buf[2005];
int res[2005];
int main() {
  int n, m, k;
  cin >> n >> m >> k;
  for (int i = (0); i < (n); ++i) {
    scanf("%s", buf);
    s[i] = buf;
  }
  for (int i = (0); i < (n); ++i) {
    for (int j = (0); j < (m); ++j) {
      if (s[i][j] == 'U') {
        if (i % 2 == 0) ++res[j];
      }
      if (s[i][j] == 'R') {
        if (i + j < m) {
          res[i + j]++;
        }
      }
      if (s[i][j] == 'L') {
        if (j - i >= 0) {
          res[j - i]++;
        }
      }
    }
  }
  for (int i = (0); i < (m); ++i) {
    cout << res[i] << ' ';
  }
  return 0;
}
