#include <bits/stdc++.h>
using namespace std;
struct spider {
  int row, col;
  spider() : row(0), col(0) {}
  spider(int row, int col) : row(row), col(col) {}
  bool operator<(const spider &rhs) const {
    if (row == rhs.row) return col < rhs.col;
    return row < rhs.row;
  }
};
const int MAXN = 2005;
char line[MAXN];
set<spider> row_to_left[MAXN];
set<spider> row_to_right[MAXN];
set<spider> col_to_up[MAXN];
int main() {
  int R, C, k;
  scanf("%d %d %d", &R, &C, &k);
  for (int i = 0; i < R; ++i) {
    scanf("%s", line);
    for (int j = 0; j < C; ++j) {
      if (line[j] == 'L') row_to_left[i].insert(spider(i, j));
      if (line[j] == 'R') row_to_right[i].insert(spider(i, j));
      if (line[j] == 'U') col_to_up[j].insert(spider(i, j));
    }
  }
  for (int c = 0; c < C; ++c) {
    int ans = 0;
    for (int r = 1; r < R; ++r) {
      if (row_to_left[r].find(spider(r, c + r)) != row_to_left[r].end()) ans++;
      if (row_to_right[r].find(spider(r, c - r)) != row_to_right[r].end())
        ans++;
      if (col_to_up[c].find(spider(2 * r, c)) != col_to_up[c].end()) ans++;
    }
    printf("%d ", ans);
  }
  return 0;
}
