시간 제한 메모리 제한 제출 정답 맞은 사람 정답 비율
1 초 128 MB 2440 455 385 21.027%

문제

Java 예찬론자 김동규와 C++ 옹호가 김동혁은 서로 어떤 프로그래밍 언어가 최고인지 몇 시간동안 토론을 하곤 했다. 동규는 Java가 명확하고 에러가 적은 프로그램을 만든다고 주장했고, 동혁이는 Java는 프로그램이 느리고, 긴 소스 코드를 갖는 점과 제네릭 배열의 인스턴스화의 무능력을 비웃었다.

또, 김동규와 김동혁은 변수 이름을 짓는 방식도 서로 달랐다. Java에서는 변수의 이름이 여러 단어로 이루어져있을 때, 다음과 같은 방법으로 변수명을 짓는다. 

첫 단어는 소문자로 쓰고, 다음 단어부터는 첫 문자만 대문자로 쓴다. 또, 모든 단어는 붙여쓴다. 따라서 Java의 변수명은 javaIdentifier, longAndMnemonicIdentifier, name, bAEKJOON과 같은 형태이다.

반면에 C++에서는 변수명에 소문자만 사용한다. 단어와 단어를 구분하기 위해서 밑줄('_')을 이용한다. C++ 변수명은 c_identifier, long_and_mnemonic_identifier, name, b_a_e_k_j_o_o_n과 같은 형태이다.

이 둘의 싸움을 부질없다고 느낀 재원이는 C++형식의 변수명을 Java형식의 변수명으로, 또는 그 반대로 바꿔주는 프로그램을 만드려고 한다. 각 언어의 변수명 형식의 위의 설명을 따라야 한다.

재원이의 프로그램은 가장 먼저 변수명을 입력으로 받은 뒤, 이 변수명이 어떤 언어 형식인지를 알아내야 한다. 그 다음, C++형식이라면 Java형식으로, Java형식이라면 C++형식으로 바꾸면 된다. 만약 C++형식과 Java형식 둘 다 아니라면, 에러를 발생시킨다. 변수명을 변환할 때, 단어의 순서는 유지되어야 한다.

재원이는 프로그램을 만드려고 했으나, 너무 귀찮은 나머지 이를 문제를 읽는 사람의 몫으로 맡겨놨다.

재원이가 만드려고 한 프로그램을 대신 만들어보자.

입력

첫째 줄에 변수명이 주어진다. 영어 알파벳과 밑줄('_')로만 이루어져 있고, 길이는 100을 넘지 않는다.

출력

입력으로 주어진 변수명이 Java형식이면, C++형식으로 출력하고, C++형식이라면 Java형식으로 출력한다. 둘 다 아니라면 "Error!"를 출력한다.

예제 입력 1

long_and_mnemonic_identifier

예제 출력 1

longAndMnemonicIdentifier
W3sicHJvYmxlbV9pZCI6IjM2MTMiLCJwcm9ibGVtX2xhbmciOiIwIiwidGl0bGUiOiJKYXZhIHZzIEMrKyIsImRlc2NyaXB0aW9uIjoiPHA+SmF2YSBcdWM2MDhcdWNjMmNcdWI4NjBcdWM3OTAgXHVhZTQwXHViM2Q5XHVhZGRjXHVjNjQwIEMrKyBcdWM2MzlcdWQ2MzhcdWFjMDAgXHVhZTQwXHViM2Q5XHVkNjAxXHVjNzQwIFx1YzExY1x1Yjg1YyBcdWM1YjRcdWI1YTQgXHVkNTA0XHViODVjXHVhZGY4XHViNzk4XHViYzBkIFx1YzViOFx1YzViNFx1YWMwMCBcdWNkNWNcdWFjZTBcdWM3NzhcdWM5YzAgXHViYTg3IFx1YzJkY1x1YWMwNFx1YjNkOVx1YzU0OCBcdWQxYTBcdWI4NjBcdWM3NDQgXHVkNTU4XHVhY2U0IFx1ZDU4OFx1YjJlNC4gXHViM2Q5XHVhZGRjXHViMjk0IEphdmFcdWFjMDAgXHViYTg1XHVkNjU1XHVkNTU4XHVhY2UwIFx1YzVkMFx1YjdlY1x1YWMwMCBcdWM4MDFcdWM3NDAgXHVkNTA0XHViODVjXHVhZGY4XHViN2E4XHVjNzQ0IFx1YjljY1x1YjRlMFx1YjJlNFx1YWNlMCBcdWM4ZmNcdWM3YTVcdWQ1ODhcdWFjZTAsIFx1YjNkOVx1ZDYwMVx1Yzc3NFx1YjI5NCBKYXZhXHViMjk0IFx1ZDUwNFx1Yjg1Y1x1YWRmOFx1YjdhOFx1Yzc3NCBcdWIyOTBcdWI5YWNcdWFjZTAsIFx1YWUzNCBcdWMxOGNcdWMyYTQgXHVjZjU0XHViNGRjXHViOTdjIFx1YWMxNlx1YjI5NCBcdWM4MTBcdWFjZmMgXHVjODFjXHViMTI0XHViOWFk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