#include <bits/stdc++.h>
using namespace std;
template <class T>
inline bool gmin(T &a, T b) {
  if (a > b) return a = b, true;
  return false;
}
template <class T>
inline bool gmax(T &a, T b) {
  if (a < b) return a = b, true;
  return false;
}
template <class T>
T exgcd(T a, T b, T &first, T &second) {
  if (!b)
    return first = (T)1, second = (T)0, a;
  else {
    T d = exgcd(b, a % b, second, first);
    return second -= a / b * first, d;
  }
}
const int INF = 0x3f3f3f3f;
const long long LINF = 0x3f3f3f3f3f3f3f3fll;
const double DINF = 1e10;
const double EPS = 1e-9;
const double PI = 3.14159265358979323846264338327950288;
const double TAU = 2.0 * PI;
inline int sgn(const double &a) { return a > EPS ? 1 : (a < -EPS ? -1 : 0); }
inline int lowbit(int i) { return i & (-i); }
struct Initializer {
  Initializer() {
    ios::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);
  }
} initializer;
const int MAXN = 2005;
int n, m, k;
int ans[MAXN];
char s[MAXN][MAXN];
int main() {
  scanf("%d %d %d", &m, &n, &k);
  for (int i = 1; i <= m; i++) scanf("%s", s[i] + 1);
  for (int j = 1; j <= n; j++) {
    for (int i = 2; i <= m; i++) {
      if (2 * i - 1 <= m) ans[j] += (s[2 * i - 1][j] == 'U');
      if (j - i + 1 >= 1) ans[j] += (s[i][j - i + 1] == 'R');
      if (j + i - 1 <= n) ans[j] += (s[i][j + i - 1] == 'L');
    }
  }
  printf("%d", ans[1]);
  for (int i = 2; i <= n; i++) printf(" %d", ans[i]);
  printf("\n");
  return 0;
}
