val digits = mapOf(
    0 to "abcefg",  // 6
    1 to "cf",      // 2
    2 to "acdeg",   // 5
    3 to "acdfg",   // 5
    4 to "bcdf",    // 4
    5 to "abdfg",   // 5
    6 to "abdefg",  // 6
    7 to "acf",     // 3
    8 to "abcdefg", // 7
    9 to "abcdfg"   // 6
)

fun main() {
    val values = generateSequence(::readLine)
        .mapNotNull { line -> line.trim().takeUnless { trimmed -> trimmed.isBlank() } }
        .toList()

    var uniqCount = 0
    var totalSum = 0
    for (line in values) {
        val split = line.split(" ")
        val possibleSignals = split.take(10)
        val valueShown = split.takeLast(4)

        uniqCount += valueShown.count { it.length == 2 || it.length == 7 || it.length == 3 || it.length == 4 }

        val mapping = mutableMapOf(
            "a" to mutableListOf("a", "b", "c", "d", "e", "f", "g"),
            "b" to mutableListOf("a", "b", "c", "d", "e", "f", "g"),
            "c" to mutableListOf("a", "b", "c", "d", "e", "f", "g"),
            "d" to mutableListOf("a", "b", "c", "d", "e", "f", "g"),
            "e" to mutableListOf("a", "b", "c", "d", "e", "f", "g"),
            "f" to mutableListOf("a", "b", "c", "d", "e", "f", "g"),
            "g" to mutableListOf("a", "b", "c", "d", "e", "f", "g")
        )

        val digitMapping = mutableMapOf<String, Int>()

        fun mustBeDigit(sig: String, digit: Int) {
            for (c in sig) {
                mapping[c.toString()]!!.removeIf { it !in digits[digit]!! }
            }
            digitMapping[sig] = digit
        }

        for (sig in possibleSignals) {
            when (sig.length) {
                2 -> mustBeDigit(sig, 1)
                4 -> mustBeDigit(sig, 4)
                3 -> mustBeDigit(sig, 7)
                7 -> mustBeDigit(sig, 8)
            }
        }

        val seven = possibleSignals.first { it.length == 3 }.toList().map { it.toString() }
        val four = possibleSignals.first { it.length == 4 }.toList().map { it.toString() }
        val one = possibleSignals.first { it.length == 2 }.toList().map { it.toString() }

        // seven has 'aaaa' in addition to one
//        mapping["a"] = (seven - one).toMutableList()

        // four has 'bb' and 'dddd' in addition to one
//        val bOrD = four - one
//        mapping["b"]!!.removeIf { it !in bOrD }

        fun mustBeSegment(input: String, real: String) {
            mapping[input]!!.removeAll { it != real }
            mapping.keys.forEach { key ->
                if (key != input) {
                    mapping[key]!!.removeAll { it == real }
                }
            }
        }

        // count instances in digits
        for (segment in "abcdefg".toList().map { it.toString() }) {
            val count = possibleSignals.count { segment in it }
            when (count) {
                6 -> mustBeSegment(segment, "b")
//                8 -> mustBeSegment(segment, "c")
//                7 -> "d" tai "g"
                4 -> mustBeSegment(segment, "e")
                9 -> mustBeSegment(segment, "f")
            }
        }

        repeat(10) {
            for ((k, v) in mapping.toMap()) {
                if (v.size == 1) {
                    for ((k2, v2) in mapping.toMap()) {
                        if (k2 != k) {
                            mapping[k2]!!.removeAll { it == v.first() }
                        }
                    }
                }
            }
        }

        val mappedDigits = buildString {
            for (v in valueShown) {
                val mapped = v.toList().mapNotNull { mapping[it.toString()]?.first() }.sorted().joinToString("")
                val digit = digits.filter { (k, v) -> v == mapped }.keys.first()
                append(digit)
            }
        }
        totalSum += mappedDigits.toInt()

        println("$line --> $mappedDigits")
        for ((k, v) in mapping) {
            println("$k ${v.joinToString("")}")
        }
    }
    println("uniqCount = $uniqCount, totalSum=$totalSum")
}

// 0:      1:      2:      3:      4:
//  aaaa    ....    aaaa    aaaa    ....
// b    c  .    c  .    c  .    c  b    c
// b    c  .    c  .    c  .    c  b    c
//  ....    ....    dddd    dddd    dddd
// e    f  .    f  e    .  .    f  .    f
// e    f  .    f  e    .  .    f  .    f
//  gggg    ....    gggg    gggg    ....
//
// 5:      6:      7:      8:      9:
//  aaaa    aaaa    aaaa    aaaa    aaaa
// b    .  b    .  .    c  b    c  b    c
// b    .  b    .  .    c  b    c  b    c
//  dddd    dddd    ....    dddd    dddd
// .    f  e    f  .    f  e    f  .    f
// .    f  e    f  .    f  e    f  .    f
//  gggg    gggg    ....    gggg    gggg
//

//println("a 8: ${digits.values.count { it.contains("a") }}")
//println("b 6: ${digits.values.count { it.contains("b") }}")
//println("c 8: ${digits.values.count { it.contains("c") }}")
//println("d 7: ${digits.values.count { it.contains("d") }}")
//println("e 4: ${digits.values.count { it.contains("e") }}")
//println("f 9: ${digits.values.count { it.contains("f") }}")
//println("g 7: ${digits.values.count { it.contains("g") }}")
//

Compiled from "Day8.kt"
final class Day8Kt$main$values$1 extends kotlin.jvm.internal.FunctionReferenceImpl implements kotlin.jvm.functions.Function0<java.lang.String> {
  public static final Day8Kt$main$values$1 INSTANCE;

  Day8Kt$main$values$1();
    Code:
       0: aload_0
       1: iconst_0
       2: ldc           #11                 // class kotlin/io/ConsoleKt
       4: ldc           #13                 // String readLine
       6: ldc           #15                 // String readLine()Ljava/lang/String;
       8: iconst_1
       9: invokespecial #18                 // Method kotlin/jvm/internal/FunctionReferenceImpl."<init>":(ILjava/lang/Class;Ljava/lang/String;Ljava/lang/String;I)V
      12: return

  public final java.lang.String invoke();
    Code:
       0: invokestatic  #24                 // Method kotlin/io/ConsoleKt.readLine:()Ljava/lang/String;
       3: areturn

  public java.lang.Object invoke();
    Code:
       0: aload_0
       1: invokevirtual #27                 // Method invoke:()Ljava/lang/String;
       4: areturn

  static {};
    Code:
       0: new           #2                  // class Day8Kt$main$values$1
       3: dup
       4: invokespecial #30                 // Method "<init>":()V
       7: putstatic     #33                 // Field INSTANCE:LDay8Kt$main$values$1;
      10: return
}

Compiled from "Day8.kt"
public final class Day8Kt {
  private static final java.util.Map<java.lang.Integer, java.lang.String> digits;

  public static final java.util.Map<java.lang.Integer, java.lang.String> getDigits();
    Code:
       0: getstatic     #12                 // Field digits:Ljava/util/Map;
       3: areturn

