class Main {
public static String captalizeWords(String words)
{
char[] caracteres = words.toLowerCase().toCharArray();
for (int i = 0; i < caracteres.length; i++)
{
if(i == 0 || caracteres[i-1] == ' ')
{
caracteres[i] = Character.toUpperCase(caracteres[i]);
}
}
return new String(caracteres);
}
}