camel_word = input()

snake_word = ""

for letter in camel_word:
    if letter.isupper():
        snake_word += "_"
        snake_word += letter.lower()
    else:
        snake_word += letter

print(snake_word)

242375fd13e41c2e553164ceda10fa25399f9971
<mask token>

<mask token>
for letter in camel_word:
    if letter.isupper():
        snake_word += '_'
        snake_word += letter.lower()
    else:
        snake_word += letter
print(snake_word)

camel_word = input()
snake_word = ''
for letter in camel_word:
    if letter.isupper():
        snake_word += '_'
        snake_word += letter.lower()
    else:
        snake_word += letter
print(snake_word)

camel_word = input()

snake_word = ""

for letter in camel_word:
    if letter.isupper():
        snake_word += "_"
        snake_word += letter.lower()
    else:
        snake_word += letter

print(snake_word)
