https://freecodecenter.com/codeforces-59a-word-solution/
Efficient Solutions for Codeforces 59A Word Solution: Optimizing String Case Conversion