#include <bits/stdc++.h>
using namespace std;
string arr[2001];
int main(int argc, char** argv) {
  int row, col, n;
  long counter = 0;
  cin >> row >> col >> n;
  for (int i = 0; i < row; i++) cin >> arr[i];
  for (int i = 0; i < col; i++) {
    counter = 0;
    for (int j = 1; j < row; j++) {
      if (j % 2 == 0 && arr[j][i] == 'U') counter++;
      if (i - j >= 0 && arr[j][i - j] == 'R') counter++;
      if (i + j < col && arr[j][i + j] == 'L') counter++;
    }
    cout << counter << " ";
  }
  return 0;
}
