Back to School '16: HarambeView as PDF
One bright morning, d's English teacher needed help marking some essays. Naturally, d went out of his way to help him. When d gets the papers, he notices that the essays are riddled with improper capitalization everywhere.
Wanting to help his classmates (but not having enough time to properly fix their errors), d decides to convert the entire essay into either lowercase or uppercase text. He wants to do the least work possible, so he will convert an essay to lowercase if it already has more lowercase characters than uppercase, and vice-versa. If a tie occurs, he will leave the essay as it is.
Having a lot of essays to fix, d asks you to write a program to help him!
The input will consist of one line, containing one essay. The essay will have spaces and alphanumeric characters only. It is guaranteed that there are no more than characters in the essay.
Output the modified essay, according to the rules above.
mITOCHONDRIA iS tHE pOWERHOUSE oF tHE cELL
MITOCHONDRIA IS THE POWERHOUSE OF THE CELL