#include <bits/stdc++.h>
using namespace std;
const long long mod = 1000000007;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  int n, m, k;
  cin >> n >> m >> k;
  vector<int> res(m, 0);
  string cur;
  for (__typeof(n) i = (0) - ((0) > (n)); i != (n) - ((0) > (n));
       i += 1 - 2 * ((0) > (n))) {
    cin >> cur;
    for (__typeof(cur.size()) j = (0) - ((0) > (cur.size()));
         j != (cur.size()) - ((0) > (cur.size()));
         j += 1 - 2 * ((0) > (cur.size()))) {
      if (cur[j] == 'U' && (i & 1) == 0)
        res[j]++;
      else if (cur[j] == 'R' && (int)j + i < m)
        res[j + i]++;
      else if (cur[j] == 'L' && (int)j - (int)i >= 0)
        res[j - i]++;
    }
  }
  for (__typeof(m) i = (0) - ((0) > (m)); i != (m) - ((0) > (m));
       i += 1 - 2 * ((0) > (m)))
    cout << res[i] << " \n"[i == m - 1];
  return 0;
}
