#include <bits/stdc++.h>
using namespace std;
struct spLoc {
  int c;
  int r;
  char type;
};
vector<int> soln;
vector<spLoc> spiders;
void getAns2(int n, int m, int k) {
  for (int i = 0; i < spiders.size(); i++) {
    if (spiders[i].type == 'U') {
      if (spiders[i].r % 2 == 0) soln[spiders[i].c]++;
    } else if (spiders[i].type == 'L') {
      if ((spiders[i].c - spiders[i].r) >= 0)
        soln[spiders[i].c - spiders[i].r]++;
    } else if (spiders[i].type == 'R') {
      if (spiders[i].c + spiders[i].r < m) soln[spiders[i].c + spiders[i].r]++;
    }
  }
  for (int i = 0; i < m; i++) printf("%d ", soln[i]);
}
int main() {
  int n, m, k;
  scanf("%d", &n);
  scanf("%d", &m);
  scanf("%d", &k);
  soln.resize(m, 0);
  char ch;
  string st;
  for (int i = 0; i < n; i++) {
    cin >> st;
    for (int j = 0; j < m; j++) {
      ch = st[j];
      if (ch == 'U') {
        spLoc s;
        s.c = j;
        s.r = i;
        s.type = 'U';
        spiders.push_back(s);
      } else if (ch == 'R') {
        spLoc s;
        s.c = j;
        s.r = i;
        s.type = 'R';
        spiders.push_back(s);
      } else if (ch == 'L') {
        spLoc s;
        s.c = j;
        s.r = i;
        s.type = 'L';
        spiders.push_back(s);
      }
    }
  }
  getAns2(n, m, k);
  return 0;
}
