#include <bits/stdc++.h>
int main() {
  int n;
  char s[103];
  char o[103];
  int p = 0;
  memset(s, 0, 103 * sizeof(char));
  memset(o, 0, 103 * sizeof(char));
  scanf("%d", &n);
  scanf("%s", s);
  for (int i = 0; i < n;) {
    if (s[i] == 'o') {
      if (!strncmp(s + i + 1, "go", 2)) {
        o[p] = o[p + 1] = o[p + 2] = '*';
        p += 3;
        for (i += 3; !strncmp(s + i, "go", 2); i += 2)
          ;
        continue;
      }
    }
    o[p++] = s[i++];
  }
  printf("%s\n", o);
  return 0;
}
