#include <iostream>
#include <cctype>
using namespace std;
int main()
{
char input[100];
while (cin.get(input, 999))
{
int a = 0;
while (input[a] != '\0')
{
a++;
}
input[0] = toupper(input[0]);
for (int i = 1 ; i <= a ; ++i)
{
input[i] = tolower(input[i]);
}
for (int k = 0 ; k <= a ; k++)
cout << input[k];
cout << endl;
for (int r = 0 ; r < a-1 ; r++)
{
if (isspace(input[r+1]))
{
input[r] = tolower(input[r]);
input[r+2] = toupper(input[r+2]);
r++;
} else
{
input[r] = tolower(input[r]);
input[r+1] = toupper(input[r+1]);
}
for (int k = 0 ; k <= a ; k++)
cout << input[k];
cout << endl;
}
}
return 0;
}
https://ibb.co/PThZFCt