Tell me, please, why do not pass the test?
package com.codegym.task.task08.task0823;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
/*
Going national
*/
public class Solution {
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String name = br.readLine();
String text = "";
for (String up : name.split(" ")) {
String s = up.substring(0, 1).toUpperCase() + up.substring(1).toLowerCase() + " ";
text = text + s;
}
System.out.print(text.trim());
}
}