#include <bits/stdc++.h>
using namespace std;
void read(int &x) {
  char ch = getchar();
  int f = 1;
  while ((ch != '-') && (ch < '0' || ch > '9')) ch = getchar();
  if (ch == '-')
    f = -1, x = 0;
  else
    x = ch - 48;
  ch = getchar();
  while (ch >= '0' && ch <= '9') x = x * 10 + ch - 48, ch = getchar();
  x *= f;
}
void read(long long &x) {
  char ch = getchar();
  int f = 1;
  while ((ch != '-') && (ch < '0' || ch > '9')) ch = getchar();
  if (ch == '-')
    f = -1, x = 0;
  else
    x = ch - 48;
  ch = getchar();
  while (ch >= '0' && ch <= '9') x = x * 10LL + ch - 48, ch = getchar();
  x *= f;
}
void _print(const int &x) {
  if (x < 10)
    putchar(48 + x);
  else
    _print(x / 10), _print(x % 10);
}
void _print(const long long &x) {
  if (x < 10)
    putchar(48 + x);
  else
    _print(x / 10), _print(x % 10);
}
void print(const int &x) {
  if (x < 0)
    putchar('-'), _print(-x);
  else
    _print(x);
}
void print(const long long &x) {
  if (x < 0)
    putchar('-'), _print(-x);
  else
    _print(x);
}
void println(const int &x) {
  print(x);
  putchar('\n');
}
void println(const long long &x) {
  print(x);
  putchar('\n');
}
char str[2005];
int an[2005] = {0};
int n, m, k;
int main() {
  read(n);
  read(m);
  read(k);
  for (int i = (1); i <= (n); i++) {
    scanf("%s", str + 1);
    for (int j = (1); j <= (m); j++) {
      if (str[j] == 'R')
        if (1 <= j + i - 1 && j + i - 1 <= m) an[j + i - 1]++;
      if (str[j] == 'U')
        if (i & 1) an[j]++;
      if (str[j] == 'L')
        if (j - i + 1 >= 1 && j - i + 1 <= m) an[j + 1 - i]++;
    }
  }
  for (int i = (1); i <= (m); i++) printf("%d ", an[i]);
  return 0;
}