  public static final void main();
    Code:
       0: getstatic     #20                 // Field Day8Kt$main$values$1.INSTANCE:LDay8Kt$main$values$1;
       3: checkcast     #22                 // class kotlin/jvm/functions/Function0
       6: invokestatic  #28                 // Method kotlin/sequences/SequencesKt.generateSequence:(Lkotlin/jvm/functions/Function0;)Lkotlin/sequences/Sequence;
       9: invokedynamic #47,  0             // InvokeDynamic #0:invoke:()Lkotlin/jvm/functions/Function1;
      14: invokestatic  #51                 // Method kotlin/sequences/SequencesKt.mapNotNull:(Lkotlin/sequences/Sequence;Lkotlin/jvm/functions/Function1;)Lkotlin/sequences/Sequence;
      17: invokestatic  #55                 // Method kotlin/sequences/SequencesKt.toList:(Lkotlin/sequences/Sequence;)Ljava/util/List;
      20: astore_0
      21: iconst_0
      22: istore_1
      23: iconst_0
      24: istore_2
      25: aload_0
      26: invokeinterface #61,  1           // InterfaceMethod java/util/List.iterator:()Ljava/util/Iterator;
      31: astore_3
      32: aload_3
      33: invokeinterface #67,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
      38: ifeq          2515
      41: aload_3
      42: invokeinterface #71,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
      47: checkcast     #73                 // class java/lang/String
      50: astore        4
      52: aload         4
      54: checkcast     #75                 // class java/lang/CharSequence
      57: iconst_1
      58: anewarray     #73                 // class java/lang/String
      61: astore        6
      63: aload         6
      65: iconst_0
      66: ldc           #77                 // String
      68: aastore
      69: aload         6
      71: iconst_0
      72: iconst_0
      73: bipush        6
      75: aconst_null
      76: invokestatic  #83                 // Method kotlin/text/StringsKt.split$default:(Ljava/lang/CharSequence;[Ljava/lang/String;ZIILjava/lang/Object;)Ljava/util/List;
      79: astore        5
      81: aload         5
      83: checkcast     #85                 // class java/lang/Iterable
      86: bipush        10
      88: invokestatic  #91                 // Method kotlin/collections/CollectionsKt.take:(Ljava/lang/Iterable;I)Ljava/util/List;
      91: astore        6
      93: aload         5
      95: iconst_4
      96: invokestatic  #95                 // Method kotlin/collections/CollectionsKt.takeLast:(Ljava/util/List;I)Ljava/util/List;
      99: astore        7
     101: iload_1
     102: aload         7
     104: checkcast     #85                 // class java/lang/Iterable
     107: astore        8
     109: istore        35
     111: iconst_0
     112: istore        9
     114: aload         8
     116: instanceof    #97                 // class java/util/Collection
     119: ifeq          139
     122: aload         8
     124: checkcast     #97                 // class java/util/Collection
     127: invokeinterface #100,  1          // InterfaceMethod java/util/Collection.isEmpty:()Z
     132: ifeq          139
     135: iconst_0
     136: goto          241
     139: iconst_0
     140: istore        10
     142: aload         8
     144: invokeinterface #101,  1          // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     149: astore        11
     151: aload         11
     153: invokeinterface #67,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     158: ifeq          239
     161: aload         11
     163: invokeinterface #71,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     168: astore        12
     170: aload         12
     172: checkcast     #73                 // class java/lang/String
     175: astore        13
     177: iconst_0
     178: istore        14
     180: aload         13
     182: invokevirtual #105                // Method java/lang/String.length:()I
     185: iconst_2
     186: if_icmpeq     217
     189: aload         13
     191: invokevirtual #105                // Method java/lang/String.length:()I
     194: bipush        7
     196: if_icmpeq     217
     199: aload         13
     201: invokevirtual #105                // Method java/lang/String.length:()I
     204: iconst_3
     205: if_icmpeq     217
     208: aload         13
     210: invokevirtual #105                // Method java/lang/String.length:()I
     213: iconst_4
     214: if_icmpne     221
     217: iconst_1
     218: goto          222
     221: iconst_0
     222: ifeq          151
     225: iinc          10, 1
     228: iload         10
     230: ifge          151
     233: invokestatic  #108                // Method kotlin/collections/CollectionsKt.throwCountOverflow:()V
     236: goto          151
     239: iload         10
     241: istore        36
     243: iload         35
     245: iload         36
     247: iadd
     248: istore_1
     249: bipush        7
     251: anewarray     #110                // class kotlin/Pair
     254: astore        9
     256: aload         9
     258: iconst_0
     259: ldc           #112                // String a
     261: bipush        7
     263: anewarray     #73                 // class java/lang/String
     266: astore        10
     268: aload         10
     270: iconst_0
     271: ldc           #112                // String a
     273: aastore
     274: aload         10
     276: iconst_1
     277: ldc           #114                // String b
     279: aastore
     280: aload         10
     282: iconst_2
     283: ldc           #116                // String c
     285: aastore
     286: aload         10
     288: iconst_3
     289: ldc           #118                // String d
     291: aastore
     292: aload         10
     294: iconst_4
     295: ldc           #120                // String e
     297: aastore
     298: aload         10
     300: iconst_5
     301: ldc           #122                // String f
     303: aastore
     304: aload         10
     306: bipush        6
     308: ldc           #124                // String g
     310: aastore
     311: aload         10
     313: invokestatic  #128                // Method kotlin/collections/CollectionsKt.mutableListOf:([Ljava/lang/Object;)Ljava/util/List;
     316: invokestatic  #134                // Method kotlin/TuplesKt.to:(Ljava/lang/Object;Ljava/lang/Object;)Lkotlin/Pair;
     319: aastore
     320: aload         9
     322: iconst_1
     323: ldc           #114                // String b
     325: bipush        7
     327: anewarray     #73                 // class java/lang/String
     330: astore        10
     332: aload         10
     334: iconst_0
     335: ldc           #112                // String a
     337: aastore
     338: aload         10
     340: iconst_1
     341: ldc           #114                // String b
     343: aastore
     344: aload         10
     346: iconst_2
     347: ldc           #116                // String c
     349: aastore
     350: aload         10
     352: iconst_3
     353: ldc           #118                // String d
     355: aastore
     356: aload         10
     358: iconst_4
     359: ldc           #120                // String e
     361: aastore
     362: aload         10
     364: iconst_5
     365: ldc           #122                // String f
     367: aastore
     368: aload         10
     370: bipush        6
     372: ldc           #124                // String g
     374: aastore
     375: aload         10
     377: invokestatic  #128                // Method kotlin/collections/CollectionsKt.mutableListOf:([Ljava/lang/Object;)Ljava/util/List;
     380: invokestatic  #134                // Method kotlin/TuplesKt.to:(Ljava/lang/Object;Ljava/lang/Object;)Lkotlin/Pair;
     383: aastore
     384: aload         9
     386: iconst_2
     387: ldc           #116                // String c
     389: bipush        7
     391: anewarray     #73                 // class java/lang/String
     394: astore        10
     396: aload         10
     398: iconst_0
     399: ldc           #112                // String a
     401: aastore
     402: aload         10
     404: iconst_1
     405: ldc           #114                // String b
     407: aastore
     408: aload         10
     410: iconst_2
     411: ldc           #116                // String c
     413: aastore
     414: aload         10
     416: iconst_3
     417: ldc           #118                // String d
     419: aastore
     420: aload         10
     422: iconst_4
     423: ldc           #120                // String e
     425: aastore
     426: aload         10
     428: iconst_5
     429: ldc           #122                // String f
     431: aastore
     432: aload         10
     434: bipush        6
     436: ldc           #124                // String g
     438: aastore
     439: aload         10
     441: invokestatic  #128                // Method kotlin/collections/CollectionsKt.mutableListOf:([Ljava/lang/Object;)Ljava/util/List;
     444: invokestatic  #134                // Method kotlin/TuplesKt.to:(Ljava/lang/Object;Ljava/lang/Object;)Lkotlin/Pair;
     447: aastore
     448: aload         9
     450: iconst_3
     451: ldc           #118                // String d
     453: bipush        7
     455: anewarray     #73                 // class java/lang/String
     458: astore        10
     460: aload         10
     462: iconst_0
     463: ldc           #112                // String a
     465: aastore
     466: aload         10
     468: iconst_1
     469: ldc           #114                // String b
     471: aastore
     472: aload         10
     474: iconst_2
     475: ldc           #116                // String c
     477: aastore
     478: aload         10
     480: iconst_3
     481: ldc           #118                // String d
     483: aastore
     484: aload         10
     486: iconst_4
     487: ldc           #120                // String e
     489: aastore
     490: aload         10
     492: iconst_5
     493: ldc           #122                // String f
     495: aastore
     496: aload         10
     498: bipush        6
     500: ldc           #124                // String g
     502: aastore
     503: aload         10
     505: invokestatic  #128                // Method kotlin/collections/CollectionsKt.mutableListOf:([Ljava/lang/Object;)Ljava/util/List;
     508: invokestatic  #134                // Method kotlin/TuplesKt.to:(Ljava/lang/Object;Ljava/lang/Object;)Lkotlin/Pair;
     511: aastore
     512: aload         9
     514: iconst_4
     515: ldc           #120                // String e
     517: bipush        7
     519: anewarray     #73                 // class java/lang/String
     522: astore        10
     524: aload         10
     526: iconst_0
     527: ldc           #112                // String a
     529: aastore
     530: aload         10
     532: iconst_1
     533: ldc           #114                // String b
     535: aastore
     536: aload         10
     538: iconst_2
     539: ldc           #116                // String c
     541: aastore
     542: aload         10
     544: iconst_3
     545: ldc           #118                // String d
     547: aastore
     548: aload         10
     550: iconst_4
     551: ldc           #120                // String e
     553: aastore
     554: aload         10
     556: iconst_5
     557: ldc           #122                // String f
     559: aastore
     560: aload         10
     562: bipush        6
     564: ldc           #124                // String g
     566: aastore
     567: aload         10
     569: invokestatic  #128                // Method kotlin/collections/CollectionsKt.mutableListOf:([Ljava/lang/Object;)Ljava/util/List;
     572: invokestatic  #134                // Method kotlin/TuplesKt.to:(Ljava/lang/Object;Ljava/lang/Object;)Lkotlin/Pair;
     575: aastore
     576: aload         9
     578: iconst_5
     579: ldc           #122                // String f
     581: bipush        7
     583: anewarray     #73                 // class java/lang/String
     586: astore        10
     588: aload         10
     590: iconst_0
     591: ldc           #112                // String a
     593: aastore
     594: aload         10
     596: iconst_1
     597: ldc           #114                // String b
     599: aastore
     600: aload         10
     602: iconst_2
     603: ldc           #116                // String c
     605: aastore
     606: aload         10
     608: iconst_3
     609: ldc           #118                // String d
     611: aastore
     612: aload         10
     614: iconst_4
     615: ldc           #120                // String e
     617: aastore
     618: aload         10
     620: iconst_5
     621: ldc           #122                // String f
     623: aastore
     624: aload         10
     626: bipush        6
     628: ldc           #124                // String g
     630: aastore
     631: aload         10
     633: invokestatic  #128                // Method kotlin/collections/CollectionsKt.mutableListOf:([Ljava/lang/Object;)Ljava/util/List;
     636: invokestatic  #134                // Method kotlin/TuplesKt.to:(Ljava/lang/Object;Ljava/lang/Object;)Lkotlin/Pair;
     639: aastore
     640: aload         9
     642: bipush        6
     644: ldc           #124                // String g
     646: bipush        7
     648: anewarray     #73                 // class java/lang/String
     651: astore        10
     653: aload         10
     655: iconst_0
     656: ldc           #112                // String a
     658: aastore
     659: aload         10
     661: iconst_1
     662: ldc           #114                // String b
     664: aastore
     665: aload         10
     667: iconst_2
     668: ldc           #116                // String c
     670: aastore
     671: aload         10
     673: iconst_3
     674: ldc           #118                // String d
     676: aastore
     677: aload         10
     679: iconst_4
     680: ldc           #120                // String e
     682: aastore
     683: aload         10
     685: iconst_5
     686: ldc           #122                // String f
     688: aastore
     689: aload         10
     691: bipush        6
     693: ldc           #124                // String g
     695: aastore
     696: aload         10
     698: invokestatic  #128                // Method kotlin/collections/CollectionsKt.mutableListOf:([Ljava/lang/Object;)Ljava/util/List;
     701: invokestatic  #134                // Method kotlin/TuplesKt.to:(Ljava/lang/Object;Ljava/lang/Object;)Lkotlin/Pair;
     704: aastore
     705: aload         9
     707: invokestatic  #140                // Method kotlin/collections/MapsKt.mutableMapOf:([Lkotlin/Pair;)Ljava/util/Map;
     710: astore        8
     712: new           #142                // class java/util/LinkedHashMap
     715: dup
     716: invokespecial #145                // Method java/util/LinkedHashMap."<init>":()V
     719: checkcast     #147                // class java/util/Map
     722: astore        9
     724: aload         6
     726: invokeinterface #61,  1           // InterfaceMethod java/util/List.iterator:()Ljava/util/Iterator;
     731: astore        10
     733: aload         10
     735: invokeinterface #67,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     740: ifeq          854
     743: aload         10
     745: invokeinterface #71,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     750: checkcast     #73                 // class java/lang/String
     753: astore        11
     755: aload         11
     757: invokevirtual #105                // Method java/lang/String.length:()I
     760: tableswitch   { // 2 to 7
                     2: 800
                     3: 826
                     4: 813
                     5: 851
                     6: 851
                     7: 840
               default: 851
          }
     800: aload         8
     802: aload         9
     804: aload         11
     806: iconst_1
     807: invokestatic  #151                // Method main$mustBeDigit:(Ljava/util/Map;Ljava/util/Map;Ljava/lang/String;I)V
     810: goto          733
     813: aload         8
     815: aload         9
     817: aload         11
     819: iconst_4
     820: invokestatic  #151                // Method main$mustBeDigit:(Ljava/util/Map;Ljava/util/Map;Ljava/lang/String;I)V
     823: goto          733
     826: aload         8
     828: aload         9
     830: aload         11
     832: bipush        7
     834: invokestatic  #151                // Method main$mustBeDigit:(Ljava/util/Map;Ljava/util/Map;Ljava/lang/String;I)V
     837: goto          733
     840: aload         8
     842: aload         9
     844: aload         11
     846: bipush        8
     848: invokestatic  #151                // Method main$mustBeDigit:(Ljava/util/Map;Ljava/util/Map;Ljava/lang/String;I)V
     851: goto          733
     854: aload         6
     856: checkcast     #85                 // class java/lang/Iterable
     859: astore        11
     861: iconst_0
     862: istore        12
     864: aload         11
     866: invokeinterface #101,  1          // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     871: astore        13
     873: aload         13
     875: invokeinterface #67,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     880: ifeq          924
     883: aload         13
     885: invokeinterface #71,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     890: astore        14
     892: aload         14
     894: checkcast     #73                 // class java/lang/String
     897: astore        15
     899: iconst_0
     900: istore        16
     902: aload         15
     904: invokevirtual #105                // Method java/lang/String.length:()I
     907: iconst_3
     908: if_icmpne     915
     911: iconst_1
     912: goto          916
     915: iconst_0
     916: ifeq          873
     919: aload         14
     921: goto          934
     924: new           #153                // class java/util/NoSuchElementException
     927: dup
     928: ldc           #155                // String Collection contains no element matching the predicate.
     930: invokespecial #158                // Method java/util/NoSuchElementException."<init>":(Ljava/lang/String;)V
     933: athrow
     934: checkcast     #75                 // class java/lang/CharSequence
     937: invokestatic  #161                // Method kotlin/text/StringsKt.toList:(Ljava/lang/CharSequence;)Ljava/util/List;
     940: checkcast     #85                 // class java/lang/Iterable
     943: astore        11
     945: iconst_0
     946: istore        12
     948: aload         11
     950: astore        13
     952: new           #163                // class java/util/ArrayList
     955: dup
     956: aload         11
     958: bipush        10
     960: invokestatic  #167                // Method kotlin/collections/CollectionsKt.collectionSizeOrDefault:(Ljava/lang/Iterable;I)I
     963: invokespecial #170                // Method java/util/ArrayList."<init>":(I)V
     966: checkcast     #97                 // class java/util/Collection
     969: astore        14
     971: iconst_0
     972: istore        15
     974: aload         13
     976: invokeinterface #101,  1          // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     981: astore        16
     983: aload         16
     985: invokeinterface #67,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     990: ifeq          1036
     993: aload         16
     995: invokeinterface #71,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
    1000: astore        17
    1002: aload         14
    1004: aload         17
    1006: checkcast     #172                // class java/lang/Character
    1009: invokevirtual #176                // Method java/lang/Character.charValue:()C
    1012: istore        18
    1014: astore        35
    1016: iconst_0
    1017: istore        19
    1019: iload         18
    1021: invokestatic  #180                // Method java/lang/String.valueOf:(C)Ljava/lang/String;
    1024: aload         35
    1026: swap
    1027: invokeinterface #184,  2          // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
    1032: pop
    1033: goto          983
    1036: aload         14
    1038: checkcast     #57                 // class java/util/List
    1041: nop
    1042: astore        10
    1044: aload         6
    1046: checkcast     #85                 // class java/lang/Iterable
    1049: astore        12
    1051: iconst_0
    1052: istore        13
    1054: aload         12
    1056: invokeinterface #101,  1          // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
    1061: astore        14
    1063: aload         14
    1065: invokeinterface #67,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
    1070: ifeq          1114
    1073: aload         14
    1075: invokeinterface #71,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
    1080: astore        15
    1082: aload         15
    1084: checkcast     #73                 // class java/lang/String
    1087: astore        16
    1089: iconst_0
    1090: istore        17
    1092: aload         16
    1094: invokevirtual #105                // Method java/lang/String.length:()I
    1097: iconst_4
    1098: if_icmpne     1105
    1101: iconst_1
    1102: goto          1106
    1105: iconst_0
    1106: ifeq          1063
    1109: aload         15
    1111: goto          1124
    1114: new           #153                // class java/util/NoSuchElementException
    1117: dup
    1118: ldc           #155                // String Collection contains no element matching the predicate.
    1120: invokespecial #158                // Method java/util/NoSuchElementException."<init>":(Ljava/lang/String;)V
    1123: athrow
    1124: checkcast     #75                 // class java/lang/CharSequence
    1127: invokestatic  #161                // Method kotlin/text/StringsKt.toList:(Ljava/lang/CharSequence;)Ljava/util/List;
    1130: checkcast     #85                 // class java/lang/Iterable
    1133: astore        12
    1135: iconst_0
    1136: istore        13
    1138: aload         12
    1140: astore        14
    1142: new           #163                // class java/util/ArrayList
    1145: dup
    1146: aload         12
    1148: bipush        10
    1150: invokestatic  #167                // Method kotlin/collections/CollectionsKt.collectionSizeOrDefault:(Ljava/lang/Iterable;I)I
    1153: invokespecial #170                // Method java/util/ArrayList."<init>":(I)V
    1156: checkcast     #97                 // class java/util/Collection
    1159: astore        15
    1161: iconst_0
    1162: istore        16
    1164: aload         14
    1166: invokeinterface #101,  1          // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
    1171: astore        17
    1173: aload         17
    1175: invokeinterface #67,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
    1180: ifeq          1226
    1183: aload         17
    1185: invokeinterface #71,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
    1190: astore        18
    1192: aload         15
    1194: aload         18
    1196: checkcast     #172                // class java/lang/Character
    1199: invokevirtual #176                // Method java/lang/Character.charValue:()C
    1202: istore        19
    1204: astore        35
    1206: iconst_0
    1207: istore        20
    1209: iload         19
    1211: invokestatic  #180                // Method java/lang/String.valueOf:(C)Ljava/lang/String;
    1214: aload         35
    1216: swap
    1217: invokeinterface #184,  2          // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
    1222: pop
    1223: goto          1173
    1226: aload         15
    1228: checkcast     #57                 // class java/util/List
    1231: nop
    1232: astore        11
    1234: aload         6
    1236: checkcast     #85                 // class java/lang/Iterable
    1239: astore        13
    1241: iconst_0
    1242: istore        14
    1244: aload         13
    1246: invokeinterface #101,  1          // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
    1251: astore        15
    1253: aload         15
    1255: invokeinterface #67,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
    1260: ifeq          1304
    1263: aload         15
    1265: invokeinterface #71,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
    1270: astore        16
    1272: aload         16
    1274: checkcast     #73                 // class java/lang/String
    1277: astore        17
    1279: iconst_0
    1280: istore        18
    1282: aload         17
    1284: invokevirtual #105                // Method java/lang/String.length:()I
    1287: iconst_2
    1288: if_icmpne     1295
    1291: iconst_1
    1292: goto          1296
    1295: iconst_0
    1296: ifeq          1253
    1299: aload         16
    1301: goto          1314
    1304: new           #153                // class java/util/NoSuchElementException
    1307: dup
    1308: ldc           #155                // String Collection contains no element matching the predicate.
    1310: invokespecial #158                // Method java/util/NoSuchElementException."<init>":(Ljava/lang/String;)V
    1313: athrow
    1314: checkcast     #75                 // class java/lang/CharSequence
    1317: invokestatic  #161                // Method kotlin/text/StringsKt.toList:(Ljava/lang/CharSequence;)Ljava/util/List;
    1320: checkcast     #85                 // class java/lang/Iterable
    1323: astore        13
    1325: iconst_0
    1326: istore        14
    1328: aload         13
    1330: astore        15
    1332: new           #163                // class java/util/ArrayList
    1335: dup
    1336: aload         13
    1338: bipush        10
    1340: invokestatic  #167                // Method kotlin/collections/CollectionsKt.collectionSizeOrDefault:(Ljava/lang/Iterable;I)I
    1343: invokespecial #170                // Method java/util/ArrayList."<init>":(I)V
    1346: checkcast     #97                 // class java/util/Collection
    1349: astore        16
    1351: iconst_0
    1352: istore        17
    1354: aload         15
    1356: invokeinterface #101,  1          // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
    1361: astore        18
    1363: aload         18
    1365: invokeinterface #67,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
    1370: ifeq          1416
    1373: aload         18
    1375: invokeinterface #71,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
    1380: astore        19
    1382: aload         16
    1384: aload         19
    1386: checkcast     #172                // class java/lang/Character
    1389: invokevirtual #176                // Method java/lang/Character.charValue:()C
    1392: istore        20
    1394: astore        35
    1396: iconst_0
    1397: istore        21
    1399: iload         20
    1401: invokestatic  #180                // Method java/lang/String.valueOf:(C)Ljava/lang/String;
    1404: aload         35
    1406: swap
    1407: invokeinterface #184,  2          // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
    1412: pop
    1413: goto          1363
    1416: aload         16
    1418: checkcast     #57                 // class java/util/List
    1421: nop
    1422: astore        12
    1424: ldc           #186                // String abcdefg
    1426: checkcast     #75                 // class java/lang/CharSequence
    1429: invokestatic  #161                // Method kotlin/text/StringsKt.toList:(Ljava/lang/CharSequence;)Ljava/util/List;
    1432: checkcast     #85                 // class java/lang/Iterable
    1435: astore        14
    1437: iconst_0
    1438: istore        15
    1440: aload         14
    1442: astore        16
    1444: new           #163                // class java/util/ArrayList
    1447: dup
    1448: aload         14
    1450: bipush        10
    1452: invokestatic  #167                // Method kotlin/collections/CollectionsKt.collectionSizeOrDefault:(Ljava/lang/Iterable;I)I
    1455: invokespecial #170                // Method java/util/ArrayList."<init>":(I)V
    1458: checkcast     #97                 // class java/util/Collection
    1461: astore        17
    1463: iconst_0
    1464: istore        18
    1466: aload         16
    1468: invokeinterface #101,  1          // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
    1473: astore        19
    1475: aload         19
    1477: invokeinterface #67,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
    1482: ifeq          1528
    1485: aload         19
    1487: invokeinterface #71,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
    1492: astore        20
    1494: aload         17
    1496: aload         20
    1498: checkcast     #172                // class java/lang/Character
    1501: invokevirtual #176                // Method java/lang/Character.charValue:()C
    1504: istore        21
    1506: astore        35
    1508: iconst_0
    1509: istore        22
    1511: iload         21
    1513: invokestatic  #180                // Method java/lang/String.valueOf:(C)Ljava/lang/String;
    1516: aload         35
    1518: swap
    1519: invokeinterface #184,  2          // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
    1524: pop
    1525: goto          1475
    1528: aload         17
    1530: checkcast     #57                 // class java/util/List
    1533: nop
    1534: invokeinterface #61,  1           // InterfaceMethod java/util/List.iterator:()Ljava/util/Iterator;
    1539: astore        13
    1541: aload         13
    1543: invokeinterface #67,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
    1548: ifeq          1752
    1551: aload         13
    1553: invokeinterface #71,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
    1558: checkcast     #73                 // class java/lang/String
    1561: astore        14
    1563: aload         6
    1565: checkcast     #85                 // class java/lang/Iterable
    1568: astore        16
    1570: iconst_0
    1571: istore        17
    1573: aload         16
    1575: instanceof    #97                 // class java/util/Collection
    1578: ifeq          1598
    1581: aload         16
    1583: checkcast     #97                 // class java/util/Collection
    1586: invokeinterface #100,  1          // InterfaceMethod java/util/Collection.isEmpty:()Z
    1591: ifeq          1598
    1594: iconst_0
    1595: goto          1674
    1598: iconst_0
    1599: istore        18
    1601: aload         16
    1603: invokeinterface #101,  1          // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
    1608: astore        19
    1610: aload         19
    1612: invokeinterface #67,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
    1617: ifeq          1672
    1620: aload         19
    1622: invokeinterface #71,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
    1627: astore        20
    1629: aload         20
    1631: checkcast     #73                 // class java/lang/String
    1634: astore        21
    1636: iconst_0
    1637: istore        22
    1639: aload         21
    1641: checkcast     #75                 // class java/lang/CharSequence
    1644: aload         14
    1646: checkcast     #75                 // class java/lang/CharSequence
    1649: iconst_0
    1650: iconst_2
    1651: aconst_null
    1652: invokestatic  #190                // Method kotlin/text/StringsKt.contains$default:(Ljava/lang/CharSequence;Ljava/lang/CharSequence;ZILjava/lang/Object;)Z
    1655: ifeq          1610
    1658: iinc          18, 1
    1661: iload         18
    1663: ifge          1610
    1666: invokestatic  #108                // Method kotlin/collections/CollectionsKt.throwCountOverflow:()V
    1669: goto          1610
    1672: iload         18
    1674: istore        15
    1676: iload         15
    1678: tableswitch   { // 4 to 9
                     4: 1728
                     5: 1749
                     6: 1716
                     7: 1749
                     8: 1749
                     9: 1740
               default: 1749
          }
    1716: aload         8
    1718: aload         14
    1720: ldc           #114                // String b
    1722: invokestatic  #194                // Method main$mustBeSegment:(Ljava/util/Map;Ljava/lang/String;Ljava/lang/String;)V
    1725: goto          1541
    1728: aload         8
    1730: aload         14
    1732: ldc           #120                // String e
    1734: invokestatic  #194                // Method main$mustBeSegment:(Ljava/util/Map;Ljava/lang/String;Ljava/lang/String;)V
    1737: goto          1541
    1740: aload         8
    1742: aload         14
    1744: ldc           #122                // String f
    1746: invokestatic  #194                // Method main$mustBeSegment:(Ljava/util/Map;Ljava/lang/String;Ljava/lang/String;)V
    1749: goto          1541
    1752: bipush        10
    1754: istore        13
    1756: iconst_0
    1757: istore        14
    1759: iload         14
    1761: iload         13
    1763: if_icmpge     1957
    1766: iload         14
    1768: istore        15
    1770: iconst_0
    1771: istore        16
    1773: aload         8
    1775: invokestatic  #198                // Method kotlin/collections/MapsKt.toMap:(Ljava/util/Map;)Ljava/util/Map;
    1778: invokeinterface #202,  1          // InterfaceMethod java/util/Map.entrySet:()Ljava/util/Set;
    1783: invokeinterface #205,  1          // InterfaceMethod java/util/Set.iterator:()Ljava/util/Iterator;
    1788: astore        17
    1790: aload         17
    1792: invokeinterface #67,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
    1797: ifeq          1950
    1800: aload         17
    1802: invokeinterface #71,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
    1807: checkcast     #207                // class java/util/Map$Entry
    1810: astore        18
    1812: aload         18
    1814: invokeinterface #210,  1          // InterfaceMethod java/util/Map$Entry.getKey:()Ljava/lang/Object;
    1819: checkcast     #73                 // class java/lang/String
    1822: astore        19
    1824: aload         18
    1826: invokeinterface #213,  1          // InterfaceMethod java/util/Map$Entry.getValue:()Ljava/lang/Object;
    1831: checkcast     #57                 // class java/util/List
    1834: astore        20
    1836: aload         20
    1838: invokeinterface #216,  1          // InterfaceMethod java/util/List.size:()I
    1843: iconst_1
    1844: if_icmpne     1790
    1847: aload         8
    1849: invokestatic  #198                // Method kotlin/collections/MapsKt.toMap:(Ljava/util/Map;)Ljava/util/Map;
    1852: invokeinterface #202,  1          // InterfaceMethod java/util/Map.entrySet:()Ljava/util/Set;
    1857: invokeinterface #205,  1          // InterfaceMethod java/util/Set.iterator:()Ljava/util/Iterator;
    1862: astore        21
    1864: aload         21
    1866: invokeinterface #67,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
    1871: ifeq          1790
    1874: aload         21
    1876: invokeinterface #71,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
    1881: checkcast     #207                // class java/util/Map$Entry
    1884: astore        22
    1886: aload         22
    1888: invokeinterface #210,  1          // InterfaceMethod java/util/Map$Entry.getKey:()Ljava/lang/Object;
    1893: checkcast     #73                 // class java/lang/String
    1896: astore        23
    1898: aload         22
    1900: invokeinterface #213,  1          // InterfaceMethod java/util/Map$Entry.getValue:()Ljava/lang/Object;
    1905: checkcast     #57                 // class java/util/List
    1908: astore        24
    1910: aload         23
    1912: aload         19
    1914: invokestatic  #222                // Method kotlin/jvm/internal/Intrinsics.areEqual:(Ljava/lang/Object;Ljava/lang/Object;)Z
    1917: ifne          1864
    1920: aload         8
    1922: aload         23
    1924: invokeinterface #225,  2          // InterfaceMethod java/util/Map.get:(Ljava/lang/Object;)Ljava/lang/Object;
    1929: dup
    1930: invokestatic  #229                // Method kotlin/jvm/internal/Intrinsics.checkNotNull:(Ljava/lang/Object;)V
    1933: checkcast     #57                 // class java/util/List
    1936: aload         20
    1938: invokedynamic #239,  0            // InvokeDynamic #1:invoke:(Ljava/util/List;)Lkotlin/jvm/functions/Function1;
    1943: invokestatic  #243                // Method kotlin/collections/CollectionsKt.removeAll:(Ljava/util/List;Lkotlin/jvm/functions/Function1;)Z
    1946: pop
    1947: goto          1864
    1950: nop
    1951: iinc          14, 1
    1954: goto          1759
    1957: new           #245                // class java/lang/StringBuilder
    1960: dup
    1961: invokespecial #246                // Method java/lang/StringBuilder."<init>":()V
    1964: astore        14
    1966: aload         14
    1968: astore        15
    1970: iconst_0
    1971: istore        16
    1973: aload         7
    1975: invokeinterface #61,  1           // InterfaceMethod java/util/List.iterator:()Ljava/util/Iterator;
    1980: astore        17
    1982: aload         17
    1984: invokeinterface #67,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
    1989: ifeq          2351
    1992: aload         17
    1994: invokeinterface #71,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
    1999: checkcast     #73                 // class java/lang/String
    2002: astore        18
    2004: aload         18
    2006: checkcast     #75                 // class java/lang/CharSequence
    2009: invokestatic  #161                // Method kotlin/text/StringsKt.toList:(Ljava/lang/CharSequence;)Ljava/util/List;
    2012: checkcast     #85                 // class java/lang/Iterable
    2015: astore        19
    2017: iconst_0
    2018: istore        20
    2020: aload         19
    2022: astore        21
    2024: new           #163                // class java/util/ArrayList
    2027: dup
    2028: invokespecial #247                // Method java/util/ArrayList."<init>":()V
    2031: checkcast     #97                 // class java/util/Collection
    2034: astore        22
    2036: iconst_0
    2037: istore        23
    2039: aload         21
    2041: astore        24
    2043: iconst_0
    2044: istore        25
    2046: aload         24
    2048: invokeinterface #101,  1          // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
    2053: astore        26
    2055: aload         26
    2057: invokeinterface #67,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
    2062: ifeq          2151
    2065: aload         26
    2067: invokeinterface #71,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
    2072: astore        27
    2074: aload         27
    2076: astore        28
    2078: iconst_0
    2079: istore        29
    2081: aload         28
    2083: checkcast     #172                // class java/lang/Character
    2086: invokevirtual #176                // Method java/lang/Character.charValue:()C
    2089: istore        30
    2091: iconst_0
    2092: istore        31
    2094: aload         8
    2096: iload         30
    2098: invokestatic  #180                // Method java/lang/String.valueOf:(C)Ljava/lang/String;
    2101: invokeinterface #225,  2          // InterfaceMethod java/util/Map.get:(Ljava/lang/Object;)Ljava/lang/Object;
    2106: checkcast     #57                 // class java/util/List
    2109: dup
    2110: ifnull        2122
    2113: invokestatic  #251                // Method kotlin/collections/CollectionsKt.first:(Ljava/util/List;)Ljava/lang/Object;
    2116: checkcast     #73                 // class java/lang/String
    2119: goto          2124
    2122: pop
    2123: aconst_null
    2124: dup
    2125: ifnull        2146
    2128: astore        32
    2130: iconst_0
    2131: istore        33
    2133: aload         22
    2135: aload         32
    2137: invokeinterface #184,  2          // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
    2142: pop
    2143: goto          2147
    2146: pop
    2147: nop
    2148: goto          2055
    2151: nop
    2152: aload         22
    2154: checkcast     #57                 // class java/util/List
    2157: nop
    2158: checkcast     #85                 // class java/lang/Iterable
    2161: invokestatic  #255                // Method kotlin/collections/CollectionsKt.sorted:(Ljava/lang/Iterable;)Ljava/util/List;
    2164: checkcast     #85                 // class java/lang/Iterable
    2167: ldc_w         #257                // String
    2170: checkcast     #75                 // class java/lang/CharSequence
    2173: aconst_null
    2174: aconst_null
    2175: iconst_0
    2176: aconst_null
    2177: aconst_null
    2178: bipush        62
    2180: aconst_null
    2181: invokestatic  #261                // Method kotlin/collections/CollectionsKt.joinToString$default:(Ljava/lang/Iterable;Ljava/lang/CharSequence;Ljava/lang/CharSequence;Ljava/lang/CharSequence;ILjava/lang/CharSequence;Lkotlin/jvm/functions/Function1;ILjava/lang/Object;)Ljava/lang/String;
    2184: astore        34
    2186: getstatic     #12                 // Field digits:Ljava/util/Map;
    2189: astore        20
    2191: iconst_0
    2192: istore        21
    2194: aload         20
    2196: astore        22
    2198: new           #142                // class java/util/LinkedHashMap
    2201: dup
    2202: invokespecial #145                // Method java/util/LinkedHashMap."<init>":()V
    2205: checkcast     #147                // class java/util/Map
    2208: astore        23
    2210: iconst_0
    2211: istore        24
    2213: aload         22
    2215: invokeinterface #202,  1          // InterfaceMethod java/util/Map.entrySet:()Ljava/util/Set;
    2220: invokeinterface #205,  1          // InterfaceMethod java/util/Set.iterator:()Ljava/util/Iterator;
    2225: astore        25
    2227: aload         25
    2229: invokeinterface #67,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
    2234: ifeq          2318
    2237: aload         25
    2239: invokeinterface #71,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
    2244: checkcast     #207                // class java/util/Map$Entry
    2247: astore        26
    2249: aload         26
    2251: astore        27
    2253: iconst_0
    2254: istore        28
    2256: aload         27
    2258: invokeinterface #210,  1          // InterfaceMethod java/util/Map$Entry.getKey:()Ljava/lang/Object;
    2263: checkcast     #263                // class java/lang/Number
    2266: invokevirtual #266                // Method java/lang/Number.intValue:()I
    2269: istore        29
    2271: aload         27
    2273: invokeinterface #213,  1          // InterfaceMethod java/util/Map$Entry.getValue:()Ljava/lang/Object;
    2278: checkcast     #73                 // class java/lang/String
    2281: astore        30
    2283: aload         30
    2285: aload         34
    2287: invokestatic  #222                // Method kotlin/jvm/internal/Intrinsics.areEqual:(Ljava/lang/Object;Ljava/lang/Object;)Z
    2290: ifeq          2227
    2293: aload         23
    2295: aload         26
    2297: invokeinterface #210,  1          // InterfaceMethod java/util/Map$Entry.getKey:()Ljava/lang/Object;
    2302: aload         26
    2304: invokeinterface #213,  1          // InterfaceMethod java/util/Map$Entry.getValue:()Ljava/lang/Object;
    2309: invokeinterface #270,  3          // InterfaceMethod java/util/Map.put:(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
    2314: pop
    2315: goto          2227
    2318: aload         23
    2320: nop
    2321: invokeinterface #273,  1          // InterfaceMethod java/util/Map.keySet:()Ljava/util/Set;
    2326: checkcast     #85                 // class java/lang/Iterable
    2329: invokestatic  #276                // Method kotlin/collections/CollectionsKt.first:(Ljava/lang/Iterable;)Ljava/lang/Object;
    2332: checkcast     #263                // class java/lang/Number
    2335: invokevirtual #266                // Method java/lang/Number.intValue:()I
    2338: istore        19
    2340: aload         15
    2342: iload         19
    2344: invokevirtual #280                // Method java/lang/StringBuilder.append:(I)Ljava/lang/StringBuilder;
    2347: pop
    2348: goto          1982
    2351: nop
    2352: aload         14
    2354: invokevirtual #284                // Method java/lang/StringBuilder.toString:()Ljava/lang/String;
    2357: astore        13
    2359: iload_2
    2360: aload         13
    2362: invokestatic  #290                // Method java/lang/Integer.parseInt:(Ljava/lang/String;)I
    2365: iadd
    2366: istore_2
    2367: new           #245                // class java/lang/StringBuilder
    2370: dup
    2371: invokespecial #246                // Method java/lang/StringBuilder."<init>":()V
    2374: aload         4
    2376: invokevirtual #293                // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
    2379: ldc_w         #295                // String  -->
    2382: invokevirtual #293                // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
    2385: aload         13
    2387: invokevirtual #293                // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
    2390: invokevirtual #284                // Method java/lang/StringBuilder.toString:()Ljava/lang/String;
    2393: getstatic     #301                // Field java/lang/System.out:Ljava/io/PrintStream;
    2396: swap
    2397: invokevirtual #306                // Method java/io/PrintStream.println:(Ljava/lang/Object;)V
    2400: aload         8
    2402: invokeinterface #202,  1          // InterfaceMethod java/util/Map.entrySet:()Ljava/util/Set;
    2407: invokeinterface #205,  1          // InterfaceMethod java/util/Set.iterator:()Ljava/util/Iterator;
    2412: astore        14
    2414: aload         14
    2416: invokeinterface #67,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
    2421: ifeq          32
    2424: aload         14
    2426: invokeinterface #71,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
    2431: checkcast     #207                // class java/util/Map$Entry
    2434: astore        15
    2436: aload         15
    2438: invokeinterface #210,  1          // InterfaceMethod java/util/Map$Entry.getKey:()Ljava/lang/Object;
    2443: checkcast     #73                 // class java/lang/String
    2446: astore        16
    2448: aload         15
    2450: invokeinterface #213,  1          // InterfaceMethod java/util/Map$Entry.getValue:()Ljava/lang/Object;
    2455: checkcast     #57                 // class java/util/List
    2458: astore        17
    2460: new           #245                // class java/lang/StringBuilder
    2463: dup
    2464: invokespecial #246                // Method java/lang/StringBuilder."<init>":()V
    2467: aload         16
    2469: invokevirtual #293                // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
    2472: bipush        32
    2474: invokevirtual #309                // Method java/lang/StringBuilder.append:(C)Ljava/lang/StringBuilder;
    2477: aload         17
    2479: checkcast     #85                 // class java/lang/Iterable
    2482: ldc_w         #257                // String
    2485: checkcast     #75                 // class java/lang/CharSequence
    2488: aconst_null
    2489: aconst_null
    2490: iconst_0
    2491: aconst_null
    2492: aconst_null
    2493: bipush        62
    2495: aconst_null
    2496: invokestatic  #261                // Method kotlin/collections/CollectionsKt.joinToString$default:(Ljava/lang/Iterable;Ljava/lang/CharSequence;Ljava/lang/CharSequence;Ljava/lang/CharSequence;ILjava/lang/CharSequence;Lkotlin/jvm/functions/Function1;ILjava/lang/Object;)Ljava/lang/String;
    2499: invokevirtual #293                // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
    2502: invokevirtual #284                // Method java/lang/StringBuilder.toString:()Ljava/lang/String;
    2505: getstatic     #301                // Field java/lang/System.out:Ljava/io/PrintStream;
    2508: swap
    2509: invokevirtual #306                // Method java/io/PrintStream.println:(Ljava/lang/Object;)V
    2512: goto          2414
    2515: new           #245                // class java/lang/StringBuilder
    2518: dup
    2519: invokespecial #246                // Method java/lang/StringBuilder."<init>":()V
    2522: ldc_w         #311                // String uniqCount =
    2525: invokevirtual #293                // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
    2528: iload_1
    2529: invokevirtual #280                // Method java/lang/StringBuilder.append:(I)Ljava/lang/StringBuilder;
    2532: ldc_w         #313                // String , totalSum=
    2535: invokevirtual #293                // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
    2538: iload_2
    2539: invokevirtual #280                // Method java/lang/StringBuilder.append:(I)Ljava/lang/StringBuilder;
    2542: invokevirtual #284                // Method java/lang/StringBuilder.toString:()Ljava/lang/String;
    2545: getstatic     #301                // Field java/lang/System.out:Ljava/io/PrintStream;
    2548: swap
    2549: invokevirtual #306                // Method java/io/PrintStream.println:(Ljava/lang/Object;)V
    2552: return

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

