#include <bits/stdc++.h>
using namespace std;
int n, m, k;
char grid[2002][2002];
int u[2002], r[2002], l[2002], d[2002];
bool OK(char a) {
  return (a == 'U' || a == 'D' || a == 'L' || a == 'R' || a == '.');
}
int GetAnsFor(int col) {
  int ret = 0;
  int i, j;
  for (i = 1; i <= n; i++) {
    if (i % 2 == 0) continue;
    if (grid[i][col] == 'U') {
      ret++;
    }
  }
  for (i = 1; i <= n; i++) {
    if (col - i + 1 >= 1) {
      if (grid[i][col - i + 1] == 'R') {
        ret++;
      }
    }
    if (col + i - 1 <= m) {
      if (grid[i][col + i - 1] == 'L') {
        ret++;
      }
    }
  }
  return ret;
}
int main() {
  int i, j, ii, jj, ind;
  scanf("%d %d %d", &n, &m, &k);
  for (i = 1; i <= n; i++) {
    for (j = 1; j <= m; j++) {
      scanf("%c", &grid[i][j]);
      if (!OK(grid[i][j])) {
        j--;
        continue;
      }
    }
  }
  for (i = 1; i <= m; i++) {
    printf("%d", GetAnsFor(i));
    if (i == m)
      printf("\n");
    else
      printf(" ");
  }
}
