#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  string s;
  cin >> n >> s;
  int sum[200200] = {0};
  for (int i = 0; i < n; i++) {
    if (s[i] == '.') sum[i + 1]++;
    sum[i + 1] += sum[i];
  }
  for (int i = 0; i < n + 1; i++) {
    cout << sum[i] << " ";
  }
  cout << endl;
  int cnt, ans = 200200;
  for (int i = 0; i < n; i++) {
    cnt = 0;
    cnt += (i - sum[i]) + (sum[n] - sum[i + 1]);
    ans = min(ans, cnt);
  }
  cout << ans << endl;
  return 0;
}