  private static final java.lang.String main$lambda$1(java.lang.String);
    Code:
       0: aload_0
       1: ldc_w         #392                // String line
       4: invokestatic  #396                // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       7: aload_0
       8: checkcast     #75                 // class java/lang/CharSequence
      11: invokestatic  #400                // Method kotlin/text/StringsKt.trim:(Ljava/lang/CharSequence;)Ljava/lang/CharSequence;
      14: invokevirtual #401                // Method java/lang/Object.toString:()Ljava/lang/String;
      17: astore_1
      18: aload_1
      19: astore_2
      20: iconst_0
      21: istore_3
      22: aload_2
      23: checkcast     #75                 // class java/lang/CharSequence
      26: invokestatic  #405                // Method kotlin/text/StringsKt.isBlank:(Ljava/lang/CharSequence;)Z
      29: ifne          36
      32: aload_1
      33: goto          37
      36: aconst_null
      37: areturn

  private static final boolean main$mustBeDigit$lambda$3(int, java.lang.String);
    Code:
       0: aload_1
       1: ldc_w         #410                // String it
       4: invokestatic  #396                // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       7: getstatic     #12                 // Field digits:Ljava/util/Map;
      10: iload_0
      11: invokestatic  #413                // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
      14: invokeinterface #225,  2          // InterfaceMethod java/util/Map.get:(Ljava/lang/Object;)Ljava/lang/Object;
      19: dup
      20: invokestatic  #229                // Method kotlin/jvm/internal/Intrinsics.checkNotNull:(Ljava/lang/Object;)V
      23: checkcast     #75                 // class java/lang/CharSequence
      26: aload_1
      27: checkcast     #75                 // class java/lang/CharSequence
      30: iconst_0
      31: iconst_2
      32: aconst_null
      33: invokestatic  #190                // Method kotlin/text/StringsKt.contains$default:(Ljava/lang/CharSequence;Ljava/lang/CharSequence;ZILjava/lang/Object;)Z
      36: ifne          43
      39: iconst_1
      40: goto          44
      43: iconst_0
      44: ireturn

