object Day2 {
    fun part1Solution(input: String): Long = splitRows(input)
            .map { splitColumns(it) }
            .map { minMaxDiff(it) }
            .sum()

    fun part2Solution(input: String): Long = splitRows(input)
            .map { splitColumns(it) }
            .map { wholeDivider(it) }
            .sum()

    fun minMaxDiff(input: List<Long>): Long {
        val min = requireNotNull(input.min()) { "Cannot found min" }
        val max = requireNotNull(input.max()) { "Cannot found max" }
        return Math.abs(max - min)
    }

    fun wholeDivider(input: List<Long>): Long = input.mapIndexed { index, value ->
        val result = input.drop(index + 1).find { it % value == 0L || value % it == 0L }
        result?.let { Math.max(result, value) / Math.min(result, value) }
    }.filterNotNull().first()

    fun splitRows(input: String): List<String> = input.split("\n").filter { it.isNotBlank() }
    fun splitColumns(input: String): List<Long> = input.split(Regex("[ \t]")).map { it.toLong() }
}

Compiled from "Day2.kt"
public final class Day2 {
  public static final Day2 INSTANCE;

  private Day2();
    Code:
       0: aload_0
       1: invokespecial #8                  // Method java/lang/Object."<init>":()V
       4: return

  public final long part1Solution(java.lang.String);
    Code:
       0: aload_1
       1: ldc           #15                 // String input
       3: invokestatic  #21                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: aload_0
       7: aload_1
       8: invokevirtual #25                 // Method splitRows:(Ljava/lang/String;)Ljava/util/List;
      11: checkcast     #27                 // class java/lang/Iterable
      14: astore_2
      15: nop
      16: iconst_0
      17: istore_3
      18: aload_2
      19: astore        4
      21: new           #29                 // class java/util/ArrayList
      24: dup
      25: aload_2
      26: bipush        10
      28: invokestatic  #35                 // Method kotlin/collections/CollectionsKt.collectionSizeOrDefault:(Ljava/lang/Iterable;I)I
      31: invokespecial #38                 // Method java/util/ArrayList."<init>":(I)V
      34: checkcast     #40                 // class java/util/Collection
      37: astore        5
      39: iconst_0
      40: istore        6
      42: aload         4
      44: invokeinterface #44,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
      49: astore        7
      51: aload         7
      53: invokeinterface #50,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
      58: ifeq          104
      61: aload         7
      63: invokeinterface #54,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
      68: astore        8
      70: aload         5
      72: aload         8
      74: checkcast     #56                 // class java/lang/String
      77: astore        9
      79: astore        11
      81: iconst_0
      82: istore        10
      84: getstatic     #59                 // Field INSTANCE:LDay2;
      87: aload         9
      89: invokevirtual #62                 // Method splitColumns:(Ljava/lang/String;)Ljava/util/List;
      92: aload         11
      94: swap
      95: invokeinterface #66,  2           // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     100: pop
     101: goto          51
     104: aload         5
     106: checkcast     #68                 // class java/util/List
     109: nop
     110: checkcast     #27                 // class java/lang/Iterable
     113: astore_2
     114: nop
     115: iconst_0
     116: istore_3
     117: aload_2
     118: astore        4
     120: new           #29                 // class java/util/ArrayList
     123: dup
     124: aload_2
     125: bipush        10
     127: invokestatic  #35                 // Method kotlin/collections/CollectionsKt.collectionSizeOrDefault:(Ljava/lang/Iterable;I)I
     130: invokespecial #38                 // Method java/util/ArrayList."<init>":(I)V
     133: checkcast     #40                 // class java/util/Collection
     136: astore        5
     138: iconst_0
     139: istore        6
     141: aload         4
     143: invokeinterface #44,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     148: astore        7
     150: aload         7
     152: invokeinterface #50,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     157: ifeq          206
     160: aload         7
     162: invokeinterface #54,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     167: astore        8
     169: aload         5
     171: aload         8
     173: checkcast     #68                 // class java/util/List
     176: astore        9
     178: astore        11
     180: iconst_0
     181: istore        10
     183: getstatic     #59                 // Field INSTANCE:LDay2;
     186: aload         9
     188: invokevirtual #72                 // Method minMaxDiff:(Ljava/util/List;)J
     191: invokestatic  #78                 // Method java/lang/Long.valueOf:(J)Ljava/lang/Long;
     194: aload         11
     196: swap
     197: invokeinterface #66,  2           // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     202: pop
     203: goto          150
     206: aload         5
     208: checkcast     #68                 // class java/util/List
     211: nop
     212: checkcast     #27                 // class java/lang/Iterable
     215: invokestatic  #82                 // Method kotlin/collections/CollectionsKt.sumOfLong:(Ljava/lang/Iterable;)J
     218: lreturn

  public final long part2Solution(java.lang.String);
    Code:
       0: aload_1
       1: ldc           #15                 // String input
       3: invokestatic  #21                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: aload_0
       7: aload_1
       8: invokevirtual #25                 // Method splitRows:(Ljava/lang/String;)Ljava/util/List;
      11: checkcast     #27                 // class java/lang/Iterable
      14: astore_2
      15: nop
      16: iconst_0
      17: istore_3
      18: aload_2
      19: astore        4
      21: new           #29                 // class java/util/ArrayList
      24: dup
      25: aload_2
      26: bipush        10
      28: invokestatic  #35                 // Method kotlin/collections/CollectionsKt.collectionSizeOrDefault:(Ljava/lang/Iterable;I)I
      31: invokespecial #38                 // Method java/util/ArrayList."<init>":(I)V
      34: checkcast     #40                 // class java/util/Collection
      37: astore        5
      39: iconst_0
      40: istore        6
      42: aload         4
      44: invokeinterface #44,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
      49: astore        7
      51: aload         7
      53: invokeinterface #50,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
      58: ifeq          104
      61: aload         7
      63: invokeinterface #54,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
      68: astore        8
      70: aload         5
      72: aload         8
      74: checkcast     #56                 // class java/lang/String
      77: astore        9
      79: astore        11
      81: iconst_0
      82: istore        10
      84: getstatic     #59                 // Field INSTANCE:LDay2;
      87: aload         9
      89: invokevirtual #62                 // Method splitColumns:(Ljava/lang/String;)Ljava/util/List;
      92: aload         11
      94: swap
      95: invokeinterface #66,  2           // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     100: pop
     101: goto          51
     104: aload         5
     106: checkcast     #68                 // class java/util/List
     109: nop
     110: checkcast     #27                 // class java/lang/Iterable
     113: astore_2
     114: nop
     115: iconst_0
     116: istore_3
     117: aload_2
     118: astore        4
     120: new           #29                 // class java/util/ArrayList
     123: dup
     124: aload_2
     125: bipush        10
     127: invokestatic  #35                 // Method kotlin/collections/CollectionsKt.collectionSizeOrDefault:(Ljava/lang/Iterable;I)I
     130: invokespecial #38                 // Method java/util/ArrayList."<init>":(I)V
     133: checkcast     #40                 // class java/util/Collection
     136: astore        5
     138: iconst_0
     139: istore        6
     141: aload         4
     143: invokeinterface #44,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     148: astore        7
     150: aload         7
     152: invokeinterface #50,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     157: ifeq          206
     160: aload         7
     162: invokeinterface #54,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     167: astore        8
     169: aload         5
     171: aload         8
     173: checkcast     #68                 // class java/util/List
     176: astore        9
     178: astore        11
     180: iconst_0
     181: istore        10
     183: getstatic     #59                 // Field INSTANCE:LDay2;
     186: aload         9
     188: invokevirtual #101                // Method wholeDivider:(Ljava/util/List;)J
     191: invokestatic  #78                 // Method java/lang/Long.valueOf:(J)Ljava/lang/Long;
     194: aload         11
     196: swap
     197: invokeinterface #66,  2           // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     202: pop
     203: goto          150
     206: aload         5
     208: checkcast     #68                 // class java/util/List
     211: nop
     212: checkcast     #27                 // class java/lang/Iterable
     215: invokestatic  #82                 // Method kotlin/collections/CollectionsKt.sumOfLong:(Ljava/lang/Iterable;)J
     218: lreturn

