Language: Ruby
Source code:
When you run it, it waits for several lines of text (finish with Ctrl-D on Linux or Ctrl-Z on Windows). Flag is correct strings written together.
How to run Ruby:
1. Download Ruby from ruby-lang.org
2. Run in console: ruby task.rb