  private static final boolean main$mustBeDigit$lambda$4(kotlin.jvm.functions.Function1, java.lang.Object);
    Code:
       0: aload_0
       1: aload_1
       2: invokeinterface #420,  2          // InterfaceMethod kotlin/jvm/functions/Function1.invoke:(Ljava/lang/Object;)Ljava/lang/Object;
       7: checkcast     #422                // class java/lang/Boolean
      10: invokevirtual #425                // Method java/lang/Boolean.booleanValue:()Z
      13: ireturn

  private static final void main$mustBeDigit(java.util.Map<java.lang.String, java.util.List<java.lang.String>>, java.util.Map<java.lang.String, java.lang.Integer>, java.lang.String, int);
    Code:
       0: iconst_0
       1: istore        4
       3: aload_2
       4: invokevirtual #105                // Method java/lang/String.length:()I
       7: istore        5
       9: iload         4
      11: iload         5
      13: if_icmpge     65
      16: aload_2
      17: iload         4
      19: invokevirtual #433                // Method java/lang/String.charAt:(I)C
      22: istore        6
      24: aload_0
      25: iload         6
      27: invokestatic  #180                // Method java/lang/String.valueOf:(C)Ljava/lang/String;
      30: invokeinterface #225,  2          // InterfaceMethod java/util/Map.get:(Ljava/lang/Object;)Ljava/lang/Object;
      35: dup
      36: invokestatic  #229                // Method kotlin/jvm/internal/Intrinsics.checkNotNull:(Ljava/lang/Object;)V
      39: checkcast     #57                 // class java/util/List
      42: iload_3
      43: invokedynamic #439,  0            // InvokeDynamic #2:invoke:(I)Lkotlin/jvm/functions/Function1;
      48: invokedynamic #447,  0            // InvokeDynamic #3:test:(Lkotlin/jvm/functions/Function1;)Ljava/util/function/Predicate;
      53: invokeinterface #451,  2          // InterfaceMethod java/util/List.removeIf:(Ljava/util/function/Predicate;)Z
      58: pop
      59: iinc          4, 1
      62: goto          9
      65: iload_3
      66: invokestatic  #413                // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
      69: astore        5
      71: aload_1
      72: aload_2
      73: aload         5
      75: invokeinterface #270,  3          // InterfaceMethod java/util/Map.put:(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
      80: pop
      81: return