  public final long minMaxDiff(java.util.List<java.lang.Long>);
    Code:
       0: aload_1
       1: ldc           #15                 // String input
       3: invokestatic  #21                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: aload_1
       7: checkcast     #27                 // class java/lang/Iterable
      10: invokestatic  #108                // Method kotlin/collections/CollectionsKt.minOrThrow:(Ljava/lang/Iterable;)Ljava/lang/Comparable;
      13: dup
      14: ifnonnull     38
      17: pop
      18: iconst_0
      19: istore        5
      21: ldc           #110                // String Cannot found min
      23: astore        5
      25: new           #112                // class java/lang/IllegalArgumentException
      28: dup
      29: aload         5
      31: invokevirtual #116                // Method java/lang/Object.toString:()Ljava/lang/String;
      34: invokespecial #119                // Method java/lang/IllegalArgumentException."<init>":(Ljava/lang/String;)V
      37: athrow
      38: checkcast     #121                // class java/lang/Number
      41: invokevirtual #125                // Method java/lang/Number.longValue:()J
      44: lstore_2
      45: aload_1
      46: checkcast     #27                 // class java/lang/Iterable
      49: invokestatic  #128                // Method kotlin/collections/CollectionsKt.maxOrThrow:(Ljava/lang/Iterable;)Ljava/lang/Comparable;
      52: dup
      53: ifnonnull     77
      56: pop
      57: iconst_0
      58: istore        6
      60: ldc           #130                // String Cannot found max
      62: astore        6
      64: new           #112                // class java/lang/IllegalArgumentException
      67: dup
      68: aload         6
      70: invokevirtual #116                // Method java/lang/Object.toString:()Ljava/lang/String;
      73: invokespecial #119                // Method java/lang/IllegalArgumentException."<init>":(Ljava/lang/String;)V
      76: athrow
      77: checkcast     #121                // class java/lang/Number
      80: invokevirtual #125                // Method java/lang/Number.longValue:()J
      83: lstore        4
      85: lload         4
      87: lload_2
      88: lsub
      89: invokestatic  #136                // Method java/lang/Math.abs:(J)J
      92: lreturn

  public final long wholeDivider(java.util.List<java.lang.Long>);
    Code:
       0: aload_1
       1: ldc           #15                 // String input
       3: invokestatic  #21                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: aload_1
       7: checkcast     #27                 // class java/lang/Iterable
      10: astore_2
      11: iconst_0
      12: istore_3
      13: aload_2
      14: astore        4
      16: new           #29                 // class java/util/ArrayList
      19: dup
      20: aload_2
      21: bipush        10
      23: invokestatic  #35                 // Method kotlin/collections/CollectionsKt.collectionSizeOrDefault:(Ljava/lang/Iterable;I)I
      26: invokespecial #38                 // Method java/util/ArrayList."<init>":(I)V
      29: checkcast     #40                 // class java/util/Collection
      32: astore        5
      34: iconst_0
      35: istore        6
      37: iconst_0
      38: istore        7
      40: aload         4
      42: invokeinterface #44,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
      47: astore        8
      49: aload         8
      51: invokeinterface #50,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
      56: ifeq          258
      59: aload         8
      61: invokeinterface #54,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
      66: astore        9
      68: aload         5
      70: iload         7
      72: iinc          7, 1
      75: istore        10
      77: iload         10
      79: ifge          85
      82: invokestatic  #146                // Method kotlin/collections/CollectionsKt.throwIndexOverflow:()V
      85: iload         10
      87: aload         9
      89: checkcast     #121                // class java/lang/Number
      92: invokevirtual #125                // Method java/lang/Number.longValue:()J
      95: lstore        11
      97: istore        13
      99: astore        24
     101: iconst_0
     102: istore        14
     104: aload_1
     105: checkcast     #27                 // class java/lang/Iterable
     108: iload         13
     110: iconst_1
     111: iadd
     112: invokestatic  #150                // Method kotlin/collections/CollectionsKt.drop:(Ljava/lang/Iterable;I)Ljava/util/List;
     115: checkcast     #27                 // class java/lang/Iterable
     118: astore        15
     120: aload         15
     122: invokeinterface #44,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     127: astore        16
     129: aload         16
     131: invokeinterface #50,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     136: ifeq          194
     139: aload         16
     141: invokeinterface #54,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     146: astore        17
     148: aload         17
     150: checkcast     #121                // class java/lang/Number
     153: invokevirtual #125                // Method java/lang/Number.longValue:()J
     156: lstore        18
     158: iconst_0
     159: istore        20
     161: lload         18
     163: lload         11
     165: lrem
     166: lconst_0
     167: lcmp
     168: ifeq          181
     171: lload         11
     173: lload         18
     175: lrem
     176: lconst_0
     177: lcmp
     178: ifne          185
     181: iconst_1
     182: goto          186
     185: iconst_0
     186: ifeq          129
     189: aload         17
     191: goto          195
     194: aconst_null
     195: checkcast     #74                 // class java/lang/Long
     198: astore        21
     200: aload         21
     202: dup
     203: ifnull        244
     206: checkcast     #121                // class java/lang/Number
     209: invokevirtual #125                // Method java/lang/Number.longValue:()J
     212: lstore        22
     214: iconst_0
     215: istore        17
     217: aload         21
     219: invokevirtual #151                // Method java/lang/Long.longValue:()J
     222: lload         11
     224: invokestatic  #154                // Method java/lang/Math.max:(JJ)J
     227: aload         21
     229: invokevirtual #151                // Method java/lang/Long.longValue:()J
     232: lload         11
     234: invokestatic  #156                // Method java/lang/Math.min:(JJ)J
     237: ldiv
     238: invokestatic  #78                 // Method java/lang/Long.valueOf:(J)Ljava/lang/Long;
     241: goto          246
     244: pop
     245: aconst_null
     246: aload         24
     248: swap
     249: invokeinterface #66,  2           // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     254: pop
     255: goto          49
     258: aload         5
     260: checkcast     #68                 // class java/util/List
     263: nop
     264: checkcast     #27                 // class java/lang/Iterable
     267: invokestatic  #160                // Method kotlin/collections/CollectionsKt.filterNotNull:(Ljava/lang/Iterable;)Ljava/util/List;
     270: invokestatic  #164                // Method kotlin/collections/CollectionsKt.first:(Ljava/util/List;)Ljava/lang/Object;
     273: checkcast     #121                // class java/lang/Number
     276: invokevirtual #125                // Method java/lang/Number.longValue:()J
     279: lreturn

  public final java.util.List<java.lang.String> splitRows(java.lang.String);
    Code:
       0: aload_1
       1: ldc           #15                 // String input
       3: invokestatic  #21                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: aload_1
       7: checkcast     #179                // class java/lang/CharSequence
      10: iconst_1
      11: anewarray     #56                 // class java/lang/String
      14: astore_2
      15: aload_2
      16: iconst_0
      17: ldc           #181                // String \n
      19: aastore
      20: aload_2
      21: iconst_0
      22: iconst_0
      23: bipush        6
      25: aconst_null
      26: invokestatic  #187                // Method kotlin/text/StringsKt.split$default:(Ljava/lang/CharSequence;[Ljava/lang/String;ZIILjava/lang/Object;)Ljava/util/List;
      29: checkcast     #27                 // class java/lang/Iterable
      32: astore_2
      33: iconst_0
      34: istore_3
      35: aload_2
      36: astore        4
      38: new           #29                 // class java/util/ArrayList
      41: dup
      42: invokespecial #188                // Method java/util/ArrayList."<init>":()V
      45: checkcast     #40                 // class java/util/Collection
      48: astore        5
      50: iconst_0
      51: istore        6
      53: aload         4
      55: invokeinterface #44,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
      60: astore        7
      62: aload         7
      64: invokeinterface #50,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
      69: ifeq          124
      72: aload         7
      74: invokeinterface #54,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
      79: astore        8
      81: aload         8
      83: checkcast     #56                 // class java/lang/String
      86: astore        9
      88: iconst_0
      89: istore        10
      91: aload         9
      93: checkcast     #179                // class java/lang/CharSequence
      96: invokestatic  #192                // Method kotlin/text/StringsKt.isBlank:(Ljava/lang/CharSequence;)Z
      99: ifne          106
     102: iconst_1
     103: goto          107
     106: iconst_0
     107: nop
     108: ifeq          62
     111: aload         5
     113: aload         8
     115: invokeinterface #66,  2           // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     120: pop
     121: goto          62
     124: aload         5
     126: checkcast     #68                 // class java/util/List
     129: nop
     130: areturn

