fork download
  1. for i in range(7):
  2. for w in`input()`.split():print[w.title(),w][`w`in"'a'an'and'as'at'the'by'but'for'nor'in'of'on'or'to'up'"].strip("'"),
  3. print
Success #stdin #stdout 0s 9032KB
stdin
"the rule of thumb for title capitalization"
"programming puzzles and code golf"
"the many uses of the letter a"
"title"
"and and and"
"a an and as at but by for in nor of on or the to up"
"on computable numbers with an application to the entscheidungsproblem"
stdout
The Rule of Thumb for Title Capitalization
Programming Puzzles and Code Golf
The Many Uses of the Letter A
Title
And and And
A an and as at but by for in nor of on or the to Up
On Computable Numbers With an Application to the Entscheidungsproblem