  private static final boolean main$mustBeSegment$lambda$11(java.lang.String, java.lang.String);
    Code:
       0: aload_1
       1: ldc_w         #410                // String it
       4: invokestatic  #396                // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       7: aload_1
       8: aload_0
       9: invokestatic  #222                // Method kotlin/jvm/internal/Intrinsics.areEqual:(Ljava/lang/Object;Ljava/lang/Object;)Z
      12: ifne          19
      15: iconst_1
      16: goto          20
      19: iconst_0
      20: ireturn

  private static final boolean main$mustBeSegment$lambda$13$lambda$12(java.lang.String, java.lang.String);
    Code:
       0: aload_1
       1: ldc_w         #410                // String it
       4: invokestatic  #396                // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       7: aload_1
       8: aload_0
       9: invokestatic  #222                // Method kotlin/jvm/internal/Intrinsics.areEqual:(Ljava/lang/Object;Ljava/lang/Object;)Z
      12: ireturn

  private static final void main$mustBeSegment(java.util.Map<java.lang.String, java.util.List<java.lang.String>>, java.lang.String, java.lang.String);
    Code:
       0: aload_0
       1: aload_1
       2: invokeinterface #225,  2          // InterfaceMethod java/util/Map.get:(Ljava/lang/Object;)Ljava/lang/Object;
       7: dup
       8: invokestatic  #229                // Method kotlin/jvm/internal/Intrinsics.checkNotNull:(Ljava/lang/Object;)V
      11: checkcast     #57                 // class java/util/List
      14: aload_2
      15: invokedynamic #462,  0            // InvokeDynamic #4:invoke:(Ljava/lang/String;)Lkotlin/jvm/functions/Function1;
      20: invokestatic  #243                // Method kotlin/collections/CollectionsKt.removeAll:(Ljava/util/List;Lkotlin/jvm/functions/Function1;)Z
      23: pop
      24: aload_0
      25: invokeinterface #273,  1          // InterfaceMethod java/util/Map.keySet:()Ljava/util/Set;
      30: checkcast     #85                 // class java/lang/Iterable
      33: astore_3
      34: iconst_0
      35: istore        4
      37: aload_3
      38: invokeinterface #101,  1          // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
      43: astore        5
      45: aload         5
      47: invokeinterface #67,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
      52: ifeq          113
      55: aload         5
      57: invokeinterface #71,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
      62: astore        6
      64: aload         6
      66: checkcast     #73                 // class java/lang/String
      69: astore        7
      71: iconst_0
      72: istore        8
      74: aload         7
      76: aload_1
      77: invokestatic  #222                // Method kotlin/jvm/internal/Intrinsics.areEqual:(Ljava/lang/Object;Ljava/lang/Object;)Z
      80: ifne          108
      83: aload_0
      84: aload         7
      86: invokeinterface #225,  2          // InterfaceMethod java/util/Map.get:(Ljava/lang/Object;)Ljava/lang/Object;
      91: dup
      92: invokestatic  #229                // Method kotlin/jvm/internal/Intrinsics.checkNotNull:(Ljava/lang/Object;)V
      95: checkcast     #57                 // class java/util/List
      98: aload_2
      99: invokedynamic #466,  0            // InvokeDynamic #5:invoke:(Ljava/lang/String;)Lkotlin/jvm/functions/Function1;
     104: invokestatic  #243                // Method kotlin/collections/CollectionsKt.removeAll:(Ljava/util/List;Lkotlin/jvm/functions/Function1;)Z
     107: pop
     108: nop
     109: nop
     110: goto          45
     113: nop
     114: return