  public final java.util.List<java.lang.Long> splitColumns(java.lang.String);
    Code:
       0: aload_1
       1: ldc           #15                 // String input
       3: invokestatic  #21                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: aload_1
       7: checkcast     #179                // class java/lang/CharSequence
      10: astore_2
      11: new           #201                // class kotlin/text/Regex
      14: dup
      15: ldc           #203                // String [ \t]
      17: invokespecial #204                // Method kotlin/text/Regex."<init>":(Ljava/lang/String;)V
      20: astore_3
      21: iconst_0
      22: istore        4
      24: aload_3
      25: aload_2
      26: iload         4
      28: invokevirtual #208                // Method kotlin/text/Regex.split:(Ljava/lang/CharSequence;I)Ljava/util/List;
      31: checkcast     #27                 // class java/lang/Iterable
      34: astore_2
      35: nop
      36: iconst_0
      37: istore_3
      38: aload_2
      39: astore        4
      41: new           #29                 // class java/util/ArrayList
      44: dup
      45: aload_2
      46: bipush        10
      48: invokestatic  #35                 // Method kotlin/collections/CollectionsKt.collectionSizeOrDefault:(Ljava/lang/Iterable;I)I
      51: invokespecial #38                 // Method java/util/ArrayList."<init>":(I)V
      54: checkcast     #40                 // class java/util/Collection
      57: astore        5
      59: iconst_0
      60: istore        6
      62: aload         4
      64: invokeinterface #44,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
      69: astore        7
      71: aload         7
      73: invokeinterface #50,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
      78: ifeq          125
      81: aload         7
      83: invokeinterface #54,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
      88: astore        8
      90: aload         5
      92: aload         8
      94: checkcast     #56                 // class java/lang/String
      97: astore        9
      99: astore        11
     101: iconst_0
     102: istore        10
     104: aload         9
     106: invokestatic  #211                // Method java/lang/Long.parseLong:(Ljava/lang/String;)J
     109: nop
     110: invokestatic  #78                 // Method java/lang/Long.valueOf:(J)Ljava/lang/Long;
     113: aload         11
     115: swap
     116: invokeinterface #66,  2           // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     121: pop
     122: goto          71
     125: aload         5
     127: checkcast     #68                 // class java/util/List
     130: nop
     131: areturn

  static {};
    Code:
       0: new           #2                  // class Day2
       3: dup
       4: invokespecial #214                // Method "<init>":()V
       7: putstatic     #59                 // Field INSTANCE:LDay2;
      10: return
}


import java.io.File

fun readFishMap(): MutableMap<Int, Long> {
    val fishes = File("day6.txt")
        .readLines()[0]
        .split(",")
        .map { it.toInt() }

    val map = mutableMapOf<Int, Long>()
    fishes.forEach { fish ->
        val count = map.getOrDefault(fish, 0)
        map[fish] = count + 1
    }

    return map
}

fun MutableMap<Int, Long>.simulateLanternFishes() {
    val reproducingFishes = get(0) ?: 0

    for (i in 1 .. 8) {
        val count = get(i) ?: 0
        put(i - 1, count)
    }

    put(8, reproducingFishes)
    val sixFishesCount = get(6) ?: 0
    put(6, sixFishesCount + reproducingFishes)
}

fun part2() {
    val map = readFishMap()
    println(map)

    repeat(256) {
        map.simulateLanternFishes()
    }

    println(map)

    val fishCount = map.values.sum()
    println("Total fishes: $fishCount")
}

fun part1() {
    val map = readFishMap()
    println(map)

    repeat(80) {
        map.simulateLanternFishes()
    }

    println(map)

    val fishCount = map.values.sum()
    println("Total fishes: $fishCount")
}

fun main() {
    part2()
}

Compiled from "day6.kt"
public final class Day6Kt {
  public static final java.util.Map<java.lang.Integer, java.lang.Long> readFishMap();
    Code:
       0: new           #10                 // class java/io/File
       3: dup
       4: ldc           #12                 // String day6.txt
       6: invokespecial #16                 // Method java/io/File."<init>":(Ljava/lang/String;)V
       9: aconst_null
      10: iconst_1
      11: aconst_null
      12: invokestatic  #22                 // Method kotlin/io/FilesKt.readLines$default:(Ljava/io/File;Ljava/nio/charset/Charset;ILjava/lang/Object;)Ljava/util/List;
      15: iconst_0
      16: invokeinterface #28,  2           // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
      21: checkcast     #30                 // class java/lang/CharSequence
      24: iconst_1
      25: anewarray     #32                 // class java/lang/String
      28: astore_1
      29: aload_1
      30: iconst_0
      31: ldc           #34                 // String ,
      33: aastore
      34: aload_1
      35: iconst_0
      36: iconst_0
      37: bipush        6
      39: aconst_null
      40: invokestatic  #40                 // Method kotlin/text/StringsKt.split$default:(Ljava/lang/CharSequence;[Ljava/lang/String;ZIILjava/lang/Object;)Ljava/util/List;
      43: checkcast     #42                 // class java/lang/Iterable
      46: astore_1
      47: nop
      48: iconst_0
      49: istore_2
      50: aload_1
      51: astore_3
      52: new           #44                 // class java/util/ArrayList
      55: dup
      56: aload_1
      57: bipush        10
      59: invokestatic  #50                 // Method kotlin/collections/CollectionsKt.collectionSizeOrDefault:(Ljava/lang/Iterable;I)I
      62: invokespecial #53                 // Method java/util/ArrayList."<init>":(I)V
      65: checkcast     #55                 // class java/util/Collection
      68: astore        4
      70: iconst_0
      71: istore        5
      73: aload_3
      74: invokeinterface #59,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
      79: astore        6
      81: aload         6
      83: invokeinterface #65,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
      88: ifeq          135
      91: aload         6
      93: invokeinterface #69,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
      98: astore        7
     100: aload         4
     102: aload         7
     104: checkcast     #32                 // class java/lang/String
     107: astore        8
     109: astore        11
     111: iconst_0
     112: istore        9
     114: aload         8
     116: invokestatic  #75                 // Method java/lang/Integer.parseInt:(Ljava/lang/String;)I
     119: nop
     120: invokestatic  #79                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     123: aload         11
     125: swap
     126: invokeinterface #83,  2           // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     131: pop
     132: goto          81
     135: aload         4
     137: checkcast     #24                 // class java/util/List
     140: nop
     141: astore_0
     142: new           #85                 // class java/util/LinkedHashMap
     145: dup
     146: invokespecial #88                 // Method java/util/LinkedHashMap."<init>":()V
     149: checkcast     #90                 // class java/util/Map
     152: astore_1
     153: aload_0
     154: checkcast     #42                 // class java/lang/Iterable
     157: astore_2
     158: iconst_0
     159: istore_3
     160: aload_2
     161: invokeinterface #59,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     166: astore        4
     168: aload         4
     170: invokeinterface #65,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     175: ifeq          251
     178: aload         4
     180: invokeinterface #69,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     185: astore        5
     187: aload         5
     189: checkcast     #92                 // class java/lang/Number
     192: invokevirtual #96                 // Method java/lang/Number.intValue:()I
     195: istore        6
     197: iconst_0
     198: istore        7
     200: aload_1
     201: iload         6
     203: invokestatic  #79                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     206: lconst_0
     207: invokestatic  #101                // Method java/lang/Long.valueOf:(J)Ljava/lang/Long;
     210: invokeinterface #105,  3          // InterfaceMethod java/util/Map.getOrDefault:(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
     215: checkcast     #92                 // class java/lang/Number
     218: invokevirtual #109                // Method java/lang/Number.longValue:()J
     221: lstore        8
     223: iload         6
     225: invokestatic  #79                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     228: astore        10
     230: aload_1
     231: aload         10
     233: lload         8
     235: lconst_1
     236: ladd
     237: invokestatic  #101                // Method java/lang/Long.valueOf:(J)Ljava/lang/Long;
     240: invokeinterface #112,  3          // InterfaceMethod java/util/Map.put:(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
     245: pop
     246: nop
     247: nop
     248: goto          168
     251: nop
     252: aload_1
     253: areturn

