package processor

fun toIntList(s: String): List<Int> {
    return s.split(" ").filter { it.isNotEmpty() }.map { it.toInt() }
}

fun toDoubleList(s: String): List<Double> {
    return s.split(" ").filter { it.isNotEmpty() }.map { it.toDouble() }
}

class Matrix(val items: Array<List<Double>>) {
    val rows: Int = items.size
    val columns: Int = if (items.isEmpty()) 0 else items[0].size

    operator fun plus(other: Matrix): Matrix {
        if (rows != other.rows) throw Exception("Could not sum matrix of different dimensions (rows)")
        if (columns != other.columns) throw Exception("Could not sum matrix of different dimensions (columns)")

        return Matrix(Array(rows) { items[it].zip(other.items[it]) { x, y -> x + y } })
    }

    operator fun times(scalar: Int): Matrix {
        return Matrix(Array(rows) { i -> List(columns) { j -> items[i][j] * scalar } })
    }

    operator fun times(other: Matrix): Matrix {
        if (columns != other.rows) throw Exception("Invalid matrix dimensions")
        return Matrix(Array(rows) { i -> List(other.columns) { j -> dotProduct(other.items, i, j) } })
    }

    private fun dotProduct(otherItems: Array<List<Double>>, thisRow: Int, otherColumn: Int): Double {
        var p = 0.0
        for (k in 0 until columns) {
            p += items[thisRow][k] * otherItems[k][otherColumn]
        }
        return p
    }

    override fun toString(): String {
        return items.joinToString("\n") { it.joinToString(" ") }
    }

    companion object {
        fun readFromStdin(name: String): Matrix {
            print("Enter size of $name matrix: ")
            val (rows, columns) = toIntList(readLine()!!)

            println("Enter $name matrix:")
            return Matrix(Array(rows) { toDoubleList(readLine()!!) })
        }
    }
}

fun main() {
    val actions = arrayListOf(
            "Exit",
            "Add matrices",
            "Multiply matrix to a constant",
            "Multiply matrices")

    val fs = arrayListOf(
            fun() {
                val a = Matrix.readFromStdin("first")
                val b = Matrix.readFromStdin("second")
                println("The sum result is: ")
                println(a + b)
            },
            fun() {
                val a = Matrix.readFromStdin("a")
                print("Enter a constant: ")
                val c = readLine()!!.toInt()
                println("The multiplication result is: ")
                println(a * c)
            },
            fun() {
                val a = Matrix.readFromStdin("first")
                val b = Matrix.readFromStdin("second")
                println("The multiplication result is: ")
                println(a * b)
            }
    )

    fun printActions() {
        for (i in 1..actions.lastIndex) {
            println("$i. ${actions[i]}")
        }
        println("0. ${actions[0]}")
    }

    runLoop@ while (true) {
        printActions()
        val action = readLine()!!.toInt()

        try {
            when (action) {
                in 1..3 -> fs[action - 1]()
                0 -> break@runLoop
                else -> throw Exception("Unknown action $action")
            }
        } catch (e: java.lang.Exception) {
            println("Error: ${e.message}")
        }
    }
}

Compiled from "Main.kt"
public final class processor.MainKt {
  public static final java.util.List<java.lang.Integer> toIntList(java.lang.String);
    Code:
       0: aload_0
       1: ldc           #10                 // String s
       3: invokestatic  #16                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: aload_0
       7: checkcast     #18                 // class java/lang/CharSequence
      10: iconst_1
      11: anewarray     #20                 // class java/lang/String
      14: astore_1
      15: aload_1
      16: iconst_0
      17: ldc           #22                 // String
      19: aastore
      20: aload_1
      21: iconst_0
      22: iconst_0
      23: bipush        6
      25: aconst_null
      26: invokestatic  #28                 // Method kotlin/text/StringsKt.split$default:(Ljava/lang/CharSequence;[Ljava/lang/String;ZIILjava/lang/Object;)Ljava/util/List;
      29: checkcast     #30                 // class java/lang/Iterable
      32: astore_1
      33: iconst_0
      34: istore_2
      35: aload_1
      36: astore_3
      37: new           #32                 // class java/util/ArrayList
      40: dup
      41: invokespecial #36                 // Method java/util/ArrayList."<init>":()V
      44: checkcast     #38                 // class java/util/Collection
      47: astore        4
      49: iconst_0
      50: istore        5
      52: aload_3
      53: invokeinterface #42,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
      58: astore        6
      60: aload         6
      62: invokeinterface #48,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
      67: ifeq          124
      70: aload         6
      72: invokeinterface #52,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
      77: astore        7
      79: aload         7
      81: checkcast     #20                 // class java/lang/String
      84: astore        8
      86: iconst_0
      87: istore        9
      89: aload         8
      91: checkcast     #18                 // class java/lang/CharSequence
      94: invokeinterface #56,  1           // InterfaceMethod java/lang/CharSequence.length:()I
      99: ifle          106
     102: iconst_1
     103: goto          107
     106: iconst_0
     107: nop
     108: ifeq          60
     111: aload         4
     113: aload         7
     115: invokeinterface #60,  2           // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     120: pop
     121: goto          60
     124: aload         4
     126: checkcast     #62                 // class java/util/List
     129: nop
     130: checkcast     #30                 // class java/lang/Iterable
     133: astore_1
     134: nop
     135: iconst_0
     136: istore_2
     137: aload_1
     138: astore_3
     139: new           #32                 // class java/util/ArrayList
     142: dup
     143: aload_1
     144: bipush        10
     146: invokestatic  #68                 // Method kotlin/collections/CollectionsKt.collectionSizeOrDefault:(Ljava/lang/Iterable;I)I
     149: invokespecial #71                 // Method java/util/ArrayList."<init>":(I)V
     152: checkcast     #38                 // class java/util/Collection
     155: astore        4
     157: iconst_0
     158: istore        5
     160: aload_3
     161: invokeinterface #42,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     166: astore        6
     168: aload         6
     170: invokeinterface #48,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     175: ifeq          222
     178: aload         6
     180: invokeinterface #52,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     185: astore        7
     187: aload         4
     189: aload         7
     191: checkcast     #20                 // class java/lang/String
     194: astore        8
     196: astore        10
     198: iconst_0
     199: istore        9
     201: aload         8
     203: invokestatic  #77                 // Method java/lang/Integer.parseInt:(Ljava/lang/String;)I
     206: nop
     207: invokestatic  #81                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     210: aload         10
     212: swap
     213: invokeinterface #60,  2           // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     218: pop
     219: goto          168
     222: aload         4
     224: checkcast     #62                 // class java/util/List
     227: nop
     228: areturn

  public static final java.util.List<java.lang.Double> toDoubleList(java.lang.String);
    Code:
       0: aload_0
       1: ldc           #10                 // String s
       3: invokestatic  #16                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: aload_0
       7: checkcast     #18                 // class java/lang/CharSequence
      10: iconst_1
      11: anewarray     #20                 // class java/lang/String
      14: astore_1
      15: aload_1
      16: iconst_0
      17: ldc           #22                 // String
      19: aastore
      20: aload_1
      21: iconst_0
      22: iconst_0
      23: bipush        6
      25: aconst_null
      26: invokestatic  #28                 // Method kotlin/text/StringsKt.split$default:(Ljava/lang/CharSequence;[Ljava/lang/String;ZIILjava/lang/Object;)Ljava/util/List;
      29: checkcast     #30                 // class java/lang/Iterable
      32: astore_1
      33: iconst_0
      34: istore_2
      35: aload_1
      36: astore_3
      37: new           #32                 // class java/util/ArrayList
      40: dup
      41: invokespecial #36                 // Method java/util/ArrayList."<init>":()V
      44: checkcast     #38                 // class java/util/Collection
      47: astore        4
      49: iconst_0
      50: istore        5
      52: aload_3
      53: invokeinterface #42,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
      58: astore        6
      60: aload         6
      62: invokeinterface #48,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
      67: ifeq          124
      70: aload         6
      72: invokeinterface #52,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
      77: astore        7
      79: aload         7
      81: checkcast     #20                 // class java/lang/String
      84: astore        8
      86: iconst_0
      87: istore        9
      89: aload         8
      91: checkcast     #18                 // class java/lang/CharSequence
      94: invokeinterface #56,  1           // InterfaceMethod java/lang/CharSequence.length:()I
      99: ifle          106
     102: iconst_1
     103: goto          107
     106: iconst_0
     107: nop
     108: ifeq          60
     111: aload         4
     113: aload         7
     115: invokeinterface #60,  2           // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     120: pop
     121: goto          60
     124: aload         4
     126: checkcast     #62                 // class java/util/List
     129: nop
     130: checkcast     #30                 // class java/lang/Iterable
     133: astore_1
     134: nop
     135: iconst_0
     136: istore_2
     137: aload_1
     138: astore_3
     139: new           #32                 // class java/util/ArrayList
     142: dup
     143: aload_1
     144: bipush        10
     146: invokestatic  #68                 // Method kotlin/collections/CollectionsKt.collectionSizeOrDefault:(Ljava/lang/Iterable;I)I
     149: invokespecial #71                 // Method java/util/ArrayList."<init>":(I)V
     152: checkcast     #38                 // class java/util/Collection
     155: astore        4
     157: iconst_0
     158: istore        5
     160: aload_3
     161: invokeinterface #42,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     166: astore        6
     168: aload         6
     170: invokeinterface #48,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     175: ifeq          222
     178: aload         6
     180: invokeinterface #52,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     185: astore        7
     187: aload         4
     189: aload         7
     191: checkcast     #20                 // class java/lang/String
     194: astore        8
     196: astore        10
     198: iconst_0
     199: istore        9
     201: aload         8
     203: invokestatic  #108                // Method java/lang/Double.parseDouble:(Ljava/lang/String;)D
     206: nop
     207: invokestatic  #111                // Method java/lang/Double.valueOf:(D)Ljava/lang/Double;
     210: aload         10
     212: swap
     213: invokeinterface #60,  2           // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     218: pop
     219: goto          168
     222: aload         4
     224: checkcast     #62                 // class java/util/List
     227: nop
     228: areturn