  private static final boolean main$lambda$17$lambda$16(java.util.List, java.lang.String);
    Code:
       0: aload_1
       1: ldc_w         #410                // String it
       4: invokestatic  #396                // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       7: aload_1
       8: aload_0
       9: invokestatic  #251                // Method kotlin/collections/CollectionsKt.first:(Ljava/util/List;)Ljava/lang/Object;
      12: invokestatic  #222                // Method kotlin/jvm/internal/Intrinsics.areEqual:(Ljava/lang/Object;Ljava/lang/Object;)Z
      15: ireturn

  static {};
    Code:
       0: bipush        10
       2: anewarray     #110                // class kotlin/Pair
       5: astore_0
       6: aload_0
       7: iconst_0
       8: iconst_0
       9: invokestatic  #413                // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
      12: ldc_w         #475                // String abcefg
      15: invokestatic  #134                // Method kotlin/TuplesKt.to:(Ljava/lang/Object;Ljava/lang/Object;)Lkotlin/Pair;
      18: aastore
      19: aload_0
      20: iconst_1
      21: iconst_1
      22: invokestatic  #413                // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
      25: ldc_w         #477                // String cf
      28: invokestatic  #134                // Method kotlin/TuplesKt.to:(Ljava/lang/Object;Ljava/lang/Object;)Lkotlin/Pair;
      31: aastore
      32: aload_0
      33: iconst_2
      34: iconst_2
      35: invokestatic  #413                // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
      38: ldc_w         #479                // String acdeg
      41: invokestatic  #134                // Method kotlin/TuplesKt.to:(Ljava/lang/Object;Ljava/lang/Object;)Lkotlin/Pair;
      44: aastore
      45: aload_0
      46: iconst_3
      47: iconst_3
      48: invokestatic  #413                // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
      51: ldc_w         #481                // String acdfg
      54: invokestatic  #134                // Method kotlin/TuplesKt.to:(Ljava/lang/Object;Ljava/lang/Object;)Lkotlin/Pair;
      57: aastore
      58: aload_0
      59: iconst_4
      60: iconst_4
      61: invokestatic  #413                // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
      64: ldc_w         #483                // String bcdf
      67: invokestatic  #134                // Method kotlin/TuplesKt.to:(Ljava/lang/Object;Ljava/lang/Object;)Lkotlin/Pair;
      70: aastore
      71: aload_0
      72: iconst_5
      73: iconst_5
      74: invokestatic  #413                // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
      77: ldc_w         #485                // String abdfg
      80: invokestatic  #134                // Method kotlin/TuplesKt.to:(Ljava/lang/Object;Ljava/lang/Object;)Lkotlin/Pair;
      83: aastore
      84: aload_0
      85: bipush        6
      87: bipush        6
      89: invokestatic  #413                // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
      92: ldc_w         #487                // String abdefg
      95: invokestatic  #134                // Method kotlin/TuplesKt.to:(Ljava/lang/Object;Ljava/lang/Object;)Lkotlin/Pair;
      98: aastore
      99: aload_0
     100: bipush        7
     102: bipush        7
     104: invokestatic  #413                // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     107: ldc_w         #489                // String acf
     110: invokestatic  #134                // Method kotlin/TuplesKt.to:(Ljava/lang/Object;Ljava/lang/Object;)Lkotlin/Pair;
     113: aastore
     114: aload_0
     115: bipush        8
     117: bipush        8
     119: invokestatic  #413                // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     122: ldc           #186                // String abcdefg
     124: invokestatic  #134                // Method kotlin/TuplesKt.to:(Ljava/lang/Object;Ljava/lang/Object;)Lkotlin/Pair;
     127: aastore
     128: aload_0
     129: bipush        9
     131: bipush        9
     133: invokestatic  #413                // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     136: ldc_w         #491                // String abcdfg
     139: invokestatic  #134                // Method kotlin/TuplesKt.to:(Ljava/lang/Object;Ljava/lang/Object;)Lkotlin/Pair;
     142: aastore
     143: aload_0
     144: invokestatic  #494                // Method kotlin/collections/MapsKt.mapOf:([Lkotlin/Pair;)Ljava/util/Map;
     147: putstatic     #12                 // Field digits:Ljava/util/Map;
     150: return
}