  public static final void simulateLanternFishes(java.util.Map<java.lang.Integer, java.lang.Long>);
    Code:
       0: aload_0
       1: ldc           #141                // String <this>
       3: invokestatic  #147                // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: aload_0
       7: iconst_0
       8: invokestatic  #79                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
      11: invokeinterface #150,  2          // InterfaceMethod java/util/Map.get:(Ljava/lang/Object;)Ljava/lang/Object;
      16: checkcast     #98                 // class java/lang/Long
      19: dup
      20: ifnull        29
      23: invokevirtual #151                // Method java/lang/Long.longValue:()J
      26: goto          31
      29: pop
      30: lconst_0
      31: lstore_1
      32: iconst_1
      33: istore_3
      34: iload_3
      35: bipush        9
      37: if_icmpge     91
      40: aload_0
      41: iload_3
      42: invokestatic  #79                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
      45: invokeinterface #150,  2          // InterfaceMethod java/util/Map.get:(Ljava/lang/Object;)Ljava/lang/Object;
      50: checkcast     #98                 // class java/lang/Long
      53: dup
      54: ifnull        63
      57: invokevirtual #151                // Method java/lang/Long.longValue:()J
      60: goto          65
      63: pop
      64: lconst_0
      65: lstore        4
      67: aload_0
      68: iload_3
      69: iconst_1
      70: isub
      71: invokestatic  #79                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
      74: lload         4
      76: invokestatic  #101                // Method java/lang/Long.valueOf:(J)Ljava/lang/Long;
      79: invokeinterface #112,  3          // InterfaceMethod java/util/Map.put:(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
      84: pop
      85: iinc          3, 1
      88: goto          34
      91: aload_0
      92: bipush        8
      94: invokestatic  #79                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
      97: lload_1
      98: invokestatic  #101                // Method java/lang/Long.valueOf:(J)Ljava/lang/Long;
     101: invokeinterface #112,  3          // InterfaceMethod java/util/Map.put:(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
     106: pop
     107: aload_0
     108: bipush        6
     110: invokestatic  #79                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     113: invokeinterface #150,  2          // InterfaceMethod java/util/Map.get:(Ljava/lang/Object;)Ljava/lang/Object;
     118: checkcast     #98                 // class java/lang/Long
     121: dup
     122: ifnull        131
     125: invokevirtual #151                // Method java/lang/Long.longValue:()J
     128: goto          133
     131: pop
     132: lconst_0
     133: lstore_3
     134: aload_0
     135: bipush        6
     137: invokestatic  #79                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     140: lload_3
     141: lload_1
     142: ladd
     143: invokestatic  #101                // Method java/lang/Long.valueOf:(J)Ljava/lang/Long;
     146: invokeinterface #112,  3          // InterfaceMethod java/util/Map.put:(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
     151: pop
     152: return

  public static final void part2();
    Code:
       0: invokestatic  #158                // Method readFishMap:()Ljava/util/Map;
       3: astore_0
       4: getstatic     #164                // Field java/lang/System.out:Ljava/io/PrintStream;
       7: aload_0
       8: invokevirtual #170                // Method java/io/PrintStream.println:(Ljava/lang/Object;)V
      11: sipush        256
      14: istore_1
      15: iconst_0
      16: istore_2
      17: iload_2
      18: iload_1
      19: if_icmpge     38
      22: iload_2
      23: istore_3
      24: iconst_0
      25: istore        4
      27: aload_0
      28: invokestatic  #172                // Method simulateLanternFishes:(Ljava/util/Map;)V
      31: nop
      32: iinc          2, 1
      35: goto          17
      38: getstatic     #164                // Field java/lang/System.out:Ljava/io/PrintStream;
      41: aload_0
      42: invokevirtual #170                // Method java/io/PrintStream.println:(Ljava/lang/Object;)V
      45: aload_0
      46: invokeinterface #176,  1          // InterfaceMethod java/util/Map.values:()Ljava/util/Collection;
      51: checkcast     #42                 // class java/lang/Iterable
      54: invokestatic  #180                // Method kotlin/collections/CollectionsKt.sumOfLong:(Ljava/lang/Iterable;)J
      57: lstore_1
      58: new           #182                // class java/lang/StringBuilder
      61: dup
      62: invokespecial #183                // Method java/lang/StringBuilder."<init>":()V
      65: ldc           #185                // String Total fishes:
      67: invokevirtual #189                // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
      70: lload_1
      71: invokevirtual #192                // Method java/lang/StringBuilder.append:(J)Ljava/lang/StringBuilder;
      74: invokevirtual #196                // Method java/lang/StringBuilder.toString:()Ljava/lang/String;
      77: getstatic     #164                // Field java/lang/System.out:Ljava/io/PrintStream;
      80: swap
      81: invokevirtual #170                // Method java/io/PrintStream.println:(Ljava/lang/Object;)V
      84: return

  public static final void part1();
    Code:
       0: invokestatic  #158                // Method readFishMap:()Ljava/util/Map;
       3: astore_0
       4: getstatic     #164                // Field java/lang/System.out:Ljava/io/PrintStream;
       7: aload_0
       8: invokevirtual #170                // Method java/io/PrintStream.println:(Ljava/lang/Object;)V
      11: bipush        80
      13: istore_1
      14: iconst_0
      15: istore_2
      16: iload_2
      17: iload_1
      18: if_icmpge     37
      21: iload_2
      22: istore_3
      23: iconst_0
      24: istore        4
      26: aload_0
      27: invokestatic  #172                // Method simulateLanternFishes:(Ljava/util/Map;)V
      30: nop
      31: iinc          2, 1
      34: goto          16
      37: getstatic     #164                // Field java/lang/System.out:Ljava/io/PrintStream;
      40: aload_0
      41: invokevirtual #170                // Method java/io/PrintStream.println:(Ljava/lang/Object;)V
      44: aload_0
      45: invokeinterface #176,  1          // InterfaceMethod java/util/Map.values:()Ljava/util/Collection;
      50: checkcast     #42                 // class java/lang/Iterable
      53: invokestatic  #180                // Method kotlin/collections/CollectionsKt.sumOfLong:(Ljava/lang/Iterable;)J
      56: lstore_1
      57: new           #182                // class java/lang/StringBuilder
      60: dup
      61: invokespecial #183                // Method java/lang/StringBuilder."<init>":()V
      64: ldc           #185                // String Total fishes:
      66: invokevirtual #189                // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
      69: lload_1
      70: invokevirtual #192                // Method java/lang/StringBuilder.append:(J)Ljava/lang/StringBuilder;
      73: invokevirtual #196                // Method java/lang/StringBuilder.toString:()Ljava/lang/String;
      76: getstatic     #164                // Field java/lang/System.out:Ljava/io/PrintStream;
      79: swap
      80: invokevirtual #170                // Method java/io/PrintStream.println:(Ljava/lang/Object;)V
      83: return

  public static final void main();
    Code:
       0: invokestatic  #203                // Method part2:()V
       3: return

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


import java.io.*
import java.math.*
import java.security.*
import java.text.*
import java.util.*
import java.util.concurrent.*
import java.util.function.*
import java.util.regex.*
import java.util.stream.*
import kotlin.collections.*
import kotlin.comparisons.*
import kotlin.io.*
import kotlin.jvm.*
import kotlin.jvm.functions.*
import kotlin.jvm.internal.*
import kotlin.ranges.*
import kotlin.sequences.*
import kotlin.text.*

// Complete the organizingContainers function below.
fun organizingContainers(container: Array<Array<Int>>)
        : String = when (MyOrganizingContainers(container)) {
    true -> "Possible"
    else -> "Impossible"
}

fun MyOrganizingContainers(containers: Array<Array<Int>>): Boolean {
    val cons = Array(containers.size) { 0 }
    val types = Array(containers.size) { 0 }
    containers.forEachIndexed { containerIndex, container ->
        container.forEachIndexed { typeIndex, type ->
            cons[containerIndex] += type
            types[typeIndex] += type
        } }

    println(Arrays.deepToString(cons))
    println(Arrays.deepToString(types))
    val consList = cons.sortedArray().toList()
    val typesList = types.sortedArray().toList()

    return consList == typesList
}

fun main(args: Array<String>) {
    val inputs = listOf(
        arrayOf(arrayOf(1, 3, 1), arrayOf(2, 1, 2), arrayOf(3, 3, 3))
        , arrayOf(arrayOf(0, 2, 1), arrayOf(1, 1, 1), arrayOf(2, 0, 0))
    )

    inputs
        .map { organizingContainers(it) }
        .forEach { println(it) }
}

Compiled from "OrganizingContainersOfBalls.kt"
public final class OrganizingContainersOfBallsKt {
  public static final java.lang.String organizingContainers(java.lang.Integer[][]);
    Code:
       0: aload_0
       1: ldc           #9                  // String container
       3: invokestatic  #15                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: aload_0
       7: invokestatic  #19                 // Method MyOrganizingContainers:([[Ljava/lang/Integer;)Z
      10: iconst_1
      11: if_icmpne     19
      14: ldc           #21                 // String Possible
      16: goto          21
      19: ldc           #23                 // String Impossible
      21: areturn

