You are given a string S in the camel case format. Your task is to convert this string into the snake case format.
Examples of the camel case strings are as follows:
Note: In the camel case string, the first character may or may not be capitalized.
Examples of the snake case strings are as follows:
Input format
Output format
For each test case, print the snake case format of the given camel case in the string S in a new line.
Constraints
1≤T≤100
1≤|S|≤100, where |S| indicates the length of string S
String S is made of lower and upper case English alphabets
First 3 test cases are from the statement itself.
In the fourth test case i.e. random
, there's no uppercase letter in the string, so no need to add underscore anywhere. Hence the output is also random
.
Fifth case is similar to second test valuecase.
In sixth test case, there are continuous uppercase characters. We add underscore before each of them. This is not really the snake case conversion or so to speak but for now we are OK with that.