import java.util.regex.Pattern;
import java.util.stream.Collectors;
import java.util.Scanner;
class StringCap {
public static void main
(String[] args
) { Scanner scanner
= new Scanner
(System.
in); while (scanner.hasNextLine()) {
System.
out.
println(titleize
(scanner.
nextLine())); }
}
/**
* Titleize a string. Takes a string and returns a new string where all words
* have had their first letter title cased. If the letter is already title case
* or is not a cased letter (like a number), it will be passed through.
* Leading, trailing, and all other whitespace is preserved.
*
* This method is not as robust as titleize in Rails. It does not do any magic
* like breaking up MashedTogetherWords or replacing_underscores.
*
* This will blow up if null is passed in.
*/
private static final Pattern bound = Pattern.compile("\\b(?=\\w)");
return input.isEmpty() ? input : (input.substring(0, 1).toUpperCase() + input.substring(1));
};
return bound.splitAsStream(input)
.map(StringCap::ucFirst)
.collect(Collectors.joining());
}
}
aW1wb3J0IGphdmEudXRpbC5yZWdleC5QYXR0ZXJuOwppbXBvcnQgamF2YS51dGlsLnN0cmVhbS5Db2xsZWN0b3JzOwppbXBvcnQgamF2YS51dGlsLlNjYW5uZXI7CgpjbGFzcyBTdHJpbmdDYXAgewoJCglwdWJsaWMgc3RhdGljIHZvaWQgbWFpbihTdHJpbmdbXSBhcmdzKSB7CgkJU2Nhbm5lciBzY2FubmVyID0gbmV3IFNjYW5uZXIoU3lzdGVtLmluKTsKCQl3aGlsZSAoc2Nhbm5lci5oYXNOZXh0TGluZSgpKSB7CgkJCVN5c3RlbS5vdXQucHJpbnRsbih0aXRsZWl6ZShzY2FubmVyLm5leHRMaW5lKCkpKTsKCQl9Cgl9CgoJLyoqCgkgKiBUaXRsZWl6ZSBhIHN0cmluZy4gVGFrZXMgYSBzdHJpbmcgYW5kIHJldHVybnMgYSBuZXcgc3RyaW5nIHdoZXJlIGFsbCB3b3JkcwoJICogaGF2ZSBoYWQgdGhlaXIgZmlyc3QgbGV0dGVyIHRpdGxlIGNhc2VkLiBJZiB0aGUgbGV0dGVyIGlzIGFscmVhZHkgdGl0bGUgY2FzZQoJICogb3IgaXMgbm90IGEgY2FzZWQgbGV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ub3QgMTgwMG5vdDEzMzc=
this is a 'common-line' string and another.
This is 'quoted'
This has-joined-words
This should not 1800not1337