  public static final boolean MyOrganizingContainers(java.lang.Integer[][]);
    Code:
       0: aload_0
       1: ldc           #28                 // String containers
       3: invokestatic  #15                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: iconst_0
       7: istore_2
       8: aload_0
       9: checkcast     #30                 // class "[Ljava/lang/Object;"
      12: arraylength
      13: istore_3
      14: iload_3
      15: anewarray     #32                 // class java/lang/Integer
      18: astore        4
      20: iload_2
      21: iload_3
      22: if_icmpge     43
      25: iload_2
      26: istore        5
      28: aload         4
      30: iload         5
      32: iconst_0
      33: invokestatic  #36                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
      36: aastore
      37: iinc          2, 1
      40: goto          20
      43: aload         4
      45: astore_1
      46: iconst_0
      47: istore_3
      48: aload_0
      49: checkcast     #30                 // class "[Ljava/lang/Object;"
      52: arraylength
      53: istore        4
      55: iload         4
      57: anewarray     #32                 // class java/lang/Integer
      60: astore        5
      62: iload_3
      63: iload         4
      65: if_icmpge     86
      68: iload_3
      69: istore        6
      71: aload         5
      73: iload         6
      75: iconst_0
      76: invokestatic  #36                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
      79: aastore
      80: iinc          3, 1
      83: goto          62
      86: aload         5
      88: astore_2
      89: aload_0
      90: checkcast     #30                 // class "[Ljava/lang/Object;"
      93: astore_3
      94: iconst_0
      95: istore        4
      97: iconst_0
      98: istore        5
     100: iconst_0
     101: istore        6
     103: aload_3
     104: arraylength
     105: istore        7
     107: iload         6
     109: iload         7
     111: if_icmpge     240
     114: aload_3
     115: iload         6
     117: aaload
     118: astore        8
     120: iload         5
     122: iinc          5, 1
     125: aload         8
     127: checkcast     #38                 // class "[Ljava/lang/Integer;"
     130: astore        9
     132: istore        10
     134: iconst_0
     135: istore        11
     137: aload         9
     139: astore        12
     141: iconst_0
     142: istore        13
     144: iconst_0
     145: istore        14
     147: iconst_0
     148: istore        15
     150: aload         12
     152: arraylength
     153: istore        16
     155: iload         15
     157: iload         16
     159: if_icmpge     231
     162: aload         12
     164: iload         15
     166: aaload
     167: astore        17
     169: iload         14
     171: iinc          14, 1
     174: aload         17
     176: checkcast     #40                 // class java/lang/Number
     179: invokevirtual #44                 // Method java/lang/Number.intValue:()I
     182: istore        18
     184: istore        19
     186: iconst_0
     187: istore        20
     189: aload_1
     190: iload         10
     192: aload_1
     193: iload         10
     195: aaload
     196: invokevirtual #45                 // Method java/lang/Integer.intValue:()I
     199: iload         18
     201: iadd
     202: invokestatic  #36                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     205: aastore
     206: aload_2
     207: iload         19
     209: aload_2
     210: iload         19
     212: aaload
     213: invokevirtual #45                 // Method java/lang/Integer.intValue:()I
     216: iload         18
     218: iadd
     219: invokestatic  #36                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     222: aastore
     223: nop
     224: nop
     225: iinc          15, 1
     228: goto          155
     231: nop
     232: nop
     233: nop
     234: iinc          6, 1
     237: goto          107
     240: nop
     241: aload_1
     242: invokestatic  #51                 // Method java/util/Arrays.deepToString:([Ljava/lang/Object;)Ljava/lang/String;
     245: getstatic     #57                 // Field java/lang/System.out:Ljava/io/PrintStream;
     248: swap
     249: invokevirtual #63                 // Method java/io/PrintStream.println:(Ljava/lang/Object;)V
     252: aload_2
     253: invokestatic  #51                 // Method java/util/Arrays.deepToString:([Ljava/lang/Object;)Ljava/lang/String;
     256: getstatic     #57                 // Field java/lang/System.out:Ljava/io/PrintStream;
     259: swap
     260: invokevirtual #63                 // Method java/io/PrintStream.println:(Ljava/lang/Object;)V
     263: aload_1
     264: checkcast     #65                 // class "[Ljava/lang/Comparable;"
     267: invokestatic  #71                 // Method kotlin/collections/ArraysKt.sortedArray:([Ljava/lang/Comparable;)[Ljava/lang/Comparable;
     270: invokestatic  #75                 // Method kotlin/collections/ArraysKt.toList:([Ljava/lang/Object;)Ljava/util/List;
     273: astore_3
     274: aload_2
     275: checkcast     #65                 // class "[Ljava/lang/Comparable;"
     278: invokestatic  #71                 // Method kotlin/collections/ArraysKt.sortedArray:([Ljava/lang/Comparable;)[Ljava/lang/Comparable;
     281: invokestatic  #75                 // Method kotlin/collections/ArraysKt.toList:([Ljava/lang/Object;)Ljava/util/List;
     284: astore        4
     286: aload_3
     287: aload         4
     289: invokestatic  #79                 // Method kotlin/jvm/internal/Intrinsics.areEqual:(Ljava/lang/Object;Ljava/lang/Object;)Z
     292: ireturn

