#include <bits/stdc++.h>
using namespace std;
int wynik[2001];
int n, m, k;
int main() {
  ios_base::sync_with_stdio(0);
  cin >> n >> m >> k;
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) {
      char a;
      cin >> a;
      if (a == 'U' and i % 2 == 0) wynik[j]++;
      if (a == 'L' and j - i >= 0) wynik[j - i]++;
      if (a == 'R' and j + i < m) wynik[j + i]++;
    }
  }
  for (int i = 0; i < m; i++) cout << wynik[i] << " ";
  return 0;
}