  public static final void main();
    Code:
       0: iconst_4
       1: anewarray     #20                 // class java/lang/String
       4: astore_1
       5: aload_1
       6: iconst_0
       7: ldc           #118                // String Exit
       9: aastore
      10: aload_1
      11: iconst_1
      12: ldc           #120                // String Add matrices
      14: aastore
      15: aload_1
      16: iconst_2
      17: ldc           #122                // String Multiply matrix to a constant
      19: aastore
      20: aload_1
      21: iconst_3
      22: ldc           #124                // String Multiply matrices
      24: aastore
      25: aload_1
      26: invokestatic  #128                // Method kotlin/collections/CollectionsKt.arrayListOf:([Ljava/lang/Object;)Ljava/util/ArrayList;
      29: astore_0
      30: iconst_3
      31: anewarray     #130                // class kotlin/jvm/functions/Function0
      34: astore_2
      35: aload_2
      36: iconst_0
      37: invokedynamic #148,  0            // InvokeDynamic #0:invoke:()Lkotlin/jvm/functions/Function0;
      42: aastore
      43: aload_2
      44: iconst_1
      45: invokedynamic #153,  0            // InvokeDynamic #1:invoke:()Lkotlin/jvm/functions/Function0;
      50: aastore
      51: aload_2
      52: iconst_2
      53: invokedynamic #158,  0            // InvokeDynamic #2:invoke:()Lkotlin/jvm/functions/Function0;
      58: aastore
      59: aload_2
      60: invokestatic  #128                // Method kotlin/collections/CollectionsKt.arrayListOf:([Ljava/lang/Object;)Ljava/util/ArrayList;
      63: astore_1
      64: nop
      65: aload_0
      66: invokestatic  #162                // Method main$printActions:(Ljava/util/ArrayList;)V
      69: invokestatic  #168                // Method kotlin/io/ConsoleKt.readLine:()Ljava/lang/String;
      72: dup
      73: invokestatic  #172                // Method kotlin/jvm/internal/Intrinsics.checkNotNull:(Ljava/lang/Object;)V
      76: invokestatic  #77                 // Method java/lang/Integer.parseInt:(Ljava/lang/String;)I
      79: istore_2
      80: nop
      81: iload_2
      82: istore_3
      83: iconst_1
      84: iload_3
      85: if_icmpgt     101
      88: iload_3
      89: iconst_4
      90: if_icmpge     97
      93: iconst_1
      94: goto          102
      97: iconst_0
      98: goto          102
     101: iconst_0
     102: ifeq          124
     105: aload_1
     106: iload_2
     107: iconst_1
     108: isub
     109: invokevirtual #176                // Method java/util/ArrayList.get:(I)Ljava/lang/Object;
     112: checkcast     #130                // class kotlin/jvm/functions/Function0
     115: invokeinterface #178,  1          // InterfaceMethod kotlin/jvm/functions/Function0.invoke:()Ljava/lang/Object;
     120: pop
     121: goto          64
     124: iload_3
     125: ifeq          188
     128: new           #116                // class java/lang/Exception
     131: dup
     132: new           #180                // class java/lang/StringBuilder
     135: dup
     136: invokespecial #181                // Method java/lang/StringBuilder."<init>":()V
     139: ldc           #183                // String Unknown action
     141: invokevirtual #187                // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
     144: iload_2
     145: invokevirtual #190                // Method java/lang/StringBuilder.append:(I)Ljava/lang/StringBuilder;
     148: invokevirtual #193                // Method java/lang/StringBuilder.toString:()Ljava/lang/String;
     151: invokespecial #196                // Method java/lang/Exception."<init>":(Ljava/lang/String;)V
     154: athrow
     155: astore_3
     156: new           #180                // class java/lang/StringBuilder
     159: dup
     160: invokespecial #181                // Method java/lang/StringBuilder."<init>":()V
     163: ldc           #198                // String Error:
     165: invokevirtual #187                // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
     168: aload_3
     169: invokevirtual #201                // Method java/lang/Exception.getMessage:()Ljava/lang/String;
     172: invokevirtual #187                // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
     175: invokevirtual #193                // Method java/lang/StringBuilder.toString:()Ljava/lang/String;
     178: getstatic     #207                // Field java/lang/System.out:Ljava/io/PrintStream;
     181: swap
     182: invokevirtual #212                // Method java/io/PrintStream.println:(Ljava/lang/Object;)V
     185: goto          64
     188: return
    Exception table:
       from    to  target type
          80   155   155   Class java/lang/Exception

  public static void main(java.lang.String[]);
    Code:
       0: invokestatic  #221                // Method main:()V
       3: return

  private static final kotlin.Unit main$lambda$4();
    Code:
       0: getstatic     #229                // Field processor/Matrix.Companion:Lprocessor/Matrix$Companion;
       3: ldc           #231                // String first
       5: invokevirtual #237                // Method processor/Matrix$Companion.readFromStdin:(Ljava/lang/String;)Lprocessor/Matrix;
       8: astore_0
       9: getstatic     #229                // Field processor/Matrix.Companion:Lprocessor/Matrix$Companion;
      12: ldc           #239                // String second
      14: invokevirtual #237                // Method processor/Matrix$Companion.readFromStdin:(Ljava/lang/String;)Lprocessor/Matrix;
      17: astore_1
      18: ldc           #241                // String The sum result is:
      20: getstatic     #207                // Field java/lang/System.out:Ljava/io/PrintStream;
      23: swap
      24: invokevirtual #212                // Method java/io/PrintStream.println:(Ljava/lang/Object;)V
      27: aload_0
      28: aload_1
      29: invokevirtual #245                // Method processor/Matrix.plus:(Lprocessor/Matrix;)Lprocessor/Matrix;
      32: getstatic     #207                // Field java/lang/System.out:Ljava/io/PrintStream;
      35: swap
      36: invokevirtual #212                // Method java/io/PrintStream.println:(Ljava/lang/Object;)V
      39: getstatic     #251                // Field kotlin/Unit.INSTANCE:Lkotlin/Unit;
      42: areturn

  private static final kotlin.Unit main$lambda$5();
    Code:
       0: getstatic     #229                // Field processor/Matrix.Companion:Lprocessor/Matrix$Companion;
       3: ldc           #255                // String a
       5: invokevirtual #237                // Method processor/Matrix$Companion.readFromStdin:(Ljava/lang/String;)Lprocessor/Matrix;
       8: astore_0
       9: ldc_w         #257                // String Enter a constant:
      12: getstatic     #207                // Field java/lang/System.out:Ljava/io/PrintStream;
      15: swap
      16: invokevirtual #260                // Method java/io/PrintStream.print:(Ljava/lang/Object;)V
      19: invokestatic  #168                // Method kotlin/io/ConsoleKt.readLine:()Ljava/lang/String;
      22: dup
      23: invokestatic  #172                // Method kotlin/jvm/internal/Intrinsics.checkNotNull:(Ljava/lang/Object;)V
      26: invokestatic  #77                 // Method java/lang/Integer.parseInt:(Ljava/lang/String;)I
      29: istore_1
      30: ldc_w         #262                // String The multiplication result is:
      33: getstatic     #207                // Field java/lang/System.out:Ljava/io/PrintStream;
      36: swap
      37: invokevirtual #212                // Method java/io/PrintStream.println:(Ljava/lang/Object;)V
      40: aload_0
      41: iload_1
      42: invokevirtual #266                // Method processor/Matrix.times:(I)Lprocessor/Matrix;
      45: getstatic     #207                // Field java/lang/System.out:Ljava/io/PrintStream;
      48: swap
      49: invokevirtual #212                // Method java/io/PrintStream.println:(Ljava/lang/Object;)V
      52: getstatic     #251                // Field kotlin/Unit.INSTANCE:Lkotlin/Unit;
      55: areturn