  public static final void main(java.lang.String[]);
    Code:
       0: aload_0
       1: ldc           #100                // String args
       3: invokestatic  #15                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: iconst_2
       7: anewarray     #96                 // class "[[Ljava/lang/Integer;"
      10: astore_2
      11: aload_2
      12: iconst_0
      13: iconst_3
      14: anewarray     #38                 // class "[Ljava/lang/Integer;"
      17: astore_3
      18: aload_3
      19: iconst_0
      20: iconst_3
      21: anewarray     #32                 // class java/lang/Integer
      24: astore        4
      26: aload         4
      28: iconst_0
      29: iconst_1
      30: invokestatic  #36                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
      33: aastore
      34: aload         4
      36: iconst_1
      37: iconst_3
      38: invokestatic  #36                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
      41: aastore
      42: aload         4
      44: iconst_2
      45: iconst_1
      46: invokestatic  #36                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
      49: aastore
      50: aload         4
      52: aastore
      53: aload_3
      54: iconst_1
      55: iconst_3
      56: anewarray     #32                 // class java/lang/Integer
      59: astore        4
      61: aload         4
      63: iconst_0
      64: iconst_2
      65: invokestatic  #36                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
      68: aastore
      69: aload         4
      71: iconst_1
      72: iconst_1
      73: invokestatic  #36                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
      76: aastore
      77: aload         4
      79: iconst_2
      80: iconst_2
      81: invokestatic  #36                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
      84: aastore
      85: aload         4
      87: aastore
      88: aload_3
      89: iconst_2
      90: iconst_3
      91: anewarray     #32                 // class java/lang/Integer
      94: astore        4
      96: aload         4
      98: iconst_0
      99: iconst_3
     100: invokestatic  #36                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     103: aastore
     104: aload         4
     106: iconst_1
     107: iconst_3
     108: invokestatic  #36                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     111: aastore
     112: aload         4
     114: iconst_2
     115: iconst_3
     116: invokestatic  #36                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     119: aastore
     120: aload         4
     122: aastore
     123: aload_3
     124: aastore
     125: aload_2
     126: iconst_1
     127: iconst_3
     128: anewarray     #38                 // class "[Ljava/lang/Integer;"
     131: astore_3
     132: aload_3
     133: iconst_0
     134: iconst_3
     135: anewarray     #32                 // class java/lang/Integer
     138: astore        4
     140: aload         4
     142: iconst_0
     143: iconst_0
     144: invokestatic  #36                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     147: aastore
     148: aload         4
     150: iconst_1
     151: iconst_2
     152: invokestatic  #36                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     155: aastore
     156: aload         4
     158: iconst_2
     159: iconst_1
     160: invokestatic  #36                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     163: aastore
     164: aload         4
     166: aastore
     167: aload_3
     168: iconst_1
     169: iconst_3
     170: anewarray     #32                 // class java/lang/Integer
     173: astore        4
     175: aload         4
     177: iconst_0
     178: iconst_1
     179: invokestatic  #36                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     182: aastore
     183: aload         4
     185: iconst_1
     186: iconst_1
     187: invokestatic  #36                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     190: aastore
     191: aload         4
     193: iconst_2
     194: iconst_1
     195: invokestatic  #36                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     198: aastore
     199: aload         4
     201: aastore
     202: aload_3
     203: iconst_2
     204: iconst_3
     205: anewarray     #32                 // class java/lang/Integer
     208: astore        4
     210: aload         4
     212: iconst_0
     213: iconst_2
     214: invokestatic  #36                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     217: aastore
     218: aload         4
     220: iconst_1
     221: iconst_0
     222: invokestatic  #36                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     225: aastore
     226: aload         4
     228: iconst_2
     229: iconst_0
     230: invokestatic  #36                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     233: aastore
     234: aload         4
     236: aastore
     237: aload_3
     238: aastore
     239: aload_2
     240: checkcast     #30                 // class "[Ljava/lang/Object;"
     243: invokestatic  #105                // Method kotlin/collections/CollectionsKt.listOf:([Ljava/lang/Object;)Ljava/util/List;
     246: astore_1
     247: aload_1
     248: checkcast     #107                // class java/lang/Iterable
     251: astore_2
     252: nop
     253: iconst_0
     254: istore_3
     255: aload_2
     256: astore        4
     258: new           #109                // class java/util/ArrayList
     261: dup
     262: aload_2
     263: bipush        10
     265: invokestatic  #113                // Method kotlin/collections/CollectionsKt.collectionSizeOrDefault:(Ljava/lang/Iterable;I)I
     268: invokespecial #117                // Method java/util/ArrayList."<init>":(I)V
     271: checkcast     #119                // class java/util/Collection
     274: astore        5
     276: iconst_0
     277: istore        6
     279: aload         4
     281: invokeinterface #123,  1          // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     286: astore        7
     288: aload         7
     290: invokeinterface #129,  1          // InterfaceMethod java/util/Iterator.hasNext:()Z
     295: ifeq          338
     298: aload         7
     300: invokeinterface #133,  1          // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     305: astore        8
     307: aload         5
     309: aload         8
     311: checkcast     #96                 // class "[[Ljava/lang/Integer;"
     314: astore        9
     316: astore        11
     318: iconst_0
     319: istore        10
     321: aload         9
     323: invokestatic  #135                // Method organizingContainers:([[Ljava/lang/Integer;)Ljava/lang/String;
     326: aload         11
     328: swap
     329: invokeinterface #139,  2          // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     334: pop
     335: goto          288
     338: aload         5
     340: checkcast     #141                // class java/util/List
     343: nop
     344: checkcast     #107                // class java/lang/Iterable
     347: astore_2
     348: nop
     349: iconst_0
     350: istore_3
     351: aload_2
     352: invokeinterface #123,  1          // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     357: astore        4
     359: aload         4
     361: invokeinterface #129,  1          // InterfaceMethod java/util/Iterator.hasNext:()Z
     366: ifeq          401
     369: aload         4
     371: invokeinterface #133,  1          // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     376: astore        5
     378: aload         5
     380: checkcast     #26                 // class java/lang/String
     383: astore        6
     385: iconst_0
     386: istore        7
     388: getstatic     #57                 // Field java/lang/System.out:Ljava/io/PrintStream;
     391: aload         6
     393: invokevirtual #63                 // Method java/io/PrintStream.println:(Ljava/lang/Object;)V
     396: nop
     397: nop
     398: goto          359
     401: nop
     402: return
}


import java.io.*
import java.math.*
import java.security.*
import java.text.*
import java.util.*
import java.util.concurrent.*
import java.util.function.*
import java.util.regex.*
import java.util.stream.*
import kotlin.collections.*
import kotlin.comparisons.*
import kotlin.io.*
import kotlin.jvm.*
import kotlin.jvm.functions.*
import kotlin.jvm.internal.*
import kotlin.ranges.*
import kotlin.sequences.*
import kotlin.text.*

// Complete the plusMinus function below.
fun multipliedBigNumbers(number1: String, number2: String): String {
    return realMul(number1.toCharArray(), number2.toCharArray()).joinToString("")
}

fun realMul(number1: CharArray, number2: CharArray): CharArray {
    val results = (0..9).map {
        mulSingle(number1, it)
    }

    results.map { it.joinToString { "" } }.forEach{println(it)}

    return charArrayOf('3', '4')
}

fun mulSingle(number1: CharArray, target: Int): CharArray {
    val result = CharArray(number1.size + 1){ '0' }
    number1.reversed().forEachIndexed { index, c ->
        val r = c.toInt() * target
        if (r > 9) result[index + 1] = 1.toChar()
        val sum = result[index].toInt() + r % 10
        if (sum > 9 ) result[index + 1] = (result[index + 1].toInt() + 1).toChar()
        result[index] = (result[index].toInt() + sum % 10).toChar()
    }
    return result
}

fun input() {
    val scan = Scanner(System.`in`)

    val arr = scan.nextLine().split(" ").map{ it.trim() }.toTypedArray()

    multipliedBigNumbers(arr[0], arr[1])
}

fun auto() {
    val result = multipliedBigNumbers("4819", "9")
    println(result)
}
fun main(args: Array<String>) {
//    input()
    auto()
}

Compiled from "BigNumberMultiplication.kt"
public final class BigNumberMultiplicationKt {
  public static final java.lang.String multipliedBigNumbers(java.lang.String, java.lang.String);
    Code:
       0: aload_0
       1: ldc           #9                  // String number1
       3: invokestatic  #15                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: aload_1
       7: ldc           #17                 // String number2
       9: invokestatic  #15                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
      12: aload_0
      13: invokevirtual #23                 // Method java/lang/String.toCharArray:()[C
      16: dup
      17: ldc           #25                 // String toCharArray(...)
      19: invokestatic  #28                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullExpressionValue:(Ljava/lang/Object;Ljava/lang/String;)V
      22: aload_1
      23: invokevirtual #23                 // Method java/lang/String.toCharArray:()[C
      26: dup
      27: ldc           #25                 // String toCharArray(...)
      29: invokestatic  #28                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullExpressionValue:(Ljava/lang/Object;Ljava/lang/String;)V
      32: invokestatic  #32                 // Method realMul:([C[C)[C
      35: ldc           #34                 // String
      37: checkcast     #36                 // class java/lang/CharSequence
      40: aconst_null
      41: aconst_null
      42: iconst_0
      43: aconst_null
      44: aconst_null
      45: bipush        62
      47: aconst_null
      48: invokestatic  #42                 // Method kotlin/collections/ArraysKt.joinToString$default:([CLjava/lang/CharSequence;Ljava/lang/CharSequence;Ljava/lang/CharSequence;ILjava/lang/CharSequence;Lkotlin/jvm/functions/Function1;ILjava/lang/Object;)Ljava/lang/String;
      51: areturn

