#include <iostream>
#include <string>
std::string camel_case( std::string str )
{
const int SIZE = str.size();
if( str[0] >= 'a' && str[0] <= 'z' ) str[0] -= ' ';
for( int i = 1; i < SIZE; ++i )
{
if( str[i] >= 'A' && str[i] <= 'Z' ) str[i] += ' ';
}
return( str );
}
int main()
{
std::string animal;
std::cout << "Please enter Cat or Dog: ";
std::cin >> animal;
std::cout << camel_case( animal ) << std::endl;
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8c3RyaW5nPgoKc3RkOjpzdHJpbmcgY2FtZWxfY2FzZSggc3RkOjpzdHJpbmcgc3RyICkKewogICAgY29uc3QgaW50IFNJWkUgPSBzdHIuc2l6ZSgpOwogICAgaWYoIHN0clswXSA+PSAnYScgJiYgc3RyWzBdIDw9ICd6JyApIHN0clswXSAtPSAnICc7CiAgICBmb3IoIGludCBpID0gMTsgaSA8IFNJWkU7ICsraSApCiAgICB7CiAgICAgICAgaWYoIHN0cltpXSA+PSAnQScgJiYgc3RyW2ldIDw9ICdaJyApIHN0cltpXSArPSAnICc7CiAgICB9CiAgICByZXR1cm4oIHN0ciApOwp9CgppbnQgbWFpbigpCnsKCXN0ZDo6c3RyaW5nIGFuaW1hbDsKCXN0ZDo6Y291dCA8PCAiUGxlYXNlIGVudGVyIENhdCBvciBEb2c6ICI7CglzdGQ6OmNpbiA+PiBhbmltYWw7CgkKCXN0ZDo6Y291dCA8PCBjYW1lbF9jYXNlKCBhbmltYWwgKSA8PCBzdGQ6OmVuZGw7CgkKCQoJcmV0dXJuIDA7Cn0K