Rewrite the program in Kotlin instead of Java.