  public static final char[] realMul(char[], char[]);
    Code:
       0: aload_0
       1: ldc           #9                  // String number1
       3: invokestatic  #15                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: aload_1
       7: ldc           #17                 // String number2
       9: invokestatic  #15                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
      12: new           #45                 // class kotlin/ranges/IntRange
      15: dup
      16: iconst_0
      17: bipush        9
      19: invokespecial #49                 // Method kotlin/ranges/IntRange."<init>":(II)V
      22: checkcast     #51                 // class java/lang/Iterable
      25: astore_3
      26: iconst_0
      27: istore        4
      29: aload_3
      30: astore        5
      32: new           #53                 // class java/util/ArrayList
      35: dup
      36: aload_3
      37: bipush        10
      39: invokestatic  #59                 // Method kotlin/collections/CollectionsKt.collectionSizeOrDefault:(Ljava/lang/Iterable;I)I
      42: invokespecial #62                 // Method java/util/ArrayList."<init>":(I)V
      45: checkcast     #64                 // class java/util/Collection
      48: astore        6
      50: iconst_0
      51: istore        7
      53: aload         5
      55: invokeinterface #68,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
      60: astore        8
      62: aload         8
      64: invokeinterface #74,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
      69: ifeq          111
      72: aload         8
      74: checkcast     #76                 // class kotlin/collections/IntIterator
      77: invokevirtual #80                 // Method kotlin/collections/IntIterator.nextInt:()I
      80: istore        9
      82: aload         6
      84: iload         9
      86: istore        10
      88: astore        12
      90: iconst_0
      91: istore        11
      93: aload_0
      94: iload         10
      96: invokestatic  #84                 // Method mulSingle:([CI)[C
      99: aload         12
     101: swap
     102: invokeinterface #88,  2           // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     107: pop
     108: goto          62
     111: aload         6
     113: checkcast     #90                 // class java/util/List
     116: nop
     117: astore_2
     118: aload_2
     119: checkcast     #51                 // class java/lang/Iterable
     122: astore_3
     123: iconst_0
     124: istore        4
     126: aload_3
     127: astore        5
     129: new           #53                 // class java/util/ArrayList
     132: dup
     133: aload_3
     134: bipush        10
     136: invokestatic  #59                 // Method kotlin/collections/CollectionsKt.collectionSizeOrDefault:(Ljava/lang/Iterable;I)I
     139: invokespecial #62                 // Method java/util/ArrayList."<init>":(I)V
     142: checkcast     #64                 // class java/util/Collection
     145: astore        6
     147: iconst_0
     148: istore        7
     150: aload         5
     152: invokeinterface #68,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     157: astore        8
     159: aload         8
     161: invokeinterface #74,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     166: ifeq          222
     169: aload         8
     171: invokeinterface #94,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     176: astore        9
     178: aload         6
     180: aload         9
     182: checkcast     #96                 // class "[C"
     185: astore        10
     187: astore        12
     189: iconst_0
     190: istore        11
     192: aload         10
     194: aconst_null
     195: aconst_null
     196: aconst_null
     197: iconst_0
     198: aconst_null
     199: invokedynamic #116,  0            // InvokeDynamic #0:invoke:()Lkotlin/jvm/functions/Function1;
     204: bipush        31
     206: aconst_null
     207: invokestatic  #42                 // Method kotlin/collections/ArraysKt.joinToString$default:([CLjava/lang/CharSequence;Ljava/lang/CharSequence;Ljava/lang/CharSequence;ILjava/lang/CharSequence;Lkotlin/jvm/functions/Function1;ILjava/lang/Object;)Ljava/lang/String;
     210: aload         12
     212: swap
     213: invokeinterface #88,  2           // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     218: pop
     219: goto          159
     222: aload         6
     224: checkcast     #90                 // class java/util/List
     227: nop
     228: checkcast     #51                 // class java/lang/Iterable
     231: astore_3
     232: nop
     233: iconst_0
     234: istore        4
     236: aload_3
     237: invokeinterface #68,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     242: astore        5
     244: aload         5
     246: invokeinterface #74,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     251: ifeq          286
     254: aload         5
     256: invokeinterface #94,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     261: astore        6
     263: aload         6
     265: checkcast     #19                 // class java/lang/String
     268: astore        7
     270: iconst_0
     271: istore        8
     273: getstatic     #122                // Field java/lang/System.out:Ljava/io/PrintStream;
     276: aload         7
     278: invokevirtual #128                // Method java/io/PrintStream.println:(Ljava/lang/Object;)V
     281: nop
     282: nop
     283: goto          244
     286: nop
     287: iconst_2
     288: newarray       char
     290: astore_3
     291: aload_3
     292: iconst_0
     293: bipush        51
     295: castore
     296: aload_3
     297: iconst_1
     298: bipush        52
     300: castore
     301: aload_3
     302: areturn

  public static final char[] mulSingle(char[], int);
    Code:
       0: aload_0
       1: ldc           #9                  // String number1
       3: invokestatic  #15                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: iconst_0
       7: istore_3
       8: aload_0
       9: arraylength
      10: iconst_1
      11: iadd
      12: istore        4
      14: iload         4
      16: newarray       char
      18: astore        5
      20: iload_3
      21: iload         4
      23: if_icmpge     42
      26: iload_3
      27: istore        6
      29: aload         5
      31: iload         6
      33: bipush        48
      35: castore
      36: iinc          3, 1
      39: goto          20
      42: aload         5
      44: astore_2
      45: aload_0
      46: invokestatic  #151                // Method kotlin/collections/ArraysKt.reversed:([C)Ljava/util/List;
      49: checkcast     #51                 // class java/lang/Iterable
      52: astore_3
      53: iconst_0
      54: istore        4
      56: iconst_0
      57: istore        5
      59: aload_3
      60: invokeinterface #68,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
      65: astore        6
      67: aload         6
      69: invokeinterface #74,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
      74: ifeq          192
      77: aload         6
      79: invokeinterface #94,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
      84: astore        7
      86: iload         5
      88: iinc          5, 1
      91: istore        8
      93: iload         8
      95: ifge          101
      98: invokestatic  #155                // Method kotlin/collections/CollectionsKt.throwIndexOverflow:()V
     101: iload         8
     103: aload         7
     105: checkcast     #157                // class java/lang/Character
     108: invokevirtual #161                // Method java/lang/Character.charValue:()C
     111: istore        9
     113: istore        10
     115: iconst_0
     116: istore        11
     118: iload         9
     120: iload_1
     121: imul
     122: istore        12
     124: iload         12
     126: bipush        9
     128: if_icmple     138
     131: aload_2
     132: iload         10
     134: iconst_1
     135: iadd
     136: iconst_1
     137: castore
     138: aload_2
     139: iload         10
     141: caload
     142: iload         12
     144: bipush        10
     146: irem
     147: iadd
     148: istore        13
     150: iload         13
     152: bipush        9
     154: if_icmple     172
     157: aload_2
     158: iload         10
     160: iconst_1
     161: iadd
     162: aload_2
     163: iload         10
     165: iconst_1
     166: iadd
     167: caload
     168: iconst_1
     169: iadd
     170: i2c
     171: castore
     172: aload_2
     173: iload         10
     175: aload_2
     176: iload         10
     178: caload
     179: iload         13
     181: bipush        10
     183: irem
     184: iadd
     185: i2c
     186: castore
     187: nop
     188: nop
     189: goto          67
     192: nop
     193: aload_2
     194: areturn

  public static final void input();
    Code:
       0: new           #176                // class java/util/Scanner
       3: dup
       4: getstatic     #180                // Field java/lang/System.in:Ljava/io/InputStream;
       7: invokespecial #183                // Method java/util/Scanner."<init>":(Ljava/io/InputStream;)V
      10: astore_0
      11: aload_0
      12: invokevirtual #187                // Method java/util/Scanner.nextLine:()Ljava/lang/String;
      15: dup
      16: ldc           #189                // String nextLine(...)
      18: invokestatic  #28                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullExpressionValue:(Ljava/lang/Object;Ljava/lang/String;)V
      21: checkcast     #36                 // class java/lang/CharSequence
      24: iconst_1
      25: anewarray     #19                 // class java/lang/String
      28: astore_2
      29: aload_2
      30: iconst_0
      31: ldc           #191                // String
      33: aastore
      34: aload_2
      35: iconst_0
      36: iconst_0
      37: bipush        6
      39: aconst_null
      40: invokestatic  #197                // Method kotlin/text/StringsKt.split$default:(Ljava/lang/CharSequence;[Ljava/lang/String;ZIILjava/lang/Object;)Ljava/util/List;
      43: checkcast     #51                 // class java/lang/Iterable
      46: astore_2
      47: iconst_0
      48: istore_3
      49: aload_2
      50: astore        4
      52: new           #53                 // class java/util/ArrayList
      55: dup
      56: aload_2
      57: bipush        10
      59: invokestatic  #59                 // Method kotlin/collections/CollectionsKt.collectionSizeOrDefault:(Ljava/lang/Iterable;I)I
      62: invokespecial #62                 // Method java/util/ArrayList."<init>":(I)V
      65: checkcast     #64                 // class java/util/Collection
      68: astore        5
      70: iconst_0
      71: istore        6
      73: aload         4
      75: invokeinterface #68,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
      80: astore        7
      82: aload         7
      84: invokeinterface #74,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
      89: ifeq          139
      92: aload         7
      94: invokeinterface #94,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
      99: astore        8
     101: aload         5
     103: aload         8
     105: checkcast     #19                 // class java/lang/String
     108: astore        9
     110: astore        11
     112: iconst_0
     113: istore        10
     115: aload         9
     117: checkcast     #36                 // class java/lang/CharSequence
     120: invokestatic  #201                // Method kotlin/text/StringsKt.trim:(Ljava/lang/CharSequence;)Ljava/lang/CharSequence;
     123: invokevirtual #204                // Method java/lang/Object.toString:()Ljava/lang/String;
     126: nop
     127: aload         11
     129: swap
     130: invokeinterface #88,  2           // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     135: pop
     136: goto          82
     139: aload         5
     141: checkcast     #90                 // class java/util/List
     144: nop
     145: checkcast     #64                 // class java/util/Collection
     148: astore_2
     149: nop
     150: iconst_0
     151: istore_3
     152: aload_2
     153: astore        4
     155: aload         4
     157: iconst_0
     158: anewarray     #19                 // class java/lang/String
     161: invokeinterface #208,  2          // InterfaceMethod java/util/Collection.toArray:([Ljava/lang/Object;)[Ljava/lang/Object;
     166: checkcast     #210                // class "[Ljava/lang/String;"
     169: astore_1
     170: aload_1
     171: iconst_0
     172: aaload
     173: aload_1
     174: iconst_1
     175: aaload
     176: invokestatic  #212                // Method multipliedBigNumbers:(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
     179: pop
     180: return

