#include <bits/stdc++.h>
using namespace std;
int main() {
  int filas, columnas, n;
  char c;
  cin >> filas >> columnas >> n;
  long long movimientos[columnas + 1];
  for (int i = 1; i <= columnas; i++) movimientos[i] = 0;
  int newPos = 0;
  for (int i = 1; i <= filas; i++) {
    for (int j = 1; j <= columnas; j++) {
      cin >> c;
      if (c != '.') {
        if (c == 'R') {
          newPos = j + (i - 1);
          if (newPos <= columnas) movimientos[newPos]++;
        } else if (c == 'L') {
          newPos = j - (i - 1);
          if (newPos <= columnas && newPos >= 0) movimientos[newPos]++;
        } else if (c == 'U' && i % 2 != 0) {
          movimientos[j]++;
        }
      }
    }
  }
  for (int i = 1; i <= columnas; i++) {
    cout << movimientos[i] << " ";
  }
  cout << endl;
  return 0;
}