  private static final kotlin.Unit main$lambda$6();
    Code:
       0: getstatic     #229                // Field processor/Matrix.Companion:Lprocessor/Matrix$Companion;
       3: ldc           #231                // String first
       5: invokevirtual #237                // Method processor/Matrix$Companion.readFromStdin:(Ljava/lang/String;)Lprocessor/Matrix;
       8: astore_0
       9: getstatic     #229                // Field processor/Matrix.Companion:Lprocessor/Matrix$Companion;
      12: ldc           #239                // String second
      14: invokevirtual #237                // Method processor/Matrix$Companion.readFromStdin:(Ljava/lang/String;)Lprocessor/Matrix;
      17: astore_1
      18: ldc_w         #262                // String The multiplication result is:
      21: getstatic     #207                // Field java/lang/System.out:Ljava/io/PrintStream;
      24: swap
      25: invokevirtual #212                // Method java/io/PrintStream.println:(Ljava/lang/Object;)V
      28: aload_0
      29: aload_1
      30: invokevirtual #269                // Method processor/Matrix.times:(Lprocessor/Matrix;)Lprocessor/Matrix;
      33: getstatic     #207                // Field java/lang/System.out:Ljava/io/PrintStream;
      36: swap
      37: invokevirtual #212                // Method java/io/PrintStream.println:(Ljava/lang/Object;)V
      40: getstatic     #251                // Field kotlin/Unit.INSTANCE:Lkotlin/Unit;
      43: areturn

  private static final void main$printActions(java.util.ArrayList<java.lang.String>);
    Code:
       0: iconst_1
       1: istore_1
       2: aload_0
       3: checkcast     #62                 // class java/util/List
       6: invokestatic  #274                // Method kotlin/collections/CollectionsKt.getLastIndex:(Ljava/util/List;)I
       9: istore_2
      10: iload_1
      11: iload_2
      12: if_icmpgt     64
      15: new           #180                // class java/lang/StringBuilder
      18: dup
      19: invokespecial #181                // Method java/lang/StringBuilder."<init>":()V
      22: iload_1
      23: invokevirtual #190                // Method java/lang/StringBuilder.append:(I)Ljava/lang/StringBuilder;
      26: ldc_w         #276                // String .
      29: invokevirtual #187                // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
      32: aload_0
      33: iload_1
      34: invokevirtual #176                // Method java/util/ArrayList.get:(I)Ljava/lang/Object;
      37: checkcast     #20                 // class java/lang/String
      40: invokevirtual #187                // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
      43: invokevirtual #193                // Method java/lang/StringBuilder.toString:()Ljava/lang/String;
      46: getstatic     #207                // Field java/lang/System.out:Ljava/io/PrintStream;
      49: swap
      50: invokevirtual #212                // Method java/io/PrintStream.println:(Ljava/lang/Object;)V
      53: iload_1
      54: iload_2
      55: if_icmpeq     64
      58: iinc          1, 1
      61: goto          15
      64: new           #180                // class java/lang/StringBuilder
      67: dup
      68: invokespecial #181                // Method java/lang/StringBuilder."<init>":()V
      71: ldc_w         #278                // String 0.
      74: invokevirtual #187                // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
      77: aload_0
      78: iconst_0
      79: invokevirtual #176                // Method java/util/ArrayList.get:(I)Ljava/lang/Object;
      82: checkcast     #20                 // class java/lang/String
      85: invokevirtual #187                // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
      88: invokevirtual #193                // Method java/lang/StringBuilder.toString:()Ljava/lang/String;
      91: getstatic     #207                // Field java/lang/System.out:Ljava/io/PrintStream;
      94: swap
      95: invokevirtual #212                // Method java/io/PrintStream.println:(Ljava/lang/Object;)V
      98: return
}


package day08

import java.io.File

fun main() {
    val input = File("./day08.txt").readLines(Charsets.UTF_8)

    val screen = Array(6) { Array(50) { '.' } }
    val rectDigits = """.* (\d+)x(\d+)""".toRegex()
    val rotateDigits = """.*=(\d+) by (\d+)""".toRegex()

    input.forEach { instruction ->
        when {
            instruction.startsWith("rect") -> {
                val matchResult = rectDigits.find(instruction)!!
                val (xStr, yStr) = matchResult.destructured
                val x = xStr.toInt() - 1
                val y = yStr.toInt() - 1

                for (i in 0 .. y) {
                    for (j in 0 .. x) {
                        screen[i][j] = '#'
                    }
                }
            }
            instruction.startsWith("rotate row") -> {
                val matchResult = rotateDigits.find(instruction)!!
                val (indexStr, amountStr) = matchResult.destructured
                val index = indexStr.toInt()
                val amount = amountStr.toInt()

                screen[index] = screen[index].slice(50 - amount..49).toTypedArray() +
                        screen[index].slice(0..49 - amount).toTypedArray()
            }
            instruction.startsWith("rotate column") -> {
                val matchResult = rotateDigits.find(instruction)!!
                val (indexStr, amountStr) = matchResult.destructured
                val index = indexStr.toInt()
                val amount = amountStr.toInt()
                var col = CharArray(6) { '.' }

                for (i in 0 .. 5) {
                    col[i] = screen[i][index]
                }
                col = col.slice(6 - amount .. 5).toCharArray() + col.slice(0 .. 5 - amount)
                for (i in 0 .. 5) {
                    screen[i][index] = col[i]
                }

            }
        }
    }

    val totalLit = screen.flatten().fold(0) { acc, next -> acc + if (next == '#') 1 else 0 }
    println(totalLit)

    screen.forEach { println(it.joinToString("")) }
}

