Polycarp has interviewed Oleg and has written the interview down without punctuation marks and spaces to save time. Thus, the interview is now a string s consisting of n lowercase English letters.

There is a filler word ogo in Oleg's speech. All words that can be obtained from ogo by adding go several times to the end of it are also considered to be fillers. For example, the words ogo, ogogo, ogogogo are fillers, but the words go, og, ogog, ogogog and oggo are not fillers.

The fillers have maximal size, for example, for ogogoo speech we can't consider ogo a filler and goo as a normal phrase. We should consider ogogo as a filler here.

To print the interview, Polycarp has to replace each of the fillers with three asterisks. Note that a filler word is replaced with exactly three asterisks regardless of its length.

Polycarp has dealt with this problem in no time. Can you do the same? The clock is ticking!


-----Input-----

The first line contains a positive integer n (1 ≤ n ≤ 100) — the length of the interview.

The second line contains the string s of length n, consisting of lowercase English letters.


-----Output-----

Print the interview text after the replacement of each of the fillers with "***". It is allowed for the substring "***" to have several consecutive occurences.


-----Examples-----
Input
7
aogogob

Output
a***b

Input
13
ogogmgogogogo

Output
***gmg***

Input
9
ogoogoogo

Output
*********



-----Note-----

The first sample contains one filler word ogogo, so the interview for printing is "a***b".

The second sample contains two fillers ogo and ogogogo. Thus, the interview is transformed to "***gmg***".

Difficulty: interview

Starter code:

Solutions:
from sys import *
n = int(input())
a = input()
s = 0
i = 0
while i <= n-1:
    if s == 0:
        if a[i:i+3] == 'ogo':
            s = 1
            print('***', end = '')
            i+=3
        else:
            print(a[i], end = '')
            i += 1
            
    else:
        if a[i:i+2] == 'go':
            i += 2
        else:
            s = 0

n = int(input())
s = input().strip()

rez = ''
i = 0
while i < len(s):
	if s[i:i + 3] == 'ogo':
		j = i + 3
		while s[j:j + 2] == 'go':
			j += 2
		i = j
		rez += '***'
	else:
		rez += s[i]
		i += 1

print(rez)

n = int(input())
s = input().rstrip()
i = 0
while i < n:
    if s[i] != 'o':
        print(s[i], end="")
    else:
        j = i + 1
        while j < n - 1 and s[j] == 'g' and s[j + 1] == 'o':
            j += 2
        if j != i + 1:
            print('***', end='')
        else:
            print(s[i], end='')
        i = j - 1
    i+=1


n = int(input())
string = input()
word = "ogo" + "go" * 56
for i in range(57):
    #print(word, word in  string)
    string = string.replace(word, "***")
    word = word[:-2]
print(string)

n = int(input())
s = input()
ans = ''
i = 0
while i < len(s):
    if i <= len(s) - 3 and s[i:i + 3] == "ogo":
        j = i + 3
        while s[j:j + 2] == "go":
            j += 2
        ans += '***'
        i = j - 1
    else:
        ans += s[i]
    i += 1
print(ans)


n = int(input())
a = input() + 'aaa'
ans = ''
i = 0
ogo = False
while i < n:
    if a[i:i + 3] == 'ogo':
        ans += '***'
        i += 3
        ogo = True
    elif a[i:i + 2] == 'go' and ogo:
        i += 2
    else:
        ogo = False
        ans += a[i]
        i += 1
print(ans)

n = int(input())

s = input()

save = ''
i = 0
ny = ''
while i<n:
    if save=='':
        if s[i:i+3]=='ogo':
            save = 'o'
            i+=2
        else:
            ny+=s[i]
    else:
        if s[i:i+2]=='go':
            i+=1
        else:
            save = ''
            ny+='***'
            i-=1
    i+=1
if save!='':
    ny+='***'
print(ny)

n = int(input())
s = input()
import re
print(re.sub('ogo(go)*', '***', s))


n = int(input())
s = input()
p = "ogo"
while len(p) < len(s):
	p += "go"
while len(p) > 1:
	s = s.replace(p, "***")
	p = p[:-2]
print(s) 

a = int(input())
string = input()
first = []
last = []
sas = False
i = 1
while i < a:
    i += 1
    if not sas:
        if string[i-2:i+1] == "ogo":
            first += [i-2]
            sas = True
            i += 1
    else:
        if string[i-1:i+1] == "go":
            i += 1
        else:
            last += [i - 2]
            sas = False
if sas:
    last += [a - 1]
s = ""
counter = 0
n = 0
while counter < len(string):
    if counter not in first:
        s += string[counter]
        counter += 1
    else:
        s += "***"
        counter = last[n] + 1
        n += 1
print(s)        


import re


input()
find = re.compile('(ogo(go)*)')
s = input()
print(find.sub('***', s))


import re
input()
s = input()
print(re.sub("ogo(go)*", "***", s))

n = int(input())
s = input()
ans = ''
cur = 0
while cur < n:
    if cur + 2 < n and s[cur:cur + 3] == 'ogo':
        ln = cur + 3
        while ln + 1 < n and s[ln:ln + 2] == 'go':
            ln += 2
        ans += '***'
        cur = ln
    else:
        ans += s[cur]
        cur += 1
print(ans)


n = int(input())
text = input()
parazit = ''
for i in range(n):
      if text[i:i+3] == 'ogo':
            parazit = 'o'
            while text[i+1:i+3] == 'go':
                  parazit += text[i+1:i+3]
                  i += 2
            text = text.replace(parazit, '***', 1)
print(text)


n = int(input())
s = input()

