#include <bits/stdc++.h>
using namespace std;
const int MAXN = 2010;
char grid[MAXN][MAXN];
int N, M, K;
int l[MAXN];
int r[MAXN];
int u[MAXN];
int main(void) {
  scanf("%d%d%d", &N, &M, &K);
  for (int i = 0; i < N; ++i) {
    scanf("%s", grid[i]);
    for (int j = 0; j < M; ++j) {
      if (grid[i][j] == 'U' && (i & 1) == 0) ++u[j];
      if (grid[i][j] == 'R' && i + j < MAXN - 1) ++r[i + j];
      if (grid[i][j] == 'L' && j - i >= 0) ++l[j - i];
    }
  }
  for (int i = 0; i < M; ++i) {
    printf("%d ", u[i] + r[i] + l[i]);
  }
  return 0;
}