Compiled from "Main.kt"
public final class day08.MainKt {
  public static final void main();
    Code:
       0: new           #8                  // class java/io/File
       3: dup
       4: ldc           #10                 // String ./day08.txt
       6: invokespecial #14                 // Method java/io/File."<init>":(Ljava/lang/String;)V
       9: getstatic     #20                 // Field kotlin/text/Charsets.UTF_8:Ljava/nio/charset/Charset;
      12: invokestatic  #26                 // Method kotlin/io/FilesKt.readLines:(Ljava/io/File;Ljava/nio/charset/Charset;)Ljava/util/List;
      15: astore_0
      16: iconst_0
      17: istore_2
      18: bipush        6
      20: anewarray     #28                 // class "[Ljava/lang/Character;"
      23: astore_3
      24: iload_2
      25: bipush        6
      27: if_icmpge     90
      30: iload_2
      31: istore        4
      33: aload_3
      34: iload         4
      36: iconst_0
      37: istore        5
      39: bipush        50
      41: anewarray     #30                 // class java/lang/Character
      44: astore        6
      46: istore        21
      48: astore        20
      50: iload         5
      52: bipush        50
      54: if_icmpge     77
      57: iload         5
      59: istore        7
      61: aload         6
      63: iload         7
      65: bipush        46
      67: invokestatic  #34                 // Method java/lang/Character.valueOf:(C)Ljava/lang/Character;
      70: aastore
      71: iinc          5, 1
      74: goto          50
      77: aload         20
      79: iload         21
      81: aload         6
      83: aastore
      84: iinc          2, 1
      87: goto          24
      90: aload_3
      91: astore_1
      92: new           #36                 // class kotlin/text/Regex
      95: dup
      96: ldc           #38                 // String .* (\\d+)x(\\d+)
      98: invokespecial #39                 // Method kotlin/text/Regex."<init>":(Ljava/lang/String;)V
     101: astore_2
     102: new           #36                 // class kotlin/text/Regex
     105: dup
     106: ldc           #41                 // String .*=(\\d+) by (\\d+)
     108: invokespecial #39                 // Method kotlin/text/Regex."<init>":(Ljava/lang/String;)V
     111: astore_3
     112: aload_0
     113: checkcast     #43                 // class java/lang/Iterable
     116: astore        4
     118: iconst_0
     119: istore        5
     121: aload         4
     123: invokeinterface #47,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     128: astore        6
     130: aload         6
     132: invokeinterface #53,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     137: ifeq          760
     140: aload         6
     142: invokeinterface #57,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     147: astore        7
     149: aload         7
     151: checkcast     #59                 // class java/lang/String
     154: astore        8
     156: iconst_0
     157: istore        9
     159: nop
     160: aload         8
     162: ldc           #61                 // String rect
     164: iconst_0
     165: iconst_2
     166: aconst_null
     167: invokestatic  #67                 // Method kotlin/text/StringsKt.startsWith$default:(Ljava/lang/String;Ljava/lang/String;ZILjava/lang/Object;)Z
     170: ifeq          318
     173: aload_2
     174: aload         8
     176: checkcast     #69                 // class java/lang/CharSequence
     179: iconst_0
     180: iconst_2
     181: aconst_null
     182: invokestatic  #73                 // Method kotlin/text/Regex.find$default:(Lkotlin/text/Regex;Ljava/lang/CharSequence;IILjava/lang/Object;)Lkotlin/text/MatchResult;
     185: dup
     186: invokestatic  #79                 // Method kotlin/jvm/internal/Intrinsics.checkNotNull:(Ljava/lang/Object;)V
     189: astore        10
     191: aload         10
     193: invokeinterface #85,  1           // InterfaceMethod kotlin/text/MatchResult.getDestructured:()Lkotlin/text/MatchResult$Destructured;
     198: astore        11
     200: aload         11
     202: invokevirtual #91                 // Method kotlin/text/MatchResult$Destructured.getMatch:()Lkotlin/text/MatchResult;
     205: invokeinterface #95,  1           // InterfaceMethod kotlin/text/MatchResult.getGroupValues:()Ljava/util/List;
     210: iconst_1
     211: invokeinterface #101,  2          // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     216: checkcast     #59                 // class java/lang/String
     219: astore        12
     221: aload         11
     223: invokevirtual #91                 // Method kotlin/text/MatchResult$Destructured.getMatch:()Lkotlin/text/MatchResult;
     226: invokeinterface #95,  1           // InterfaceMethod kotlin/text/MatchResult.getGroupValues:()Ljava/util/List;
     231: iconst_2
     232: invokeinterface #101,  2          // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     237: checkcast     #59                 // class java/lang/String
     240: astore        13
     242: aload         12
     244: invokestatic  #107                // Method java/lang/Integer.parseInt:(Ljava/lang/String;)I
     247: iconst_1
     248: isub
     249: istore        14
     251: aload         13
     253: invokestatic  #107                // Method java/lang/Integer.parseInt:(Ljava/lang/String;)I
     256: iconst_1
     257: isub
     258: istore        15
     260: iconst_0
     261: istore        16
     263: iload         16
     265: iload         15
     267: if_icmpgt     755
     270: iconst_0
     271: istore        17
     273: iload         17
     275: iload         14
     277: if_icmpgt     305
     280: aload_1
     281: iload         16
     283: aaload
     284: iload         17
     286: bipush        35
     288: invokestatic  #34                 // Method java/lang/Character.valueOf:(C)Ljava/lang/Character;
     291: aastore
     292: iload         17
     294: iload         14
     296: if_icmpeq     305
     299: iinc          17, 1
     302: goto          280
     305: iload         16
     307: iload         15
     309: if_icmpeq     755
     312: iinc          16, 1
     315: goto          270
     318: aload         8
     320: ldc           #109                // String rotate row
     322: iconst_0
     323: iconst_2
     324: aconst_null
     325: invokestatic  #67                 // Method kotlin/text/StringsKt.startsWith$default:(Ljava/lang/String;Ljava/lang/String;ZILjava/lang/Object;)Z
     328: ifeq          511
     331: aload_3
     332: aload         8
     334: checkcast     #69                 // class java/lang/CharSequence
     337: iconst_0
     338: iconst_2
     339: aconst_null
     340: invokestatic  #73                 // Method kotlin/text/Regex.find$default:(Lkotlin/text/Regex;Ljava/lang/CharSequence;IILjava/lang/Object;)Lkotlin/text/MatchResult;
     343: dup
     344: invokestatic  #79                 // Method kotlin/jvm/internal/Intrinsics.checkNotNull:(Ljava/lang/Object;)V
     347: astore        10
     349: aload         10
     351: invokeinterface #85,  1           // InterfaceMethod kotlin/text/MatchResult.getDestructured:()Lkotlin/text/MatchResult$Destructured;
     356: astore        11
     358: aload         11
     360: invokevirtual #91                 // Method kotlin/text/MatchResult$Destructured.getMatch:()Lkotlin/text/MatchResult;
     363: invokeinterface #95,  1           // InterfaceMethod kotlin/text/MatchResult.getGroupValues:()Ljava/util/List;
     368: iconst_1
     369: invokeinterface #101,  2          // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     374: checkcast     #59                 // class java/lang/String
     377: astore        12
     379: aload         11
     381: invokevirtual #91                 // Method kotlin/text/MatchResult$Destructured.getMatch:()Lkotlin/text/MatchResult;
     384: invokeinterface #95,  1           // InterfaceMethod kotlin/text/MatchResult.getGroupValues:()Ljava/util/List;
     389: iconst_2
     390: invokeinterface #101,  2          // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     395: checkcast     #59                 // class java/lang/String
     398: astore        13
     400: aload         12
     402: invokestatic  #107                // Method java/lang/Integer.parseInt:(Ljava/lang/String;)I
     405: istore        14
     407: aload         13
     409: invokestatic  #107                // Method java/lang/Integer.parseInt:(Ljava/lang/String;)I
     412: istore        15
     414: aload_1
     415: iload         14
     417: aload_1
     418: iload         14
     420: aaload
     421: new           #111                // class kotlin/ranges/IntRange
     424: dup
     425: bipush        50
     427: iload         15
     429: isub
     430: bipush        49
     432: invokespecial #114                // Method kotlin/ranges/IntRange."<init>":(II)V
     435: invokestatic  #120                // Method kotlin/collections/ArraysKt.slice:([Ljava/lang/Object;Lkotlin/ranges/IntRange;)Ljava/util/List;
     438: checkcast     #122                // class java/util/Collection
     441: astore        16
     443: iconst_0
     444: istore        17
     446: aload         16
     448: astore        18
     450: aload         18
     452: iconst_0
     453: anewarray     #30                 // class java/lang/Character
     456: invokeinterface #126,  2          // InterfaceMethod java/util/Collection.toArray:([Ljava/lang/Object;)[Ljava/lang/Object;
     461: aload_1
     462: iload         14
     464: aaload
     465: new           #111                // class kotlin/ranges/IntRange
     468: dup
     469: iconst_0
     470: bipush        49
     472: iload         15
     474: isub
     475: invokespecial #114                // Method kotlin/ranges/IntRange."<init>":(II)V
     478: invokestatic  #120                // Method kotlin/collections/ArraysKt.slice:([Ljava/lang/Object;Lkotlin/ranges/IntRange;)Ljava/util/List;
     481: checkcast     #122                // class java/util/Collection
     484: astore        16
     486: iconst_0
     487: istore        17
     489: aload         16
     491: astore        18
     493: aload         18
     495: iconst_0
     496: anewarray     #30                 // class java/lang/Character
     499: invokeinterface #126,  2          // InterfaceMethod java/util/Collection.toArray:([Ljava/lang/Object;)[Ljava/lang/Object;
     504: invokestatic  #130                // Method kotlin/collections/ArraysKt.plus:([Ljava/lang/Object;[Ljava/lang/Object;)[Ljava/lang/Object;
     507: aastore
     508: goto          755
     511: aload         8
     513: ldc           #132                // String rotate column
     515: iconst_0
     516: iconst_2
     517: aconst_null
     518: invokestatic  #67                 // Method kotlin/text/StringsKt.startsWith$default:(Ljava/lang/String;Ljava/lang/String;ZILjava/lang/Object;)Z
     521: ifeq          755
     524: aload_3
     525: aload         8
     527: checkcast     #69                 // class java/lang/CharSequence
     530: iconst_0
     531: iconst_2
     532: aconst_null
     533: invokestatic  #73                 // Method kotlin/text/Regex.find$default:(Lkotlin/text/Regex;Ljava/lang/CharSequence;IILjava/lang/Object;)Lkotlin/text/MatchResult;
     536: dup
     537: invokestatic  #79                 // Method kotlin/jvm/internal/Intrinsics.checkNotNull:(Ljava/lang/Object;)V
     540: astore        10
     542: aload         10
     544: invokeinterface #85,  1           // InterfaceMethod kotlin/text/MatchResult.getDestructured:()Lkotlin/text/MatchResult$Destructured;
     549: astore        11
     551: aload         11
     553: invokevirtual #91                 // Method kotlin/text/MatchResult$Destructured.getMatch:()Lkotlin/text/MatchResult;
     556: invokeinterface #95,  1           // InterfaceMethod kotlin/text/MatchResult.getGroupValues:()Ljava/util/List;
     561: iconst_1
     562: invokeinterface #101,  2          // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     567: checkcast     #59                 // class java/lang/String
     570: astore        12
     572: aload         11
     574: invokevirtual #91                 // Method kotlin/text/MatchResult$Destructured.getMatch:()Lkotlin/text/MatchResult;
     577: invokeinterface #95,  1           // InterfaceMethod kotlin/text/MatchResult.getGroupValues:()Ljava/util/List;
     582: iconst_2
     583: invokeinterface #101,  2          // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     588: checkcast     #59                 // class java/lang/String
     591: astore        13
     593: aload         12
     595: invokestatic  #107                // Method java/lang/Integer.parseInt:(Ljava/lang/String;)I
     598: istore        14
     600: aload         13
     602: invokestatic  #107                // Method java/lang/Integer.parseInt:(Ljava/lang/String;)I
     605: istore        15
     607: iconst_0
     608: istore        17
     610: bipush        6
     612: newarray       char
     614: astore        18
     616: iload         17
     618: bipush        6
     620: if_icmpge     640
     623: iload         17
     625: istore        19
     627: aload         18
     629: iload         19
     631: bipush        46
     633: castore
     634: iinc          17, 1
     637: goto          616
     640: aload         18
     642: astore        16
     644: iconst_0
     645: istore        17
     647: iload         17
     649: bipush        6
     651: if_icmpge     675
     654: aload         16
     656: iload         17
     658: aload_1
     659: iload         17
     661: aaload
     662: iload         14
     664: aaload
     665: invokevirtual #136                // Method java/lang/Character.charValue:()C
     668: castore
     669: iinc          17, 1
     672: goto          647
     675: aload         16
     677: new           #111                // class kotlin/ranges/IntRange
     680: dup
     681: bipush        6
     683: iload         15
     685: isub
     686: iconst_5
     687: invokespecial #114                // Method kotlin/ranges/IntRange."<init>":(II)V
     690: invokestatic  #139                // Method kotlin/collections/ArraysKt.slice:([CLkotlin/ranges/IntRange;)Ljava/util/List;
     693: checkcast     #122                // class java/util/Collection
     696: invokestatic  #145                // Method kotlin/collections/CollectionsKt.toCharArray:(Ljava/util/Collection;)[C
     699: aload         16
     701: new           #111                // class kotlin/ranges/IntRange
     704: dup
     705: iconst_0
     706: iconst_5
     707: iload         15
     709: isub
     710: invokespecial #114                // Method kotlin/ranges/IntRange."<init>":(II)V
     713: invokestatic  #139                // Method kotlin/collections/ArraysKt.slice:([CLkotlin/ranges/IntRange;)Ljava/util/List;
     716: checkcast     #122                // class java/util/Collection
     719: invokestatic  #148                // Method kotlin/collections/ArraysKt.plus:([CLjava/util/Collection;)[C
     722: astore        16
     724: iconst_0
     725: istore        17
     727: iload         17
     729: bipush        6
     731: if_icmpge     755
     734: aload_1
     735: iload         17
     737: aaload
     738: iload         14
     740: aload         16
     742: iload         17
     744: caload
     745: invokestatic  #34                 // Method java/lang/Character.valueOf:(C)Ljava/lang/Character;
     748: aastore
     749: iinc          17, 1
     752: goto          727
     755: nop
     756: nop
     757: goto          130
     760: nop
     761: aload_1
     762: invokestatic  #152                // Method kotlin/collections/ArraysKt.flatten:([[Ljava/lang/Object;)Ljava/util/List;
     765: checkcast     #43                 // class java/lang/Iterable
     768: astore        5
     770: iconst_0
     771: istore        6
     773: iconst_0
     774: istore        7
     776: iload         6
     778: istore        8
     780: aload         5
     782: invokeinterface #47,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     787: astore        9
     789: aload         9
     791: invokeinterface #53,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     796: ifeq          845
     799: aload         9
     801: invokeinterface #57,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     806: astore        10
     808: iload         8
     810: aload         10
     812: checkcast     #30                 // class java/lang/Character
     815: invokevirtual #136                // Method java/lang/Character.charValue:()C
     818: istore        11
     820: istore        12
     822: iconst_0
     823: istore        13
     825: iload         12
     827: iload         11
     829: bipush        35
     831: if_icmpne     838
     834: iconst_1
     835: goto          839
     838: iconst_0
     839: iadd
     840: istore        8
     842: goto          789
     845: iload         8
     847: istore        4
     849: getstatic     #158                // Field java/lang/System.out:Ljava/io/PrintStream;
     852: iload         4
     854: invokevirtual #164                // Method java/io/PrintStream.println:(I)V
     857: aload_1
     858: checkcast     #166                // class "[Ljava/lang/Object;"
     861: astore        5
     863: iconst_0
     864: istore        6
     866: iconst_0
     867: istore        7
     869: aload         5
     871: arraylength
     872: istore        8
     874: iload         7
     876: iload         8
     878: if_icmpge     931
     881: aload         5
     883: iload         7
     885: aaload
     886: astore        9
     888: aload         9
     890: checkcast     #28                 // class "[Ljava/lang/Character;"
     893: astore        10
     895: iconst_0
     896: istore        11
     898: aload         10
     900: ldc           #168                // String
     902: checkcast     #69                 // class java/lang/CharSequence
     905: aconst_null
     906: aconst_null
     907: iconst_0
     908: aconst_null
     909: aconst_null
     910: bipush        62
     912: aconst_null
     913: invokestatic  #172                // Method kotlin/collections/ArraysKt.joinToString$default:([Ljava/lang/Object;Ljava/lang/CharSequence;Ljava/lang/CharSequence;Ljava/lang/CharSequence;ILjava/lang/CharSequence;Lkotlin/jvm/functions/Function1;ILjava/lang/Object;)Ljava/lang/String;
     916: getstatic     #158                // Field java/lang/System.out:Ljava/io/PrintStream;
     919: swap
     920: invokevirtual #174                // Method java/io/PrintStream.println:(Ljava/lang/Object;)V
     923: nop
     924: nop
     925: iinc          7, 1
     928: goto          874
     931: nop
     932: return

