#include <bits/stdc++.h>
using namespace std;
const long double pi = 3.1415926535897932384626433832795l;
template <typename T>
inline auto sqr(T x) -> decltype(x * x) {
  return x * x;
}
template <typename T>
inline T abs(T x) {
  return x > T() ? x : -x;
}
template <typename It>
ostream &outSeq(ostream &out, It begin, It end) {
  out << "[";
  while (begin != end) {
    out << *begin;
    ++begin;
    if (begin != end) {
      out << ", ";
    }
  }
  return out << "]";
}
template <typename T>
ostream &operator<<(ostream &out, vector<T> const &a) {
  return outSeq(out, (a).begin(), (a).end());
}
template <typename T1, typename T2>
ostream &operator<<(ostream &out, pair<T1, T2> const &p) {
  return out << "(" << p.first << ", " << p.second << ")";
}
namespace aux {
template <typename Tuple, size_t Size = tuple_size<Tuple>::value>
struct print_tuple;
template <typename Tuple>
struct print_tuple<Tuple, 0> {
  ostream &operator()(ostream &out, Tuple t) { return out; }
};
template <typename Tuple, size_t Size>
struct print_tuple : private print_tuple<Tuple, Size - 1> {
  ostream &operator()(ostream &out, Tuple t) {
    print_tuple<Tuple, Size - 1>::operator()(out, t);
    if (Size > 1) {
      out << ", ";
    }
    return out << get<Size - 1>(t);
  }
};
}  // namespace aux
template <typename... Args>
ostream &operator<<(ostream &out, tuple<Args...> const &t) {
  out << "(";
  aux::print_tuple<tuple<Args...> >()(out, t);
  return out << ")";
}
void showTime() {}
const int N = 2000;
struct Input {
  int n, m, k;
  string s[N];
  void init(const Input &input) { *this = input; }
};
struct Data : Input {
  bool read() {
    if (!(cin >> n >> m >> k)) {
      return 0;
    }
    getline(cin, s[0]);
    for (int i = 0; i < int(n); ++i) {
      getline(cin, s[i]);
    }
    return 1;
  }
  int ans[N];
  void write() {
    for (int i = 0; i < int(m); ++i) {
      if (i) {
        cout << " ";
      }
      cout << ans[i];
    }
    puts("");
  }
  virtual void solve() {}
  virtual void clear() { *this = Data(); }
};
struct Solution : Data {
  void solve() {
    memset(ans, 0, sizeof ans);
    for (int i = 0; i < int(n); ++i) {
      for (int j = 0; j < int(m); ++j) {
        if (s[i][j] == 'L') {
          if (j - i >= 0) {
            ans[j - i]++;
          }
        }
        if (s[i][j] == 'R') {
          if (j + i < m) {
            ans[j + i]++;
          }
        }
        if (s[i][j] == 'U') {
          if (!(i & 1)) {
            ans[j]++;
          }
        }
      }
    }
  }
  void clear() { *this = Solution(); }
};
Solution sol;
int main() {
  sol.read();
  sol.solve();
  sol.write();
  return 0;
}