  public static final void auto();
    Code:
       0: ldc           #222                // String 4819
       2: ldc           #224                // String 9
       4: invokestatic  #212                // Method multipliedBigNumbers:(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
       7: astore_0
       8: getstatic     #122                // Field java/lang/System.out:Ljava/io/PrintStream;
      11: aload_0
      12: invokevirtual #128                // Method java/io/PrintStream.println:(Ljava/lang/Object;)V
      15: return

  public static final void main(java.lang.String[]);
    Code:
       0: aload_0
       1: ldc           #228                // String args
       3: invokestatic  #15                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: invokestatic  #230                // Method auto:()V
       9: return

  private static final java.lang.CharSequence realMul$lambda$2$lambda$1(char);
    Code:
       0: ldc           #34                 // String
       2: checkcast     #36                 // class java/lang/CharSequence
       5: areturn
}


import java.io.*
import java.math.*
import java.security.*
import java.text.*
import java.util.*
import java.util.concurrent.*
import java.util.function.*
import java.util.regex.*
import java.util.stream.*
import kotlin.collections.*
import kotlin.comparisons.*
import kotlin.io.*
import kotlin.jvm.*
import kotlin.jvm.functions.*
import kotlin.jvm.internal.*
import kotlin.ranges.*
import kotlin.sequences.*
import kotlin.text.*

fun recursive(w: String, best: String, bestFlag: Boolean, next: String, nextFlag: Boolean, index: Int): String {
    val subset = w.substring(1)
    val subsets = subset.mapIndexed { subIndex, char ->
        var a: CharArray = w.toCharArray()
        val temp = a[index]
        a[index] = char
        a[subIndex] = temp
        a.joinToString("")
    }
    subsets.sorted().forEach{ println(it) }
    println(subsets)
    return ""
}

// Complete the biggerIsGreater function below.
fun biggerIsGreater(w: String): String {
    return recursive(w, w, false, "", false, 0)
}

fun main(args: Array<String>) {
//    val inputs = arrayOf("ab", "bb", "hefg", "dhck", "dkhc")
    val inputs = arrayOf("hefg")
    inputs.forEach { (biggerIsGreater(it)) }
//    inputs.forEach { println(biggerIsGreater(it)) }
}

Compiled from "BiggerIsGreater.kt"
public final class BiggerIsGreaterKt {
  public static final java.lang.String recursive(java.lang.String, java.lang.String, boolean, java.lang.String, boolean, int);
    Code:
       0: aload_0
       1: ldc           #9                  // String w
       3: invokestatic  #15                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: aload_1
       7: ldc           #17                 // String best
       9: invokestatic  #15                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
      12: aload_3
      13: ldc           #19                 // String next
      15: invokestatic  #15                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
      18: aload_0
      19: iconst_1
      20: invokevirtual #25                 // Method java/lang/String.substring:(I)Ljava/lang/String;
      23: dup
      24: ldc           #27                 // String substring(...)
      26: invokestatic  #30                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullExpressionValue:(Ljava/lang/Object;Ljava/lang/String;)V
      29: astore        6
      31: aload         6
      33: checkcast     #32                 // class java/lang/CharSequence
      36: astore        8
      38: iconst_0
      39: istore        9
      41: aload         8
      43: astore        10
      45: new           #34                 // class java/util/ArrayList
      48: dup
      49: aload         8
      51: invokeinterface #38,  1           // InterfaceMethod java/lang/CharSequence.length:()I
      56: invokespecial #42                 // Method java/util/ArrayList."<init>":(I)V
      59: checkcast     #44                 // class java/util/Collection
      62: astore        11
      64: iconst_0
      65: istore        12
      67: iconst_0
      68: istore        13
      70: iconst_0
      71: istore        14
      73: iload         14
      75: aload         10
      77: invokeinterface #38,  1           // InterfaceMethod java/lang/CharSequence.length:()I
      82: if_icmpge     180
      85: aload         10
      87: iload         14
      89: invokeinterface #48,  2           // InterfaceMethod java/lang/CharSequence.charAt:(I)C
      94: istore        15
      96: aload         11
      98: iload         13
     100: iinc          13, 1
     103: iload         15
     105: istore        16
     107: istore        17
     109: astore        21
     111: iconst_0
     112: istore        18
     114: aload_0
     115: invokevirtual #52                 // Method java/lang/String.toCharArray:()[C
     118: dup
     119: ldc           #54                 // String toCharArray(...)
     121: invokestatic  #30                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullExpressionValue:(Ljava/lang/Object;Ljava/lang/String;)V
     124: astore        19
     126: aload         19
     128: iload         5
     130: caload
     131: istore        20
     133: aload         19
     135: iload         5
     137: iload         16
     139: castore
     140: aload         19
     142: iload         17
     144: iload         20
     146: castore
     147: aload         19
     149: ldc           #56                 // String
     151: checkcast     #32                 // class java/lang/CharSequence
     154: aconst_null
     155: aconst_null
     156: iconst_0
     157: aconst_null
     158: aconst_null
     159: bipush        62
     161: aconst_null
     162: invokestatic  #62                 // Method kotlin/collections/ArraysKt.joinToString$default:([CLjava/lang/CharSequence;Ljava/lang/CharSequence;Ljava/lang/CharSequence;ILjava/lang/CharSequence;Lkotlin/jvm/functions/Function1;ILjava/lang/Object;)Ljava/lang/String;
     165: aload         21
     167: swap
     168: invokeinterface #66,  2           // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     173: pop
     174: iinc          14, 1
     177: goto          73
     180: aload         11
     182: checkcast     #68                 // class java/util/List
     185: nop
     186: astore        7
     188: aload         7
     190: checkcast     #70                 // class java/lang/Iterable
     193: invokestatic  #76                 // Method kotlin/collections/CollectionsKt.sorted:(Ljava/lang/Iterable;)Ljava/util/List;
     196: checkcast     #70                 // class java/lang/Iterable
     199: astore        8
     201: iconst_0
     202: istore        9
     204: aload         8
     206: invokeinterface #80,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     211: astore        10
     213: aload         10
     215: invokeinterface #86,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     220: ifeq          255
     223: aload         10
     225: invokeinterface #89,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     230: astore        11
     232: aload         11
     234: checkcast     #21                 // class java/lang/String
     237: astore        12
     239: iconst_0
     240: istore        13
     242: getstatic     #95                 // Field java/lang/System.out:Ljava/io/PrintStream;
     245: aload         12
     247: invokevirtual #101                // Method java/io/PrintStream.println:(Ljava/lang/Object;)V
     250: nop
     251: nop
     252: goto          213
     255: nop
     256: getstatic     #95                 // Field java/lang/System.out:Ljava/io/PrintStream;
     259: aload         7
     261: invokevirtual #101                // Method java/io/PrintStream.println:(Ljava/lang/Object;)V
     264: ldc           #56                 // String
     266: areturn

  public static final java.lang.String biggerIsGreater(java.lang.String);
    Code:
       0: aload_0
       1: ldc           #9                  // String w
       3: invokestatic  #15                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: aload_0
       7: aload_0
       8: iconst_0
       9: ldc           #56                 // String
      11: iconst_0
      12: iconst_0
      13: invokestatic  #137                // Method recursive:(Ljava/lang/String;Ljava/lang/String;ZLjava/lang/String;ZI)Ljava/lang/String;
      16: areturn

  public static final void main(java.lang.String[]);
    Code:
       0: aload_0
       1: ldc           #141                // String args
       3: invokestatic  #15                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: iconst_1
       7: anewarray     #21                 // class java/lang/String
      10: astore_2
      11: aload_2
      12: iconst_0
      13: ldc           #143                // String hefg
      15: aastore
      16: aload_2
      17: astore_1
      18: aload_1
      19: astore_2
      20: iconst_0
      21: istore_3
      22: iconst_0
      23: istore        4
      25: aload_2
      26: arraylength
      27: istore        5
      29: iload         4
      31: iload         5
      33: if_icmpge     62
      36: aload_2
      37: iload         4
      39: aaload
      40: astore        6
      42: aload         6
      44: astore        7
      46: iconst_0
      47: istore        8
      49: aload         7
      51: invokestatic  #145                // Method biggerIsGreater:(Ljava/lang/String;)Ljava/lang/String;
      54: pop
      55: nop
      56: iinc          4, 1
      59: goto          29
      62: nop
      63: return
}