  public static void main(java.lang.String[]);
    Code:
       0: invokestatic  #223                // Method main:()V
       3: return
}


package day03

import java.io.File

fun main() {
    val input = File("./day03.txt").readLines(Charsets.UTF_8)

    val valid = input.filter { line ->
        val sides = line.trim().split("\\s+".toRegex()).map { it.toInt() }
        val (one, two, three) = Triple(sides[0], sides[1], sides[2])

        one + two > three && one + three > two && two + three > one
    }

    println("Part 1 valid: ${valid.size}")

    val valid1 = input.map { line ->
        val sides = line.trim().split("\\s+".toRegex()).map { it.toInt() }
        sides[0]
    }.chunked(3).filter { chunk ->
        val (one, two, three) = Triple(chunk[0], chunk[1], chunk[2])
        one + two > three && one + three > two && two + three > one
    }.size
    val valid2 = input.map { line ->
        val sides = line.trim().split("\\s+".toRegex()).map { it.toInt() }
        sides[1]
    }.chunked(3).filter { chunk ->
        val (one, two, three) = Triple(chunk[0], chunk[1], chunk[2])
        one + two > three && one + three > two && two + three > one
    }.size
    val valid3 = input.map { line ->
        val sides = line.trim().split("\\s+".toRegex()).map { it.toInt() }
        sides[2]
    }.chunked(3).filter { chunk ->
        val (one, two, three) = Triple(chunk[0], chunk[1], chunk[2])
        one + two > three && one + three > two && two + three > one
    }.size
    println("Part 2 valid ${valid1 + valid2 + valid3}")
}

