#!/usr/bin/env python3

import re
from string import ascii_lowercase as l

s = input().lower()
r = re.findall(':[-\w_]+:', s)
s = re.sub(':[-\w_]+:', '{}', s)
print(''.join((':-{}:'.format(c) if c in l else c for c in s)).format(*r))

e3168ac71cd336b9d05ab3cbb5263b925c3229b1
<mask token>

<mask token>
print(''.join(':-{}:'.format(c) if c in l else c for c in s).format(*r))

<mask token>
s = input().lower()
r = re.findall(':[-\\w_]+:', s)
s = re.sub(':[-\\w_]+:', '{}', s)
print(''.join(':-{}:'.format(c) if c in l else c for c in s).format(*r))

import re
from string import ascii_lowercase as l
s = input().lower()
r = re.findall(':[-\\w_]+:', s)
s = re.sub(':[-\\w_]+:', '{}', s)
print(''.join(':-{}:'.format(c) if c in l else c for c in s).format(*r))

#!/usr/bin/env python3

import re
from string import ascii_lowercase as l

s = input().lower()
r = re.findall(':[-\w_]+:', s)
s = re.sub(':[-\w_]+:', '{}', s)
print(''.join((':-{}:'.format(c) if c in l else c for c in s)).format(*r))
