#虽然有点复杂,但也搞出来了
while True:
try:
s = input()
res = []
for i in range(len(s)):
if i == 0 and s[i].isdigit() and not s[i + 1].isdigit():
res.append('*')
res.append(s[i])
res.append('*')
elif i == 0 and s[i].isdigit() and s[i + 1].isdigit():
res.append('*')
res.append(s[i])
elif i == len(s) - 1 and s[i].isdigit() and not s[i -1].isdigit():
res.append('*')
res.append(s[i])
res.append('*')
elif i == len(s) - 1 and s[i].isdigit() and s[i -1].isdigit():
res.append(s[i])
res.append('*')
elif s[i].isdigit() and not s[i-1].isdigit() and not s[i+1].isdigit() and i != len(s) - 1 and i != 0:
res.append('*')
res.append(s[i])
res.append('*')
elif s[i].isdigit() and not s[i-1].isdigit() and s[i+1].isdigit() and i != len(s) -1 and i != 0:
res.append('*')
res.append(s[i])
elif s[i].isdigit() and s[i-1].isdigit() and not s[i+1].isdigit() and i != 0:
res.append(s[i])
res.append('*')
else:
res.append(s[i])
print(''.join(res))
except:
break