Compiled from "Main.kt"
public final class day03.MainKt {
  public static final void main();
    Code:
       0: new           #8                  // class java/io/File
       3: dup
       4: ldc           #10                 // String ./day03.txt
       6: invokespecial #14                 // Method java/io/File."<init>":(Ljava/lang/String;)V
       9: getstatic     #20                 // Field kotlin/text/Charsets.UTF_8:Ljava/nio/charset/Charset;
      12: invokestatic  #26                 // Method kotlin/io/FilesKt.readLines:(Ljava/io/File;Ljava/nio/charset/Charset;)Ljava/util/List;
      15: astore_0
      16: aload_0
      17: checkcast     #28                 // class java/lang/Iterable
      20: astore_2
      21: iconst_0
      22: istore_3
      23: aload_2
      24: astore        4
      26: new           #30                 // class java/util/ArrayList
      29: dup
      30: invokespecial #32                 // Method java/util/ArrayList."<init>":()V
      33: checkcast     #34                 // class java/util/Collection
      36: astore        5
      38: iconst_0
      39: istore        6
      41: aload         4
      43: invokeinterface #38,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
      48: astore        7
      50: aload         7
      52: invokeinterface #44,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
      57: ifeq          347
      60: aload         7
      62: invokeinterface #48,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
      67: astore        8
      69: aload         8
      71: checkcast     #50                 // class java/lang/String
      74: astore        9
      76: iconst_0
      77: istore        10
      79: aload         9
      81: checkcast     #52                 // class java/lang/CharSequence
      84: invokestatic  #58                 // Method kotlin/text/StringsKt.trim:(Ljava/lang/CharSequence;)Ljava/lang/CharSequence;
      87: invokevirtual #62                 // Method java/lang/Object.toString:()Ljava/lang/String;
      90: checkcast     #52                 // class java/lang/CharSequence
      93: astore        11
      95: new           #64                 // class kotlin/text/Regex
      98: dup
      99: ldc           #66                 // String \\s+
     101: invokespecial #67                 // Method kotlin/text/Regex."<init>":(Ljava/lang/String;)V
     104: astore        12
     106: iconst_0
     107: istore        13
     109: aload         12
     111: aload         11
     113: iload         13
     115: invokevirtual #71                 // Method kotlin/text/Regex.split:(Ljava/lang/CharSequence;I)Ljava/util/List;
     118: checkcast     #28                 // class java/lang/Iterable
     121: astore        11
     123: nop
     124: iconst_0
     125: istore        12
     127: aload         11
     129: astore        13
     131: new           #30                 // class java/util/ArrayList
     134: dup
     135: aload         11
     137: bipush        10
     139: invokestatic  #77                 // Method kotlin/collections/CollectionsKt.collectionSizeOrDefault:(Ljava/lang/Iterable;I)I
     142: invokespecial #80                 // Method java/util/ArrayList."<init>":(I)V
     145: checkcast     #34                 // class java/util/Collection
     148: astore        14
     150: iconst_0
     151: istore        15
     153: aload         13
     155: invokeinterface #38,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     160: astore        16
     162: aload         16
     164: invokeinterface #44,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     169: ifeq          216
     172: aload         16
     174: invokeinterface #48,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     179: astore        17
     181: aload         14
     183: aload         17
     185: checkcast     #50                 // class java/lang/String
     188: astore        18
     190: astore        19
     192: iconst_0
     193: istore        20
     195: aload         18
     197: invokestatic  #86                 // Method java/lang/Integer.parseInt:(Ljava/lang/String;)I
     200: nop
     201: invokestatic  #90                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     204: aload         19
     206: swap
     207: invokeinterface #94,  2           // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     212: pop
     213: goto          162
     216: aload         14
     218: checkcast     #96                 // class java/util/List
     221: nop
     222: astore        21
     224: new           #98                 // class kotlin/Triple
     227: dup
     228: aload         21
     230: iconst_0
     231: invokeinterface #102,  2          // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     236: aload         21
     238: iconst_1
     239: invokeinterface #102,  2          // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     244: aload         21
     246: iconst_2
     247: invokeinterface #102,  2          // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     252: invokespecial #105                // Method kotlin/Triple."<init>":(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)V
     255: astore        11
     257: aload         11
     259: invokevirtual #108                // Method kotlin/Triple.component1:()Ljava/lang/Object;
     262: checkcast     #110                // class java/lang/Number
     265: invokevirtual #114                // Method java/lang/Number.intValue:()I
     268: istore        12
     270: aload         11
     272: invokevirtual #117                // Method kotlin/Triple.component2:()Ljava/lang/Object;
     275: checkcast     #110                // class java/lang/Number
     278: invokevirtual #114                // Method java/lang/Number.intValue:()I
     281: istore        13
     283: aload         11
     285: invokevirtual #120                // Method kotlin/Triple.component3:()Ljava/lang/Object;
     288: checkcast     #110                // class java/lang/Number
     291: invokevirtual #114                // Method java/lang/Number.intValue:()I
     294: istore        14
     296: iload         12
     298: iload         13
     300: iadd
     301: iload         14
     303: if_icmple     330
     306: iload         12
     308: iload         14
     310: iadd
     311: iload         13
     313: if_icmple     330
     316: iload         13
     318: iload         14
     320: iadd
     321: iload         12
     323: if_icmple     330
     326: iconst_1
     327: goto          331
     330: iconst_0
     331: ifeq          50
     334: aload         5
     336: aload         8
     338: invokeinterface #94,  2           // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     343: pop
     344: goto          50
     347: aload         5
     349: checkcast     #96                 // class java/util/List
     352: nop
     353: astore_1
     354: new           #122                // class java/lang/StringBuilder
     357: dup
     358: invokespecial #123                // Method java/lang/StringBuilder."<init>":()V
     361: ldc           #125                // String Part 1 valid:
     363: invokevirtual #129                // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
     366: aload_1
     367: invokeinterface #132,  1          // InterfaceMethod java/util/List.size:()I
     372: invokevirtual #135                // Method java/lang/StringBuilder.append:(I)Ljava/lang/StringBuilder;
     375: invokevirtual #136                // Method java/lang/StringBuilder.toString:()Ljava/lang/String;
     378: getstatic     #142                // Field java/lang/System.out:Ljava/io/PrintStream;
     381: swap
     382: invokevirtual #148                // Method java/io/PrintStream.println:(Ljava/lang/Object;)V
     385: aload_0
     386: checkcast     #28                 // class java/lang/Iterable
     389: astore_3
     390: iconst_0
     391: istore        4
     393: aload_3
     394: astore        5
     396: new           #30                 // class java/util/ArrayList
     399: dup
     400: aload_3
     401: bipush        10
     403: invokestatic  #77                 // Method kotlin/collections/CollectionsKt.collectionSizeOrDefault:(Ljava/lang/Iterable;I)I
     406: invokespecial #80                 // Method java/util/ArrayList."<init>":(I)V
     409: checkcast     #34                 // class java/util/Collection
     412: astore        6
     414: iconst_0
     415: istore        7
     417: aload         5
     419: invokeinterface #38,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     424: astore        8
     426: aload         8
     428: invokeinterface #44,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     433: ifeq          633
     436: aload         8
     438: invokeinterface #48,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     443: astore        9
     445: aload         6
     447: aload         9
     449: checkcast     #50                 // class java/lang/String
     452: astore        10
     454: astore        25
     456: iconst_0
     457: istore        11
     459: aload         10
     461: checkcast     #52                 // class java/lang/CharSequence
     464: invokestatic  #58                 // Method kotlin/text/StringsKt.trim:(Ljava/lang/CharSequence;)Ljava/lang/CharSequence;
     467: invokevirtual #62                 // Method java/lang/Object.toString:()Ljava/lang/String;
     470: checkcast     #52                 // class java/lang/CharSequence
     473: astore        12
     475: new           #64                 // class kotlin/text/Regex
     478: dup
     479: ldc           #66                 // String \\s+
     481: invokespecial #67                 // Method kotlin/text/Regex."<init>":(Ljava/lang/String;)V
     484: astore        13
     486: iconst_0
     487: istore        14
     489: aload         13
     491: aload         12
     493: iload         14
     495: invokevirtual #71                 // Method kotlin/text/Regex.split:(Ljava/lang/CharSequence;I)Ljava/util/List;
     498: checkcast     #28                 // class java/lang/Iterable
     501: astore        12
     503: nop
     504: iconst_0
     505: istore        13
     507: aload         12
     509: astore        14
     511: new           #30                 // class java/util/ArrayList
     514: dup
     515: aload         12
     517: bipush        10
     519: invokestatic  #77                 // Method kotlin/collections/CollectionsKt.collectionSizeOrDefault:(Ljava/lang/Iterable;I)I
     522: invokespecial #80                 // Method java/util/ArrayList."<init>":(I)V
     525: checkcast     #34                 // class java/util/Collection
     528: astore        15
     530: iconst_0
     531: istore        16
     533: aload         14
     535: invokeinterface #38,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     540: astore        17
     542: aload         17
     544: invokeinterface #44,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     549: ifeq          596
     552: aload         17
     554: invokeinterface #48,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     559: astore        18
     561: aload         15
     563: aload         18
     565: checkcast     #50                 // class java/lang/String
     568: astore        19
     570: astore        20
     572: iconst_0
     573: istore        21
     575: aload         19
     577: invokestatic  #86                 // Method java/lang/Integer.parseInt:(Ljava/lang/String;)I
     580: nop
     581: invokestatic  #90                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     584: aload         20
     586: swap
     587: invokeinterface #94,  2           // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     592: pop
     593: goto          542
     596: aload         15
     598: checkcast     #96                 // class java/util/List
     601: nop
     602: astore        22
     604: aload         22
     606: iconst_0
     607: invokeinterface #102,  2          // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     612: checkcast     #110                // class java/lang/Number
     615: invokevirtual #114                // Method java/lang/Number.intValue:()I
     618: invokestatic  #90                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     621: aload         25
     623: swap
     624: invokeinterface #94,  2           // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     629: pop
     630: goto          426
     633: aload         6
     635: checkcast     #96                 // class java/util/List
     638: nop
     639: checkcast     #28                 // class java/lang/Iterable
     642: iconst_3
     643: invokestatic  #152                // Method kotlin/collections/CollectionsKt.chunked:(Ljava/lang/Iterable;I)Ljava/util/List;
     646: checkcast     #28                 // class java/lang/Iterable
     649: astore_3
     650: iconst_0
     651: istore        4
     653: aload_3
     654: astore        5
     656: new           #30                 // class java/util/ArrayList
     659: dup
     660: invokespecial #32                 // Method java/util/ArrayList."<init>":()V
     663: checkcast     #34                 // class java/util/Collection
     666: astore        6
     668: iconst_0
     669: istore        7
     671: aload         5
     673: invokeinterface #38,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     678: astore        8
     680: aload         8
     682: invokeinterface #44,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     687: ifeq          832
     690: aload         8
     692: invokeinterface #48,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     697: astore        9
     699: aload         9
     701: checkcast     #96                 // class java/util/List
     704: astore        10
     706: iconst_0
     707: istore        11
     709: new           #98                 // class kotlin/Triple
     712: dup
     713: aload         10
     715: iconst_0
     716: invokeinterface #102,  2          // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     721: aload         10
     723: iconst_1
     724: invokeinterface #102,  2          // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     729: aload         10
     731: iconst_2
     732: invokeinterface #102,  2          // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     737: invokespecial #105                // Method kotlin/Triple."<init>":(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)V
     740: astore        12
     742: aload         12
     744: invokevirtual #108                // Method kotlin/Triple.component1:()Ljava/lang/Object;
     747: checkcast     #110                // class java/lang/Number
     750: invokevirtual #114                // Method java/lang/Number.intValue:()I
     753: istore        13
     755: aload         12
     757: invokevirtual #117                // Method kotlin/Triple.component2:()Ljava/lang/Object;
     760: checkcast     #110                // class java/lang/Number
     763: invokevirtual #114                // Method java/lang/Number.intValue:()I
     766: istore        14
     768: aload         12
     770: invokevirtual #120                // Method kotlin/Triple.component3:()Ljava/lang/Object;
     773: checkcast     #110                // class java/lang/Number
     776: invokevirtual #114                // Method java/lang/Number.intValue:()I
     779: istore        15
     781: iload         13
     783: iload         14
     785: iadd
     786: iload         15
     788: if_icmple     815
     791: iload         13
     793: iload         15
     795: iadd
     796: iload         14
     798: if_icmple     815
     801: iload         14
     803: iload         15
     805: iadd
     806: iload         13
     808: if_icmple     815
     811: iconst_1
     812: goto          816
     815: iconst_0
     816: ifeq          680
     819: aload         6
     821: aload         9
     823: invokeinterface #94,  2           // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     828: pop
     829: goto          680
     832: aload         6
     834: checkcast     #96                 // class java/util/List
     837: nop
     838: invokeinterface #132,  1          // InterfaceMethod java/util/List.size:()I
     843: istore_2
     844: aload_0
     845: checkcast     #28                 // class java/lang/Iterable
     848: astore        4
     850: iconst_0
     851: istore        5
     853: aload         4
     855: astore        6
     857: new           #30                 // class java/util/ArrayList
     860: dup
     861: aload         4
     863: bipush        10
     865: invokestatic  #77                 // Method kotlin/collections/CollectionsKt.collectionSizeOrDefault:(Ljava/lang/Iterable;I)I
     868: invokespecial #80                 // Method java/util/ArrayList."<init>":(I)V
     871: checkcast     #34                 // class java/util/Collection
     874: astore        7
     876: iconst_0
     877: istore        8
     879: aload         6
     881: invokeinterface #38,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     886: astore        9
     888: aload         9
     890: invokeinterface #44,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     895: ifeq          1095
     898: aload         9
     900: invokeinterface #48,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     905: astore        10
     907: aload         7
     909: aload         10
     911: checkcast     #50                 // class java/lang/String
     914: astore        11
     916: astore        25
     918: iconst_0
     919: istore        12
     921: aload         11
     923: checkcast     #52                 // class java/lang/CharSequence
     926: invokestatic  #58                 // Method kotlin/text/StringsKt.trim:(Ljava/lang/CharSequence;)Ljava/lang/CharSequence;
     929: invokevirtual #62                 // Method java/lang/Object.toString:()Ljava/lang/String;
     932: checkcast     #52                 // class java/lang/CharSequence
     935: astore        13
     937: new           #64                 // class kotlin/text/Regex
     940: dup
     941: ldc           #66                 // String \\s+
     943: invokespecial #67                 // Method kotlin/text/Regex."<init>":(Ljava/lang/String;)V
     946: astore        14
     948: iconst_0
     949: istore        15
     951: aload         14
     953: aload         13
     955: iload         15
     957: invokevirtual #71                 // Method kotlin/text/Regex.split:(Ljava/lang/CharSequence;I)Ljava/util/List;
     960: checkcast     #28                 // class java/lang/Iterable
     963: astore        13
     965: nop
     966: iconst_0
     967: istore        14
     969: aload         13
     971: astore        15
     973: new           #30                 // class java/util/ArrayList
     976: dup
     977: aload         13
     979: bipush        10
     981: invokestatic  #77                 // Method kotlin/collections/CollectionsKt.collectionSizeOrDefault:(Ljava/lang/Iterable;I)I
     984: invokespecial #80                 // Method java/util/ArrayList."<init>":(I)V
     987: checkcast     #34                 // class java/util/Collection
     990: astore        16
     992: iconst_0
     993: istore        17
     995: aload         15
     997: invokeinterface #38,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
    1002: astore        18
    1004: aload         18
    1006: invokeinterface #44,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
    1011: ifeq          1058
    1014: aload         18
    1016: invokeinterface #48,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
    1021: astore        19
    1023: aload         16
    1025: aload         19
    1027: checkcast     #50                 // class java/lang/String
    1030: astore        20
    1032: astore        21
    1034: iconst_0
    1035: istore        22
    1037: aload         20
    1039: invokestatic  #86                 // Method java/lang/Integer.parseInt:(Ljava/lang/String;)I
    1042: nop
    1043: invokestatic  #90                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
    1046: aload         21
    1048: swap
    1049: invokeinterface #94,  2           // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
    1054: pop
    1055: goto          1004
    1058: aload         16
    1060: checkcast     #96                 // class java/util/List
    1063: nop
    1064: astore        23
    1066: aload         23
    1068: iconst_1
    1069: invokeinterface #102,  2          // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
    1074: checkcast     #110                // class java/lang/Number
    1077: invokevirtual #114                // Method java/lang/Number.intValue:()I
    1080: invokestatic  #90                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
    1083: aload         25
    1085: swap
    1086: invokeinterface #94,  2           // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
    1091: pop
    1092: goto          888
    1095: aload         7
    1097: checkcast     #96                 // class java/util/List
    1100: nop
    1101: checkcast     #28                 // class java/lang/Iterable
    1104: iconst_3
    1105: invokestatic  #152                // Method kotlin/collections/CollectionsKt.chunked:(Ljava/lang/Iterable;I)Ljava/util/List;
    1108: checkcast     #28                 // class java/lang/Iterable
    1111: astore        4
    1113: iconst_0
    1114: istore        5
    1116: aload         4
    1118: astore        6
    1120: new           #30                 // class java/util/ArrayList
    1123: dup
    1124: invokespecial #32                 // Method java/util/ArrayList."<init>":()V
    1127: checkcast     #34                 // class java/util/Collection
    1130: astore        7
    1132: iconst_0
    1133: istore        8
    1135: aload         6
    1137: invokeinterface #38,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
    1142: astore        9
    1144: aload         9
    1146: invokeinterface #44,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
    1151: ifeq          1296
    1154: aload         9
    1156: invokeinterface #48,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
    1161: astore        10
    1163: aload         10
    1165: checkcast     #96                 // class java/util/List
    1168: astore        11
    1170: iconst_0
    1171: istore        12
    1173: new           #98                 // class kotlin/Triple
    1176: dup
    1177: aload         11
    1179: iconst_0
    1180: invokeinterface #102,  2          // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
    1185: aload         11
    1187: iconst_1
    1188: invokeinterface #102,  2          // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
    1193: aload         11
    1195: iconst_2
    1196: invokeinterface #102,  2          // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
    1201: invokespecial #105                // Method kotlin/Triple."<init>":(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)V
    1204: astore        13
    1206: aload         13
    1208: invokevirtual #108                // Method kotlin/Triple.component1:()Ljava/lang/Object;
    1211: checkcast     #110                // class java/lang/Number
    1214: invokevirtual #114                // Method java/lang/Number.intValue:()I
    1217: istore        14
    1219: aload         13
    1221: invokevirtual #117                // Method kotlin/Triple.component2:()Ljava/lang/Object;
    1224: checkcast     #110                // class java/lang/Number
    1227: invokevirtual #114                // Method java/lang/Number.intValue:()I
    1230: istore        15
    1232: aload         13
    1234: invokevirtual #120                // Method kotlin/Triple.component3:()Ljava/lang/Object;
    1237: checkcast     #110                // class java/lang/Number
    1240: invokevirtual #114                // Method java/lang/Number.intValue:()I
    1243: istore        16
    1245: iload         14
    1247: iload         15
    1249: iadd
    1250: iload         16
    1252: if_icmple     1279
    1255: iload         14
    1257: iload         16
    1259: iadd
    1260: iload         15
    1262: if_icmple     1279
    1265: iload         15
    1267: iload         16
    1269: iadd
    1270: iload         14
    1272: if_icmple     1279
    1275: iconst_1
    1276: goto          1280
    1279: iconst_0
    1280: ifeq          1144
    1283: aload         7
    1285: aload         10
    1287: invokeinterface #94,  2           // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
    1292: pop
    1293: goto          1144
    1296: aload         7
    1298: checkcast     #96                 // class java/util/List
    1301: nop
    1302: invokeinterface #132,  1          // InterfaceMethod java/util/List.size:()I
    1307: istore_3
    1308: aload_0
    1309: checkcast     #28                 // class java/lang/Iterable
    1312: astore        5
    1314: iconst_0
    1315: istore        6
    1317: aload         5
    1319: astore        7
    1321: new           #30                 // class java/util/ArrayList
    1324: dup
    1325: aload         5
    1327: bipush        10
    1329: invokestatic  #77                 // Method kotlin/collections/CollectionsKt.collectionSizeOrDefault:(Ljava/lang/Iterable;I)I
    1332: invokespecial #80                 // Method java/util/ArrayList."<init>":(I)V
    1335: checkcast     #34                 // class java/util/Collection
    1338: astore        8
    1340: iconst_0
    1341: istore        9
    1343: aload         7
    1345: invokeinterface #38,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
    1350: astore        10
    1352: aload         10
    1354: invokeinterface #44,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
    1359: ifeq          1559
    1362: aload         10
    1364: invokeinterface #48,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
    1369: astore        11
    1371: aload         8
    1373: aload         11
    1375: checkcast     #50                 // class java/lang/String
    1378: astore        12
    1380: astore        25
    1382: iconst_0
    1383: istore        13
    1385: aload         12
    1387: checkcast     #52                 // class java/lang/CharSequence
    1390: invokestatic  #58                 // Method kotlin/text/StringsKt.trim:(Ljava/lang/CharSequence;)Ljava/lang/CharSequence;
    1393: invokevirtual #62                 // Method java/lang/Object.toString:()Ljava/lang/String;
    1396: checkcast     #52                 // class java/lang/CharSequence
    1399: astore        14
    1401: new           #64                 // class kotlin/text/Regex
    1404: dup
    1405: ldc           #66                 // String \\s+
    1407: invokespecial #67                 // Method kotlin/text/Regex."<init>":(Ljava/lang/String;)V
    1410: astore        15
    1412: iconst_0
    1413: istore        16
    1415: aload         15
    1417: aload         14
    1419: iload         16
    1421: invokevirtual #71                 // Method kotlin/text/Regex.split:(Ljava/lang/CharSequence;I)Ljava/util/List;
    1424: checkcast     #28                 // class java/lang/Iterable
    1427: astore        14
    1429: nop
    1430: iconst_0
    1431: istore        15
    1433: aload         14
    1435: astore        16
    1437: new           #30                 // class java/util/ArrayList
    1440: dup
    1441: aload         14
    1443: bipush        10
    1445: invokestatic  #77                 // Method kotlin/collections/CollectionsKt.collectionSizeOrDefault:(Ljava/lang/Iterable;I)I
    1448: invokespecial #80                 // Method java/util/ArrayList."<init>":(I)V
    1451: checkcast     #34                 // class java/util/Collection
    1454: astore        17
    1456: iconst_0
    1457: istore        18
    1459: aload         16
    1461: invokeinterface #38,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
    1466: astore        19
    1468: aload         19
    1470: invokeinterface #44,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
    1475: ifeq          1522
    1478: aload         19
    1480: invokeinterface #48,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
    1485: astore        20
    1487: aload         17
    1489: aload         20
    1491: checkcast     #50                 // class java/lang/String
    1494: astore        21
    1496: astore        22
    1498: iconst_0
    1499: istore        23
    1501: aload         21
    1503: invokestatic  #86                 // Method java/lang/Integer.parseInt:(Ljava/lang/String;)I
    1506: nop
    1507: invokestatic  #90                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
    1510: aload         22
    1512: swap
    1513: invokeinterface #94,  2           // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
    1518: pop
    1519: goto          1468
    1522: aload         17
    1524: checkcast     #96                 // class java/util/List
    1527: nop
    1528: astore        24
    1530: aload         24
    1532: iconst_2
    1533: invokeinterface #102,  2          // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
    1538: checkcast     #110                // class java/lang/Number
    1541: invokevirtual #114                // Method java/lang/Number.intValue:()I
    1544: invokestatic  #90                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
    1547: aload         25
    1549: swap
    1550: invokeinterface #94,  2           // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
    1555: pop
    1556: goto          1352
    1559: aload         8
    1561: checkcast     #96                 // class java/util/List
    1564: nop
    1565: checkcast     #28                 // class java/lang/Iterable
    1568: iconst_3
    1569: invokestatic  #152                // Method kotlin/collections/CollectionsKt.chunked:(Ljava/lang/Iterable;I)Ljava/util/List;
    1572: checkcast     #28                 // class java/lang/Iterable
    1575: astore        5
    1577: iconst_0
    1578: istore        6
    1580: aload         5
    1582: astore        7
    1584: new           #30                 // class java/util/ArrayList
    1587: dup
    1588: invokespecial #32                 // Method java/util/ArrayList."<init>":()V
    1591: checkcast     #34                 // class java/util/Collection
    1594: astore        8
    1596: iconst_0
    1597: istore        9
    1599: aload         7
    1601: invokeinterface #38,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
    1606: astore        10
    1608: aload         10
    1610: invokeinterface #44,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
    1615: ifeq          1760
    1618: aload         10
    1620: invokeinterface #48,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
    1625: astore        11
    1627: aload         11
    1629: checkcast     #96                 // class java/util/List
    1632: astore        12
    1634: iconst_0
    1635: istore        13
    1637: new           #98                 // class kotlin/Triple
    1640: dup
    1641: aload         12
    1643: iconst_0
    1644: invokeinterface #102,  2          // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
    1649: aload         12
    1651: iconst_1
    1652: invokeinterface #102,  2          // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
    1657: aload         12
    1659: iconst_2
    1660: invokeinterface #102,  2          // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
    1665: invokespecial #105                // Method kotlin/Triple."<init>":(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)V
    1668: astore        14
    1670: aload         14
    1672: invokevirtual #108                // Method kotlin/Triple.component1:()Ljava/lang/Object;
    1675: checkcast     #110                // class java/lang/Number
    1678: invokevirtual #114                // Method java/lang/Number.intValue:()I
    1681: istore        15
    1683: aload         14
    1685: invokevirtual #117                // Method kotlin/Triple.component2:()Ljava/lang/Object;
    1688: checkcast     #110                // class java/lang/Number
    1691: invokevirtual #114                // Method java/lang/Number.intValue:()I
    1694: istore        16
    1696: aload         14
    1698: invokevirtual #120                // Method kotlin/Triple.component3:()Ljava/lang/Object;
    1701: checkcast     #110                // class java/lang/Number
    1704: invokevirtual #114                // Method java/lang/Number.intValue:()I
    1707: istore        17
    1709: iload         15
    1711: iload         16
    1713: iadd
    1714: iload         17
    1716: if_icmple     1743
    1719: iload         15
    1721: iload         17
    1723: iadd
    1724: iload         16
    1726: if_icmple     1743
    1729: iload         16
    1731: iload         17
    1733: iadd
    1734: iload         15
    1736: if_icmple     1743
    1739: iconst_1
    1740: goto          1744
    1743: iconst_0
    1744: ifeq          1608
    1747: aload         8
    1749: aload         11
    1751: invokeinterface #94,  2           // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
    1756: pop
    1757: goto          1608
    1760: aload         8
    1762: checkcast     #96                 // class java/util/List
    1765: nop
    1766: invokeinterface #132,  1          // InterfaceMethod java/util/List.size:()I
    1771: istore        4
    1773: new           #122                // class java/lang/StringBuilder
    1776: dup
    1777: invokespecial #123                // Method java/lang/StringBuilder."<init>":()V
    1780: ldc           #154                // String Part 2 valid
    1782: invokevirtual #129                // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
    1785: iload_2
    1786: iload_3
    1787: iadd
    1788: iload         4
    1790: iadd
    1791: invokevirtual #135                // Method java/lang/StringBuilder.append:(I)Ljava/lang/StringBuilder;
    1794: invokevirtual #136                // Method java/lang/StringBuilder.toString:()Ljava/lang/String;
    1797: getstatic     #142                // Field java/lang/System.out:Ljava/io/PrintStream;
    1800: swap
    1801: invokevirtual #148                // Method java/io/PrintStream.println:(Ljava/lang/Object;)V
    1804: return

  public static void main(java.lang.String[]);
    Code:
       0: invokestatic  #197                // Method main:()V
       3: return
}