f1 = 0
while True:
    f = s.find("ogo")
    if f > -1:
        f1 = f+3
        while True:
            if f1 + 2 <= n:
                if s[f1:f1+2] == "go":
                    f1 += 2
                else:
                    break
            else:
                break
        s = s[:f] + "***" + s[f1:]
    else:
        break
print(s)
                


import re

n = int(input())
s = input()

result = re.sub(r'ogo(go)*', '***', s)
print(result)


ans = ["ogo","ogogo","ogogogo","ogogogogo","ogogogogogo","ogogogogogogo","ogogogogogogogo","ogogogogogogogogo","ogogogogogogogogogo","ogogogogogogogogogogo","ogogogogogogogogogogogo","ogogogogogogogogogogogogo","ogogogogogogogogogogogogogo","ogogogogogogogogogogogogogogo","ogogogogogogogogogogogogogogogo","ogogogogogogogogogogogogogogogogo","ogogogogogogogogogogogogogogogogogo","ogogogogogogogogogogogogogogogogogogo","ogogogogogogogogogogogogogogogogogogogo","ogogogogogogogogogogogogogogogogogogogogo","ogogogogogogogogogogogogogogogogogogogogogo","ogogogogogogogogogogogogogogogogogogogogogogo","ogogogogogogogogogogogogogogogogogogogogogogogo","ogogogogogogogogogogogogogogogogogogogogogogogogo","ogogogogogogogogogogogogogogogogogogogogogogogogogo","ogogogogogogogogogogogogogogogogogogogogogogogogogogo","ogogogogogogogogogogogogogogogogogogogogogogogogogogogo","ogogogogogogogogogogogogogogogogogogogogogogogogogogogogo","ogogogogogogogogogogogogogogogogogogogogogogogogogogogogogo","ogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogo","ogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogo","ogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogo","ogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogo","ogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogo","ogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogo","ogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogo","ogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogo","ogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogo","ogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogo","ogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogo","ogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogo","ogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogo","ogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogo","ogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogo","ogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogo","ogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogo","ogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogo","ogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogo","ogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogo","ogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogo","ogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogo","ogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogo","ogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogo","ogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogo","ogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogo","ogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogo","ogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogo","ogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogo","ogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogo","ogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogo","ogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogo","ogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogo","ogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogo","ogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogo","ogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogo","ogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogo","ogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogo","ogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogo","ogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogo","ogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogo","ogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogo","ogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogo","ogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogo","ogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogo","ogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogo","ogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogo","ogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogo","ogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogo","ogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogo","ogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogo","ogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogo","ogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogo","ogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogo","ogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogo","ogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogo","ogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogo","ogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogo","ogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogo","ogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogo","ogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogo","ogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogo","ogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogo","ogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogo","ogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogo","ogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogo","ogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogo","ogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogo","ogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogo","ogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogo","ogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogo","ogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogogo"]
n = int(input())
s = input()
for i in range(len(ans) - 1, -1, -1):
    s = s.replace(ans[i], "***")
print(s)

n = int(input())
s = input()
i = 0
ans = ''
while i < n:
    if i <= n - 3 and s[i:i + 3] == 'ogo':
        j = i + 3
        while j < n - 1:
            if s[j] == 'g' and s[j + 1] == 'o':
                j += 2
            else:
                break
        ans += '***'
        i = j
    else:
        ans += s[i]
        i += 1
print(ans)


l = int(input())
s = input()
#l = len(s)
l += 2
s += '  '
ret = ''
i = 0
while i < l - 2:
    if s[i] == 'o' and s[i + 1] == 'g' and s[i + 2] == 'o':
        j = i + 3
        while j < l - 1:
            if s[j] == 'g' and s[j + 1] == 'o':
                j += 2
            else:
                break
        ret += '***'
        i = j
    else:
        ret += s[i]
        i += 1
print(ret)


n = int(input())
s = input()
for i in range(50,-1,-1):
    cool_s = 'ogo'+i*'go'
    while cool_s in s:
        s = s[:s.find(cool_s)]+'***'+s[s.find(cool_s)+len(cool_s):]
print(s)

n = int(input())
s = input()
x = 0
flag = 0
while x < len(s) - 2:
    if s[x: x + 3] == 'ogo':
        right = x
        left = x + 3
        flag = 0
        for i in range(x + 3, len(s) - 1, 2):
            if s[i : i+ 2] == 'go' and flag == 0:
                left += 2
            else:
                flag = 1
        s = s[:right] + '***' + s[left:]
    x += 1
print(s)

n = int(input())
s = input()
ans = ''
last_ind = 0
i = 0
while i < n:
    if s[i:i+3] == 'ogo':
        i += 2
    else:
        i += 1
        if i - last_ind > 1:
            ans += '***'
        else:
            ans += s[last_ind:i]
        last_ind = i
print(ans)

n = int(input())
s = input()
while s.count("ogo") > 0:
    i = 0
    j = 0
    while s[i:i + 3] != "ogo":
        i += 1
    if s[i:i + 3] == "ogo":
        j = i + 3
        while j + 2 <= len(s) and s[j:j + 2] == "go":
            j += 2
        s = s[:i] + "***" + s[j:]
print(s)


n, s = int(input()), input()
s, ans = s + 'ii', []
i = 0
while i < n:
    if s[i] == 'o' and s[i + 1] == 'g' and s[i + 2] == 'o':
        i += 3
        while i < n and s[i] == 'g' and s[i + 1] == 'o':
            i += 2
        ans.append('***')
    else:
        ans.append(s[i])
        i += 1
print(''.join(ans))

n = int(input())
s = str(input())
k=n-3
if k>0:
    t=k//2
    for i in range(t,-1,-1):

        s=s.replace('ogo'+'go'*i,'***')
else:
    s=s.replace('ogo','***')
print(s)