Useful links: https://codeforces.com/blog/entry/69610
To send end of file (EOF) to the application: On mac: control+D
String concatenetion: https://josephmate.github.io/java/javascript/stringbuilder/2020/07/27/javascript-does-not-need-stringbuilder.html