Java vs C++#1077

Java vs C++

2 seconds
64 megabytes
Easy

Supporters of Java and C++ often debate which language is better for solving programming contest problems. Some say that Java offers many useful libraries for working with strings, well-implemented mechanisms for input and output, and convenient built-in tools for big integer arithmetic. On the other hand, C++ is considered a classic language, and the execution speed of programs is much higher due to existing compilers (such as Intel Compiler ).

However, now we are only interested in the differences in naming conventions that programmers use for variables in Java and C++. It is known that to make variable names easier to understand, programmers often use English words or even whole phrases that describe the meaning of variables. Below are the rules used by programmers in Java and C++ for naming variables.

In Java, the first word in a variable name is written in lowercase Latin letters; each subsequent word starts with an uppercase letter (only the first letter is uppercase), and there are no separators between words. Only Latin letters are allowed. Examples of valid Java variables: javaIdentifier, longAndMnemonicIdentifier, name, nEERC.

In C++, variable names consist only of lowercase Latin letters, with words separated by the underscore character "_". Examples: java_identifier, long_and_mnemonic_identifier, name, n_e_e_r_c.

You are required to write a program that converts a variable name written in one of these languages to the format of the other language.

Input

The input file contains a variable name no longer than characters.

Output

Print the equivalent variable name in the other language. That is, if the variable name is in Java format, convert it to C++ format, and vice versa. If the variable name does not conform to the rules of either language, output "Error!".

Examples

Example 1

Loading
Loading