#include <bits/stdc++.h>
const int MAX_N = 200000;
int main() {
  int N;
  std::string S;
  std::cin >> N >> S;
  static int black[MAX_N + 1] = {};
  for (int i = 1; i <= N; ++i) {
    if (S[i - 1] == '#')
      black[i] = black[i - 1] + 1;
    else
      black[i] = black[i - 1];
  }
  for (int i = 0; i <= N; ++i) {
    std::cout << black[i] << " ";
  }
  std::cout << std::endl;
  int ans = MAX_N;
  for (int i = 0; i <= N; ++i) {
    ans = std::min(ans, black[i] + N - i - black[N] + black[i]);
  }
  std::cout << ans << std::endl;
}
