package wordsvirtuoso

import java.io.File

fun input(prompt: String) = println(prompt).run { readln() }
fun check(f: Set<String>) = f.filter { it.length != 5 || !it.matches(Regex("[a-z]{5}")) || it.toSet().size != 5 }

class Statistics() {
    val start = System.currentTimeMillis()
    val badChar = mutableSetOf<String>()
    val variants = mutableListOf<MutableMap<String, Color>>()
    var count = 0
    fun addMap(wordMap: MutableMap<String, Color>) = variants.add(wordMap)
    fun addChar(bad: String) = badChar.add(bad)
    fun addWord(word: String) =
        word.asSequence().map { it.toString() to Color.GREEN }.toMap().toMutableMap().also { addMap(it) }

    fun printV() = variants.forEach { ml -> ml.forEach { (key, value) -> print(value.dye(key)) }.run { println() } }
}

enum class Color(private val value: String) {
    GREEN("\u001B[48:5:10m"),
    YELLOW("\u001B[48:5:11m"),
    GREY("\u001B[48:5:7m"),
    AZURE("\u001B[48:5:14m");

    fun dye(string: String) = "$value$string\u001B[0m"
}

fun output(input: String, x: String, statistics: Statistics) {
    val m = mutableMapOf<String, Color>()
    input.mapIndexed { i, c ->
        if (c == x[i]) m.put(c.toString(), Color.GREEN) else if (x.contains(c)) m.put(c.toString(), Color.YELLOW) else {
            statistics.addChar(c.toString()); m.put(c.toString(), Color.GREY)
        }
    }
    statistics.addMap(m).also { println() }.run { statistics.printV() }
    println("\n" + statistics.badChar.sorted().joinToString("").let { Color.AZURE.dye(it) })
}

fun game(candidateWords: Set<String>, allWords: Set<String>) {
    val x = candidateWords.random().uppercase()
    val statistics = Statistics()
    while (true) {
        val i = input("Input a 5-letter word:").uppercase().also { statistics.count++ }
        if (i.equals("exit", true)) {
            println("The game is over."); break
        } else if (i == x) {
            if (statistics.count == 1) {
                x.forEach { print(Color.GREEN.dye(it.toString())) }
                println("\n\nCorrect!\nAmazing luck! The solution was found at once.")
            } else {
                statistics.addWord(x).also { println() }.also { statistics.printV() }
                val seconds = (System.currentTimeMillis() - statistics.start) / 1000
                println("\nCorrect!\nThe solution was found after ${statistics.count} tries in $seconds seconds.")
            }; break
        } else if (i.length != 5) println("The input isn't a 5-letter word.")
        else if (!i.matches(Regex("[A-Z]{5}"))) println("One or more letters of the input aren't valid.")
        else if (i.toSet().size != 5) println("The input has duplicate letters.")
        else if (!allWords.contains(i.lowercase())) println("The input word isn't included in my words list.")
        else output(i, x, statistics)
    }
}

fun start(args: Array<String>) {
    if (args.size != 2) println("Error: Wrong number of arguments.").also { return }
    val (w, c) = arrayOf(File(args[0]), File(args[1]))
    if (!w.exists()) println("Error: The words file $w doesn't exist.").also { return }
    if (!c.exists()) println("Error: The candidate words file $c doesn't exist.").also { return }
    val (a, d) = arrayOf(w.readLines().map { it.lowercase() }.toSet(), c.readLines().map { it.lowercase() }.toSet())
    if (!check(a).isEmpty()) println("Error: ${check(a).size} invalid words were found in the $w file.").also { return }
    if (!check(d).isEmpty()) println("Error: ${check(d).size} invalid words were found in the $c file.").also { return }
    val r = d.toMutableSet(); r.removeAll(a)
    if (r.isNotEmpty()) println("Error: ${r.size} candidate words are not included in the $w file.").also { return }
    println("Words Virtuoso").also { game(d, a) }
}

fun main(args: Array<String>) = start(args)

Compiled from "Main.kt"
public final class wordsvirtuoso.MainKt {
  public static final java.lang.String input(java.lang.String);
    Code:
       0: aload_0
       1: ldc           #9                  // String prompt
       3: invokestatic  #15                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: getstatic     #21                 // Field java/lang/System.out:Ljava/io/PrintStream;
       9: aload_0
      10: invokevirtual #27                 // Method java/io/PrintStream.println:(Ljava/lang/Object;)V
      13: getstatic     #33                 // Field kotlin/Unit.INSTANCE:Lkotlin/Unit;
      16: astore_1
      17: iconst_0
      18: istore_2
      19: invokestatic  #39                 // Method kotlin/io/ConsoleKt.readln:()Ljava/lang/String;
      22: nop
      23: areturn

  public static final java.util.List<java.lang.String> check(java.util.Set<java.lang.String>);
    Code:
       0: aload_0
       1: ldc           #48                 // String f
       3: invokestatic  #15                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: aload_0
       7: checkcast     #50                 // class java/lang/Iterable
      10: astore_1
      11: iconst_0
      12: istore_2
      13: aload_1
      14: astore_3
      15: new           #52                 // class java/util/ArrayList
      18: dup
      19: invokespecial #56                 // Method java/util/ArrayList."<init>":()V
      22: checkcast     #58                 // class java/util/Collection
      25: astore        4
      27: iconst_0
      28: istore        5
      30: aload_3
      31: invokeinterface #62,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
      36: astore        6
      38: aload         6
      40: invokeinterface #68,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
      45: ifeq          138
      48: aload         6
      50: invokeinterface #72,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
      55: astore        7
      57: aload         7
      59: checkcast     #74                 // class java/lang/String
      62: astore        8
      64: iconst_0
      65: istore        9
      67: aload         8
      69: invokevirtual #78                 // Method java/lang/String.length:()I
      72: iconst_5
      73: if_icmpne     117
      76: aload         8
      78: checkcast     #80                 // class java/lang/CharSequence
      81: astore        10
      83: new           #82                 // class kotlin/text/Regex
      86: dup
      87: ldc           #84                 // String [a-z]{5}
      89: invokespecial #87                 // Method kotlin/text/Regex."<init>":(Ljava/lang/String;)V
      92: aload         10
      94: invokevirtual #91                 // Method kotlin/text/Regex.matches:(Ljava/lang/CharSequence;)Z
      97: ifeq          117
     100: aload         8
     102: checkcast     #80                 // class java/lang/CharSequence
     105: invokestatic  #97                 // Method kotlin/text/StringsKt.toSet:(Ljava/lang/CharSequence;)Ljava/util/Set;
     108: invokeinterface #102,  1          // InterfaceMethod java/util/Set.size:()I
     113: iconst_5
     114: if_icmpeq     121
     117: iconst_1
     118: goto          122
     121: iconst_0
     122: ifeq          38
     125: aload         4
     127: aload         7
     129: invokeinterface #106,  2          // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     134: pop
     135: goto          38
     138: aload         4
     140: checkcast     #108                // class java/util/List
     143: nop
     144: areturn

  public static final void output(java.lang.String, java.lang.String, wordsvirtuoso.Statistics);
    Code:
       0: aload_0
       1: ldc           #123                // String input
       3: invokestatic  #15                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: aload_1
       7: ldc           #125                // String x
       9: invokestatic  #15                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
      12: aload_2
      13: ldc           #127                // String statistics
      15: invokestatic  #15                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
      18: new           #129                // class java/util/LinkedHashMap
      21: dup
      22: invokespecial #130                // Method java/util/LinkedHashMap."<init>":()V
      25: checkcast     #132                // class java/util/Map
      28: astore_3
      29: aload_0
      30: checkcast     #80                 // class java/lang/CharSequence
      33: astore        4
      35: iconst_0
      36: istore        5
      38: aload         4
      40: astore        6
      42: new           #52                 // class java/util/ArrayList
      45: dup
      46: aload         4
      48: invokeinterface #133,  1          // InterfaceMethod java/lang/CharSequence.length:()I
      53: invokespecial #136                // Method java/util/ArrayList."<init>":(I)V
      56: checkcast     #58                 // class java/util/Collection
      59: astore        7
      61: iconst_0
      62: istore        8
      64: iconst_0
      65: istore        9
      67: iconst_0
      68: istore        10
      70: iload         10
      72: aload         6
      74: invokeinterface #133,  1          // InterfaceMethod java/lang/CharSequence.length:()I
      79: if_icmpge     220
      82: aload         6
      84: iload         10
      86: invokeinterface #140,  2          // InterfaceMethod java/lang/CharSequence.charAt:(I)C
      91: istore        11
      93: aload         7
      95: iload         9
      97: iinc          9, 1
     100: iload         11
     102: istore        12
     104: istore        13
     106: astore        15
     108: iconst_0
     109: istore        14
     111: iload         12
     113: aload_1
     114: iload         13
     116: invokevirtual #141                // Method java/lang/String.charAt:(I)C
     119: if_icmpne     142
     122: aload_3
     123: iload         12
     125: invokestatic  #145                // Method java/lang/String.valueOf:(C)Ljava/lang/String;
     128: getstatic     #151                // Field wordsvirtuoso/Color.GREEN:Lwordsvirtuoso/Color;
     131: invokeinterface #155,  3          // InterfaceMethod java/util/Map.put:(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
     136: checkcast     #147                // class wordsvirtuoso/Color
     139: goto          204
     142: aload_1
     143: checkcast     #80                 // class java/lang/CharSequence
     146: iload         12
     148: iconst_0
     149: iconst_2
     150: aconst_null
     151: invokestatic  #159                // Method kotlin/text/StringsKt.contains$default:(Ljava/lang/CharSequence;CZILjava/lang/Object;)Z
     154: ifeq          177
     157: aload_3
     158: iload         12
     160: invokestatic  #145                // Method java/lang/String.valueOf:(C)Ljava/lang/String;
     163: getstatic     #162                // Field wordsvirtuoso/Color.YELLOW:Lwordsvirtuoso/Color;
     166: invokeinterface #155,  3          // InterfaceMethod java/util/Map.put:(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
     171: checkcast     #147                // class wordsvirtuoso/Color
     174: goto          204
     177: aload_2
     178: iload         12
     180: invokestatic  #145                // Method java/lang/String.valueOf:(C)Ljava/lang/String;
     183: invokevirtual #168                // Method wordsvirtuoso/Statistics.addChar:(Ljava/lang/String;)Z
     186: pop
     187: aload_3
     188: iload         12
     190: invokestatic  #145                // Method java/lang/String.valueOf:(C)Ljava/lang/String;
     193: getstatic     #171                // Field wordsvirtuoso/Color.GREY:Lwordsvirtuoso/Color;
     196: invokeinterface #155,  3          // InterfaceMethod java/util/Map.put:(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
     201: checkcast     #147                // class wordsvirtuoso/Color
     204: nop
     205: aload         15
     207: swap
     208: invokeinterface #106,  2          // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     213: pop
     214: iinc          10, 1
     217: goto          70
     220: aload         7
     222: checkcast     #108                // class java/util/List
     225: nop
     226: pop
     227: aload_2
     228: aload_3
     229: invokevirtual #175                // Method wordsvirtuoso/Statistics.addMap:(Ljava/util/Map;)Z
     232: istore        4
     234: iload         4
     236: istore        5
     238: iconst_0
     239: istore        6
     241: getstatic     #21                 // Field java/lang/System.out:Ljava/io/PrintStream;
     244: invokevirtual #177                // Method java/io/PrintStream.println:()V
     247: nop
     248: iload         4
     250: istore        5
     252: iconst_0
     253: istore        6
     255: aload_2
     256: invokevirtual #180                // Method wordsvirtuoso/Statistics.printV:()V
     259: nop
     260: new           #182                // class java/lang/StringBuilder
     263: dup
     264: invokespecial #183                // Method java/lang/StringBuilder."<init>":()V
     267: bipush        10
     269: invokevirtual #187                // Method java/lang/StringBuilder.append:(C)Ljava/lang/StringBuilder;
     272: aload_2
     273: invokevirtual #191                // Method wordsvirtuoso/Statistics.getBadChar:()Ljava/util/Set;
     276: checkcast     #50                 // class java/lang/Iterable
     279: invokestatic  #197                // Method kotlin/collections/CollectionsKt.sorted:(Ljava/lang/Iterable;)Ljava/util/List;
     282: checkcast     #50                 // class java/lang/Iterable
     285: ldc           #199                // String
     287: checkcast     #80                 // class java/lang/CharSequence
     290: aconst_null
     291: aconst_null
     292: iconst_0
     293: aconst_null
     294: aconst_null
     295: bipush        62
     297: aconst_null
     298: invokestatic  #203                // 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;
     301: astore        5
     303: astore        15
     305: iconst_0
     306: istore        6
     308: getstatic     #206                // Field wordsvirtuoso/Color.AZURE:Lwordsvirtuoso/Color;
     311: aload         5
     313: invokevirtual #209                // Method wordsvirtuoso/Color.dye:(Ljava/lang/String;)Ljava/lang/String;
     316: aload         15
     318: swap
     319: nop
     320: invokevirtual #212                // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
     323: invokevirtual #215                // Method java/lang/StringBuilder.toString:()Ljava/lang/String;
     326: getstatic     #21                 // Field java/lang/System.out:Ljava/io/PrintStream;
     329: swap
     330: invokevirtual #27                 // Method java/io/PrintStream.println:(Ljava/lang/Object;)V
     333: return

  public static final void game(java.util.Set<java.lang.String>, java.util.Set<java.lang.String>);
    Code:
       0: aload_0
       1: ldc           #239                // String candidateWords
       3: invokestatic  #15                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: aload_1
       7: ldc           #241                // String allWords
       9: invokestatic  #15                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
      12: nop
      13: aload_0
      14: checkcast     #58                 // class java/util/Collection
      17: getstatic     #247                // Field kotlin/random/Random.Default:Lkotlin/random/Random$Default;
      20: checkcast     #243                // class kotlin/random/Random
      23: invokestatic  #251                // Method kotlin/collections/CollectionsKt.random:(Ljava/util/Collection;Lkotlin/random/Random;)Ljava/lang/Object;
      26: checkcast     #74                 // class java/lang/String
      29: getstatic     #257                // Field java/util/Locale.ROOT:Ljava/util/Locale;
      32: invokevirtual #261                // Method java/lang/String.toUpperCase:(Ljava/util/Locale;)Ljava/lang/String;
      35: dup
      36: ldc_w         #263                // String toUpperCase(...)
      39: invokestatic  #266                // Method kotlin/jvm/internal/Intrinsics.checkNotNullExpressionValue:(Ljava/lang/Object;Ljava/lang/String;)V
      42: astore_2
      43: new           #164                // class wordsvirtuoso/Statistics
      46: dup
      47: invokespecial #267                // Method wordsvirtuoso/Statistics."<init>":()V
      50: astore_3
      51: nop
      52: ldc_w         #269                // String Input a 5-letter word:
      55: invokestatic  #271                // Method input:(Ljava/lang/String;)Ljava/lang/String;
      58: getstatic     #257                // Field java/util/Locale.ROOT:Ljava/util/Locale;
      61: invokevirtual #261                // Method java/lang/String.toUpperCase:(Ljava/util/Locale;)Ljava/lang/String;
      64: dup
      65: ldc_w         #263                // String toUpperCase(...)
      68: invokestatic  #266                // Method kotlin/jvm/internal/Intrinsics.checkNotNullExpressionValue:(Ljava/lang/Object;Ljava/lang/String;)V
      71: astore        5
      73: aload         5
      75: astore        6
      77: iconst_0
      78: istore        7
      80: aload_3
      81: invokevirtual #274                // Method wordsvirtuoso/Statistics.getCount:()I
      84: istore        8
      86: aload_3
      87: iload         8
      89: iconst_1
      90: iadd
      91: invokevirtual #277                // Method wordsvirtuoso/Statistics.setCount:(I)V
      94: aload         5
      96: astore        4
      98: aload         4
     100: ldc_w         #279                // String exit
     103: iconst_1
     104: invokestatic  #283                // Method kotlin/text/StringsKt.equals:(Ljava/lang/String;Ljava/lang/String;Z)Z
     107: ifeq          123
     110: ldc_w         #285                // String The game is over.
     113: getstatic     #21                 // Field java/lang/System.out:Ljava/io/PrintStream;
     116: swap
     117: invokevirtual #27                 // Method java/io/PrintStream.println:(Ljava/lang/Object;)V
     120: goto          461
     123: aload         4
     125: aload_2
     126: invokestatic  #289                // Method kotlin/jvm/internal/Intrinsics.areEqual:(Ljava/lang/Object;Ljava/lang/Object;)Z
     129: ifeq          324
     132: aload_3
     133: invokevirtual #274                // Method wordsvirtuoso/Statistics.getCount:()I
     136: iconst_1
     137: if_icmpne     222
     140: aload_2
     141: checkcast     #80                 // class java/lang/CharSequence
     144: astore        5
     146: iconst_0
     147: istore        6
     149: iconst_0
     150: istore        7
     152: iload         7
     154: aload         5
     156: invokeinterface #133,  1          // InterfaceMethod java/lang/CharSequence.length:()I
     161: if_icmpge     208
     164: aload         5
     166: iload         7
     168: invokeinterface #140,  2          // InterfaceMethod java/lang/CharSequence.charAt:(I)C
     173: istore        8
     175: iload         8
     177: istore        9
     179: iconst_0
     180: istore        10
     182: getstatic     #151                // Field wordsvirtuoso/Color.GREEN:Lwordsvirtuoso/Color;
     185: iload         9
     187: invokestatic  #145                // Method java/lang/String.valueOf:(C)Ljava/lang/String;
     190: invokevirtual #209                // Method wordsvirtuoso/Color.dye:(Ljava/lang/String;)Ljava/lang/String;
     193: getstatic     #21                 // Field java/lang/System.out:Ljava/io/PrintStream;
     196: swap
     197: invokevirtual #292                // Method java/io/PrintStream.print:(Ljava/lang/Object;)V
     200: nop
     201: nop
     202: iinc          7, 1
     205: goto          152
     208: nop
     209: ldc_w         #294                // String \n\nCorrect!\nAmazing luck! The solution was found at once.
     212: getstatic     #21                 // Field java/lang/System.out:Ljava/io/PrintStream;
     215: swap
     216: invokevirtual #27                 // Method java/io/PrintStream.println:(Ljava/lang/Object;)V
     219: goto          321
     222: aload_3
     223: aload_2
     224: invokevirtual #298                // Method wordsvirtuoso/Statistics.addWord:(Ljava/lang/String;)Ljava/util/Map;
     227: astore        5
     229: aload         5
     231: astore        6
     233: iconst_0
     234: istore        7
     236: getstatic     #21                 // Field java/lang/System.out:Ljava/io/PrintStream;
     239: invokevirtual #177                // Method java/io/PrintStream.println:()V
     242: nop
     243: aload         5
     245: astore        5
     247: aload         5
     249: astore        6
     251: iconst_0
     252: istore        7
     254: aload_3
     255: invokevirtual #180                // Method wordsvirtuoso/Statistics.printV:()V
     258: nop
     259: invokestatic  #302                // Method java/lang/System.currentTimeMillis:()J
     262: aload_3
     263: invokevirtual #305                // Method wordsvirtuoso/Statistics.getStart:()J
     266: lsub
     267: sipush        1000
     270: i2l
     271: ldiv
     272: lstore        5
     274: new           #182                // class java/lang/StringBuilder
     277: dup
     278: invokespecial #183                // Method java/lang/StringBuilder."<init>":()V
     281: ldc_w         #307                // String \nCorrect!\nThe solution was found after
     284: invokevirtual #212                // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
     287: aload_3
     288: invokevirtual #274                // Method wordsvirtuoso/Statistics.getCount:()I
     291: invokevirtual #310                // Method java/lang/StringBuilder.append:(I)Ljava/lang/StringBuilder;
     294: ldc_w         #312                // String  tries in
     297: invokevirtual #212                // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
     300: lload         5
     302: invokevirtual #315                // Method java/lang/StringBuilder.append:(J)Ljava/lang/StringBuilder;
     305: ldc_w         #317                // String  seconds.
     308: invokevirtual #212                // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
     311: invokevirtual #215                // Method java/lang/StringBuilder.toString:()Ljava/lang/String;
     314: getstatic     #21                 // Field java/lang/System.out:Ljava/io/PrintStream;
     317: swap
     318: invokevirtual #27                 // Method java/io/PrintStream.println:(Ljava/lang/Object;)V
     321: goto          461
     324: aload         4
     326: invokevirtual #78                 // Method java/lang/String.length:()I
     329: iconst_5
     330: if_icmpeq     346
     333: ldc_w         #319                // String The input isn\'t a 5-letter word.
     336: getstatic     #21                 // Field java/lang/System.out:Ljava/io/PrintStream;
     339: swap
     340: invokevirtual #27                 // Method java/io/PrintStream.println:(Ljava/lang/Object;)V
     343: goto          51
     346: aload         4
     348: checkcast     #80                 // class java/lang/CharSequence
     351: astore        5
     353: new           #82                 // class kotlin/text/Regex
     356: dup
     357: ldc_w         #321                // String [A-Z]{5}
     360: invokespecial #87                 // Method kotlin/text/Regex."<init>":(Ljava/lang/String;)V
     363: aload         5
     365: invokevirtual #91                 // Method kotlin/text/Regex.matches:(Ljava/lang/CharSequence;)Z
     368: ifne          384
     371: ldc_w         #323                // String One or more letters of the input aren\'t valid.
     374: getstatic     #21                 // Field java/lang/System.out:Ljava/io/PrintStream;
     377: swap
     378: invokevirtual #27                 // Method java/io/PrintStream.println:(Ljava/lang/Object;)V
     381: goto          51
     384: aload         4
     386: checkcast     #80                 // class java/lang/CharSequence
     389: invokestatic  #97                 // Method kotlin/text/StringsKt.toSet:(Ljava/lang/CharSequence;)Ljava/util/Set;
     392: invokeinterface #102,  1          // InterfaceMethod java/util/Set.size:()I
     397: iconst_5
     398: if_icmpeq     414
     401: ldc_w         #325                // String The input has duplicate letters.
     404: getstatic     #21                 // Field java/lang/System.out:Ljava/io/PrintStream;
     407: swap
     408: invokevirtual #27                 // Method java/io/PrintStream.println:(Ljava/lang/Object;)V
     411: goto          51
     414: aload_1
     415: aload         4
     417: getstatic     #257                // Field java/util/Locale.ROOT:Ljava/util/Locale;
     420: invokevirtual #328                // Method java/lang/String.toLowerCase:(Ljava/util/Locale;)Ljava/lang/String;
     423: dup
     424: ldc_w         #330                // String toLowerCase(...)
     427: invokestatic  #266                // Method kotlin/jvm/internal/Intrinsics.checkNotNullExpressionValue:(Ljava/lang/Object;Ljava/lang/String;)V
     430: invokeinterface #333,  2          // InterfaceMethod java/util/Set.contains:(Ljava/lang/Object;)Z
     435: ifne          451
     438: ldc_w         #335                // String The input word isn\'t included in my words list.
     441: getstatic     #21                 // Field java/lang/System.out:Ljava/io/PrintStream;
     444: swap
     445: invokevirtual #27                 // Method java/io/PrintStream.println:(Ljava/lang/Object;)V
     448: goto          51
     451: aload         4
     453: aload_2
     454: aload_3
     455: invokestatic  #337                // Method output:(Ljava/lang/String;Ljava/lang/String;Lwordsvirtuoso/Statistics;)V
     458: goto          51
     461: return

  public static final void start(java.lang.String[]);
    Code:
       0: aload_0
       1: ldc_w         #350                // String args
       4: invokestatic  #15                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       7: aload_0
       8: arraylength
       9: iconst_2
      10: if_icmpeq     30
      13: ldc_w         #352                // String Error: Wrong number of arguments.
      16: getstatic     #21                 // Field java/lang/System.out:Ljava/io/PrintStream;
      19: swap
      20: invokevirtual #27                 // Method java/io/PrintStream.println:(Ljava/lang/Object;)V
      23: getstatic     #33                 // Field kotlin/Unit.INSTANCE:Lkotlin/Unit;
      26: astore_2
      27: iconst_0
      28: istore_3
      29: return
      30: iconst_2
      31: anewarray     #354                // class java/io/File
      34: astore_2
      35: aload_2
      36: iconst_0
      37: new           #354                // class java/io/File
      40: dup
      41: aload_0
      42: iconst_0
      43: aaload
      44: invokespecial #355                // Method java/io/File."<init>":(Ljava/lang/String;)V
      47: aastore
      48: aload_2
      49: iconst_1
      50: new           #354                // class java/io/File
      53: dup
      54: aload_0
      55: iconst_1
      56: aaload
      57: invokespecial #355                // Method java/io/File."<init>":(Ljava/lang/String;)V
      60: aastore
      61: aload_2
      62: astore_1
      63: aload_1
      64: iconst_0
      65: aaload
      66: astore_2
      67: aload_1
      68: iconst_1
      69: aaload
      70: astore_3
      71: aload_2
      72: invokevirtual #358                // Method java/io/File.exists:()Z
      75: ifne          120
      78: new           #182                // class java/lang/StringBuilder
      81: dup
      82: invokespecial #183                // Method java/lang/StringBuilder."<init>":()V
      85: ldc_w         #360                // String Error: The words file
      88: invokevirtual #212                // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
      91: aload_2
      92: invokevirtual #363                // Method java/lang/StringBuilder.append:(Ljava/lang/Object;)Ljava/lang/StringBuilder;
      95: ldc_w         #365                // String  doesn\'t exist.
      98: invokevirtual #212                // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
     101: invokevirtual #215                // Method java/lang/StringBuilder.toString:()Ljava/lang/String;
     104: getstatic     #21                 // Field java/lang/System.out:Ljava/io/PrintStream;
     107: swap
     108: invokevirtual #27                 // Method java/io/PrintStream.println:(Ljava/lang/Object;)V
     111: getstatic     #33                 // Field kotlin/Unit.INSTANCE:Lkotlin/Unit;
     114: astore        5
     116: iconst_0
     117: istore        6
     119: return
     120: aload_3
     121: invokevirtual #358                // Method java/io/File.exists:()Z
     124: ifne          169
     127: new           #182                // class java/lang/StringBuilder
     130: dup
     131: invokespecial #183                // Method java/lang/StringBuilder."<init>":()V
     134: ldc_w         #367                // String Error: The candidate words file
     137: invokevirtual #212                // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
     140: aload_3
     141: invokevirtual #363                // Method java/lang/StringBuilder.append:(Ljava/lang/Object;)Ljava/lang/StringBuilder;
     144: ldc_w         #365                // String  doesn\'t exist.
     147: invokevirtual #212                // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
     150: invokevirtual #215                // Method java/lang/StringBuilder.toString:()Ljava/lang/String;
     153: getstatic     #21                 // Field java/lang/System.out:Ljava/io/PrintStream;
     156: swap
     157: invokevirtual #27                 // Method java/io/PrintStream.println:(Ljava/lang/Object;)V
     160: getstatic     #33                 // Field kotlin/Unit.INSTANCE:Lkotlin/Unit;
     163: astore        5
     165: iconst_0
     166: istore        6
     168: return
     169: iconst_2
     170: anewarray     #99                 // class java/util/Set
     173: astore        5
     175: aload         5
     177: iconst_0
     178: aload_2
     179: aconst_null
     180: iconst_1
     181: aconst_null
     182: invokestatic  #373                // Method kotlin/io/FilesKt.readLines$default:(Ljava/io/File;Ljava/nio/charset/Charset;ILjava/lang/Object;)Ljava/util/List;
     185: checkcast     #50                 // class java/lang/Iterable
     188: astore        6
     190: istore        16
     192: astore        15
     194: iconst_0
     195: istore        7
     197: aload         6
     199: astore        8
     201: new           #52                 // class java/util/ArrayList
     204: dup
     205: aload         6
     207: bipush        10
     209: invokestatic  #377                // Method kotlin/collections/CollectionsKt.collectionSizeOrDefault:(Ljava/lang/Iterable;I)I
     212: invokespecial #136                // Method java/util/ArrayList."<init>":(I)V
     215: checkcast     #58                 // class java/util/Collection
     218: astore        9
     220: iconst_0
     221: istore        10
     223: aload         8
     225: invokeinterface #62,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     230: astore        11
     232: aload         11
     234: invokeinterface #68,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     239: ifeq          293
     242: aload         11
     244: invokeinterface #72,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     249: astore        12
     251: aload         9
     253: aload         12
     255: checkcast     #74                 // class java/lang/String
     258: astore        13
     260: astore        17
     262: iconst_0
     263: istore        14
     265: aload         13
     267: getstatic     #257                // Field java/util/Locale.ROOT:Ljava/util/Locale;
     270: invokevirtual #328                // Method java/lang/String.toLowerCase:(Ljava/util/Locale;)Ljava/lang/String;
     273: dup
     274: ldc_w         #330                // String toLowerCase(...)
     277: invokestatic  #266                // Method kotlin/jvm/internal/Intrinsics.checkNotNullExpressionValue:(Ljava/lang/Object;Ljava/lang/String;)V
     280: nop
     281: aload         17
     283: swap
     284: invokeinterface #106,  2          // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     289: pop
     290: goto          232
     293: aload         9
     295: checkcast     #108                // class java/util/List
     298: nop
     299: astore        17
     301: aload         15
     303: iload         16
     305: aload         17
     307: checkcast     #50                 // class java/lang/Iterable
     310: invokestatic  #380                // Method kotlin/collections/CollectionsKt.toSet:(Ljava/lang/Iterable;)Ljava/util/Set;
     313: aastore
     314: aload         5
     316: iconst_1
     317: aload_3
     318: aconst_null
     319: iconst_1
     320: aconst_null
     321: invokestatic  #373                // Method kotlin/io/FilesKt.readLines$default:(Ljava/io/File;Ljava/nio/charset/Charset;ILjava/lang/Object;)Ljava/util/List;
     324: checkcast     #50                 // class java/lang/Iterable
     327: astore        6
     329: istore        16
     331: astore        15
     333: iconst_0
     334: istore        7
     336: aload         6
     338: astore        8
     340: new           #52                 // class java/util/ArrayList
     343: dup
     344: aload         6
     346: bipush        10
     348: invokestatic  #377                // Method kotlin/collections/CollectionsKt.collectionSizeOrDefault:(Ljava/lang/Iterable;I)I
     351: invokespecial #136                // Method java/util/ArrayList."<init>":(I)V
     354: checkcast     #58                 // class java/util/Collection
     357: astore        9
     359: iconst_0
     360: istore        10
     362: aload         8
     364: invokeinterface #62,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     369: astore        11
     371: aload         11
     373: invokeinterface #68,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     378: ifeq          432
     381: aload         11
     383: invokeinterface #72,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     388: astore        12
     390: aload         9
     392: aload         12
     394: checkcast     #74                 // class java/lang/String
     397: astore        13
     399: astore        17
     401: iconst_0
     402: istore        14
     404: aload         13
     406: getstatic     #257                // Field java/util/Locale.ROOT:Ljava/util/Locale;
     409: invokevirtual #328                // Method java/lang/String.toLowerCase:(Ljava/util/Locale;)Ljava/lang/String;
     412: dup
     413: ldc_w         #330                // String toLowerCase(...)
     416: invokestatic  #266                // Method kotlin/jvm/internal/Intrinsics.checkNotNullExpressionValue:(Ljava/lang/Object;Ljava/lang/String;)V
     419: nop
     420: aload         17
     422: swap
     423: invokeinterface #106,  2          // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     428: pop
     429: goto          371
     432: aload         9
     434: checkcast     #108                // class java/util/List
     437: nop
     438: astore        17
     440: aload         15
     442: iload         16
     444: aload         17
     446: checkcast     #50                 // class java/lang/Iterable
     449: invokestatic  #380                // Method kotlin/collections/CollectionsKt.toSet:(Ljava/lang/Iterable;)Ljava/util/Set;
     452: aastore
     453: aload         5
     455: astore        4
     457: aload         4
     459: iconst_0
     460: aaload
     461: astore        5
     463: aload         4
     465: iconst_1
     466: aaload
     467: astore        6
     469: aload         5
     471: invokestatic  #382                // Method check:(Ljava/util/Set;)Ljava/util/List;
     474: invokeinterface #385,  1          // InterfaceMethod java/util/List.isEmpty:()Z
     479: ifne          543
     482: new           #182                // class java/lang/StringBuilder
     485: dup
     486: invokespecial #183                // Method java/lang/StringBuilder."<init>":()V
     489: ldc_w         #387                // String Error:
     492: invokevirtual #212                // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
     495: aload         5
     497: invokestatic  #382                // Method check:(Ljava/util/Set;)Ljava/util/List;
     500: invokeinterface #388,  1          // InterfaceMethod java/util/List.size:()I
     505: invokevirtual #310                // Method java/lang/StringBuilder.append:(I)Ljava/lang/StringBuilder;
     508: ldc_w         #390                // String  invalid words were found in the
     511: invokevirtual #212                // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
     514: aload_2
     515: invokevirtual #363                // Method java/lang/StringBuilder.append:(Ljava/lang/Object;)Ljava/lang/StringBuilder;
     518: ldc_w         #392                // String  file.
     521: invokevirtual #212                // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
     524: invokevirtual #215                // Method java/lang/StringBuilder.toString:()Ljava/lang/String;
     527: getstatic     #21                 // Field java/lang/System.out:Ljava/io/PrintStream;
     530: swap
     531: invokevirtual #27                 // Method java/io/PrintStream.println:(Ljava/lang/Object;)V
     534: getstatic     #33                 // Field kotlin/Unit.INSTANCE:Lkotlin/Unit;
     537: astore        8
     539: iconst_0
     540: istore        9
     542: return
     543: aload         6
     545: invokestatic  #382                // Method check:(Ljava/util/Set;)Ljava/util/List;
     548: invokeinterface #385,  1          // InterfaceMethod java/util/List.isEmpty:()Z
     553: ifne          617
     556: new           #182                // class java/lang/StringBuilder
     559: dup
     560: invokespecial #183                // Method java/lang/StringBuilder."<init>":()V
     563: ldc_w         #387                // String Error:
     566: invokevirtual #212                // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
     569: aload         6
     571: invokestatic  #382                // Method check:(Ljava/util/Set;)Ljava/util/List;
     574: invokeinterface #388,  1          // InterfaceMethod java/util/List.size:()I
     579: invokevirtual #310                // Method java/lang/StringBuilder.append:(I)Ljava/lang/StringBuilder;
     582: ldc_w         #390                // String  invalid words were found in the
     585: invokevirtual #212                // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
     588: aload_3
     589: invokevirtual #363                // Method java/lang/StringBuilder.append:(Ljava/lang/Object;)Ljava/lang/StringBuilder;
     592: ldc_w         #392                // String  file.
     595: invokevirtual #212                // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
     598: invokevirtual #215                // Method java/lang/StringBuilder.toString:()Ljava/lang/String;
     601: getstatic     #21                 // Field java/lang/System.out:Ljava/io/PrintStream;
     604: swap
     605: invokevirtual #27                 // Method java/io/PrintStream.println:(Ljava/lang/Object;)V
     608: getstatic     #33                 // Field kotlin/Unit.INSTANCE:Lkotlin/Unit;
     611: astore        8
     613: iconst_0
     614: istore        9
     616: return
     617: aload         6
     619: checkcast     #50                 // class java/lang/Iterable
     622: invokestatic  #395                // Method kotlin/collections/CollectionsKt.toMutableSet:(Ljava/lang/Iterable;)Ljava/util/Set;
     625: astore        7
     627: aload         7
     629: aload         5
     631: checkcast     #58                 // class java/util/Collection
     634: invokeinterface #399,  2          // InterfaceMethod java/util/Set.removeAll:(Ljava/util/Collection;)Z
     639: pop
     640: aload         7
     642: checkcast     #58                 // class java/util/Collection
     645: invokeinterface #400,  1          // InterfaceMethod java/util/Collection.isEmpty:()Z
     650: ifne          657
     653: iconst_1
     654: goto          658
     657: iconst_0
     658: ifeq          719
     661: new           #182                // class java/lang/StringBuilder
     664: dup
     665: invokespecial #183                // Method java/lang/StringBuilder."<init>":()V
     668: ldc_w         #387                // String Error:
     671: invokevirtual #212                // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
     674: aload         7
     676: invokeinterface #102,  1          // InterfaceMethod java/util/Set.size:()I
     681: invokevirtual #310                // Method java/lang/StringBuilder.append:(I)Ljava/lang/StringBuilder;
     684: ldc_w         #402                // String  candidate words are not included in the
     687: invokevirtual #212                // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
     690: aload_2
     691: invokevirtual #363                // Method java/lang/StringBuilder.append:(Ljava/lang/Object;)Ljava/lang/StringBuilder;
     694: ldc_w         #392                // String  file.
     697: invokevirtual #212                // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
     700: invokevirtual #215                // Method java/lang/StringBuilder.toString:()Ljava/lang/String;
     703: getstatic     #21                 // Field java/lang/System.out:Ljava/io/PrintStream;
     706: swap
     707: invokevirtual #27                 // Method java/io/PrintStream.println:(Ljava/lang/Object;)V
     710: getstatic     #33                 // Field kotlin/Unit.INSTANCE:Lkotlin/Unit;
     713: astore        9
     715: iconst_0
     716: istore        10
     718: return
     719: ldc_w         #404                // String Words Virtuoso
     722: getstatic     #21                 // Field java/lang/System.out:Ljava/io/PrintStream;
     725: swap
     726: invokevirtual #27                 // Method java/io/PrintStream.println:(Ljava/lang/Object;)V
     729: getstatic     #33                 // Field kotlin/Unit.INSTANCE:Lkotlin/Unit;
     732: astore        8
     734: aload         8
     736: astore        9
     738: iconst_0
     739: istore        10
     741: aload         6
     743: aload         5
     745: invokestatic  #406                // Method game:(Ljava/util/Set;Ljava/util/Set;)V
     748: nop
     749: return

  public static final void main(java.lang.String[]);
    Code:
       0: aload_0
       1: ldc_w         #350                // String args
       4: invokestatic  #15                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       7: aload_0
       8: invokestatic  #433                // Method start:([Ljava/lang/String;)V
      11: return
}


Compiled from "Day2.kt"
public final class cz.tommyred.days.Day2Kt {
  private static final java.lang.String sample;

  private static final java.lang.String hardInput;

  private static final java.lang.String xsample;

  public static final java.lang.String getSample();
    Code:
       0: getstatic     #11                 // Field sample:Ljava/lang/String;
       3: areturn

  public static final java.lang.String getHardInput();
    Code:
       0: getstatic     #15                 // Field hardInput:Ljava/lang/String;
       3: areturn

  public static final java.lang.String getXsample();
    Code:
       0: getstatic     #19                 // Field xsample:Ljava/lang/String;
       3: areturn

  public static final void main(java.lang.String[]);
    Code:
       0: aload_0
       1: ldc           #23                 // String args
       3: invokestatic  #29                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: getstatic     #19                 // Field xsample:Ljava/lang/String;
       9: invokestatic  #33                 // Method parseInput:(Ljava/lang/String;)Ljava/util/List;
      12: invokestatic  #37                 // Method solve2:(Ljava/util/List;)I
      15: istore_1
      16: getstatic     #43                 // Field java/lang/System.out:Ljava/io/PrintStream;
      19: iload_1
      20: invokevirtual #49                 // Method java/io/PrintStream.println:(I)V
      23: return

  public static final int solve(java.util.List<? extends java.util.List<java.lang.Integer>>);
    Code:
       0: aload_0
       1: ldc           #54                 // String list
       3: invokestatic  #29                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: aload_0
       7: checkcast     #56                 // class java/lang/Iterable
      10: astore_1
      11: iconst_0
      12: istore_2
      13: aload_1
      14: astore_3
      15: new           #58                 // class java/util/ArrayList
      18: dup
      19: aload_1
      20: bipush        10
      22: invokestatic  #64                 // Method kotlin/collections/CollectionsKt.collectionSizeOrDefault:(Ljava/lang/Iterable;I)I
      25: invokespecial #67                 // Method java/util/ArrayList."<init>":(I)V
      28: checkcast     #69                 // class java/util/Collection
      31: astore        4
      33: iconst_0
      34: istore        5
      36: aload_3
      37: invokeinterface #73,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
      42: astore        6
      44: aload         6
      46: invokeinterface #79,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
      51: ifeq          129
      54: aload         6
      56: invokeinterface #83,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
      61: astore        7
      63: aload         4
      65: aload         7
      67: checkcast     #85                 // class java/util/List
      70: astore        8
      72: astore        10
      74: iconst_0
      75: istore        9
      77: aload         8
      79: checkcast     #56                 // class java/lang/Iterable
      82: invokestatic  #89                 // Method kotlin/collections/CollectionsKt.maxOrThrow:(Ljava/lang/Iterable;)Ljava/lang/Comparable;
      85: dup
      86: invokestatic  #93                 // Method kotlin/jvm/internal/Intrinsics.checkNotNull:(Ljava/lang/Object;)V
      89: checkcast     #95                 // class java/lang/Number
      92: invokevirtual #99                 // Method java/lang/Number.intValue:()I
      95: aload         8
      97: checkcast     #56                 // class java/lang/Iterable
     100: invokestatic  #102                // Method kotlin/collections/CollectionsKt.minOrThrow:(Ljava/lang/Iterable;)Ljava/lang/Comparable;
     103: dup
     104: invokestatic  #93                 // Method kotlin/jvm/internal/Intrinsics.checkNotNull:(Ljava/lang/Object;)V
     107: checkcast     #95                 // class java/lang/Number
     110: invokevirtual #99                 // Method java/lang/Number.intValue:()I
     113: isub
     114: invokestatic  #108                // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     117: aload         10
     119: swap
     120: invokeinterface #112,  2          // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     125: pop
     126: goto          44
     129: aload         4
     131: checkcast     #85                 // class java/util/List
     134: nop
     135: checkcast     #56                 // class java/lang/Iterable
     138: astore_1
     139: nop
     140: iconst_0
     141: istore_2
     142: aload_1
     143: invokeinterface #73,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     148: astore_3
     149: aload_3
     150: invokeinterface #79,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     155: ifne          168
     158: new           #114                // class java/lang/UnsupportedOperationException
     161: dup
     162: ldc           #116                // String Empty collection can\'t be reduced.
     164: invokespecial #119                // Method java/lang/UnsupportedOperationException."<init>":(Ljava/lang/String;)V
     167: athrow
     168: aload_3
     169: invokeinterface #83,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     174: astore        4
     176: aload_3
     177: invokeinterface #79,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     182: ifeq          225
     185: aload         4
     187: aload_3
     188: invokeinterface #83,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     193: checkcast     #95                 // class java/lang/Number
     196: invokevirtual #99                 // Method java/lang/Number.intValue:()I
     199: istore        5
     201: checkcast     #95                 // class java/lang/Number
     204: invokevirtual #99                 // Method java/lang/Number.intValue:()I
     207: istore        6
     209: iconst_0
     210: istore        7
     212: iload         6
     214: iload         5
     216: iadd
     217: invokestatic  #108                // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     220: astore        4
     222: goto          176
     225: aload         4
     227: checkcast     #95                 // class java/lang/Number
     230: invokevirtual #99                 // Method java/lang/Number.intValue:()I
     233: ireturn

  public static final int solve2(java.util.List<? extends java.util.List<java.lang.Integer>>);
    Code:
       0: aload_0
       1: ldc           #54                 // String list
       3: invokestatic  #29                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: aload_0
       7: checkcast     #56                 // class java/lang/Iterable
      10: astore_1
      11: iconst_0
      12: istore_2
      13: aload_1
      14: astore_3
      15: new           #58                 // class java/util/ArrayList
      18: dup
      19: aload_1
      20: bipush        10
      22: invokestatic  #64                 // Method kotlin/collections/CollectionsKt.collectionSizeOrDefault:(Ljava/lang/Iterable;I)I
      25: invokespecial #67                 // Method java/util/ArrayList."<init>":(I)V
      28: checkcast     #69                 // class java/util/Collection
      31: astore        4
      33: iconst_0
      34: istore        5
      36: aload_3
      37: invokeinterface #73,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
      42: astore        6
      44: aload         6
      46: invokeinterface #79,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
      51: ifeq          97
      54: aload         6
      56: invokeinterface #83,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
      61: astore        7
      63: aload         4
      65: aload         7
      67: checkcast     #85                 // class java/util/List
      70: astore        8
      72: astore        10
      74: iconst_0
      75: istore        9
      77: aload         8
      79: invokestatic  #143                // Method getFirstDivisor:(Ljava/util/List;)I
      82: invokestatic  #108                // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
      85: aload         10
      87: swap
      88: invokeinterface #112,  2          // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
      93: pop
      94: goto          44
      97: aload         4
      99: checkcast     #85                 // class java/util/List
     102: nop
     103: checkcast     #56                 // class java/lang/Iterable
     106: astore_1
     107: nop
     108: iconst_0
     109: istore_2
     110: aload_1
     111: invokeinterface #73,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     116: astore_3
     117: aload_3
     118: invokeinterface #79,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     123: ifne          136
     126: new           #114                // class java/lang/UnsupportedOperationException
     129: dup
     130: ldc           #116                // String Empty collection can\'t be reduced.
     132: invokespecial #119                // Method java/lang/UnsupportedOperationException."<init>":(Ljava/lang/String;)V
     135: athrow
     136: aload_3
     137: invokeinterface #83,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     142: astore        4
     144: aload_3
     145: invokeinterface #79,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     150: ifeq          236
     153: aload         4
     155: aload_3
     156: invokeinterface #83,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     161: checkcast     #95                 // class java/lang/Number
     164: invokevirtual #99                 // Method java/lang/Number.intValue:()I
     167: istore        5
     169: checkcast     #95                 // class java/lang/Number
     172: invokevirtual #99                 // Method java/lang/Number.intValue:()I
     175: istore        6
     177: iconst_0
     178: istore        7
     180: nop
     181: iconst_0
     182: istore        8
     184: new           #145                // class java/lang/StringBuilder
     187: dup
     188: invokespecial #148                // Method java/lang/StringBuilder."<init>":()V
     191: ldc           #150                // String a
     193: invokevirtual #154                // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
     196: iload         6
     198: invokevirtual #157                // Method java/lang/StringBuilder.append:(I)Ljava/lang/StringBuilder;
     201: ldc           #159                // String  b
     203: invokevirtual #154                // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
     206: iload         5
     208: invokevirtual #157                // Method java/lang/StringBuilder.append:(I)Ljava/lang/StringBuilder;
     211: invokevirtual #162                // Method java/lang/StringBuilder.toString:()Ljava/lang/String;
     214: getstatic     #43                 // Field java/lang/System.out:Ljava/io/PrintStream;
     217: swap
     218: invokevirtual #164                // Method java/io/PrintStream.println:(Ljava/lang/Object;)V
     221: iload         6
     223: iload         5
     225: iadd
     226: nop
     227: nop
     228: invokestatic  #108                // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     231: astore        4
     233: goto          144
     236: aload         4
     238: checkcast     #95                 // class java/lang/Number
     241: invokevirtual #99                 // Method java/lang/Number.intValue:()I
     244: ireturn

  public static final int getFirstDivisor(java.util.List<java.lang.Integer>);
    Code:
       0: aload_0
       1: ldc           #54                 // String list
       3: invokestatic  #29                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: iconst_1
       7: ireturn

  public static final java.util.List<java.util.List<java.lang.Integer>> parseInput(java.lang.String);
    Code:
       0: aload_0
       1: ldc           #171                // String input
       3: invokestatic  #29                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: aload_0
       7: checkcast     #173                // class java/lang/CharSequence
      10: iconst_1
      11: anewarray     #175                // class java/lang/String
      14: astore_1
      15: aload_1
      16: iconst_0
      17: ldc           #177                // String \n
      19: aastore
      20: aload_1
      21: iconst_0
      22: iconst_0
      23: bipush        6
      25: aconst_null
      26: invokestatic  #183                // Method kotlin/text/StringsKt.split$default:(Ljava/lang/CharSequence;[Ljava/lang/String;ZIILjava/lang/Object;)Ljava/util/List;
      29: checkcast     #56                 // class java/lang/Iterable
      32: astore_1
      33: iconst_0
      34: istore_2
      35: aload_1
      36: astore_3
      37: new           #58                 // class java/util/ArrayList
      40: dup
      41: aload_1
      42: bipush        10
      44: invokestatic  #64                 // Method kotlin/collections/CollectionsKt.collectionSizeOrDefault:(Ljava/lang/Iterable;I)I
      47: invokespecial #67                 // Method java/util/ArrayList."<init>":(I)V
      50: checkcast     #69                 // class java/util/Collection
      53: astore        4
      55: iconst_0
      56: istore        5
      58: aload_3
      59: invokeinterface #73,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
      64: astore        6
      66: aload         6
      68: invokeinterface #79,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
      73: ifeq          242
      76: aload         6
      78: invokeinterface #83,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
      83: astore        7
      85: aload         4
      87: aload         7
      89: checkcast     #175                // class java/lang/String
      92: astore        8
      94: astore        20
      96: iconst_0
      97: istore        9
      99: aload         8
     101: checkcast     #173                // class java/lang/CharSequence
     104: iconst_1
     105: anewarray     #175                // class java/lang/String
     108: astore        10
     110: aload         10
     112: iconst_0
     113: ldc           #185                // String
     115: aastore
     116: aload         10
     118: iconst_0
     119: iconst_0
     120: bipush        6
     122: aconst_null
     123: invokestatic  #183                // Method kotlin/text/StringsKt.split$default:(Ljava/lang/CharSequence;[Ljava/lang/String;ZIILjava/lang/Object;)Ljava/util/List;
     126: checkcast     #56                 // class java/lang/Iterable
     129: astore        10
     131: iconst_0
     132: istore        11
     134: aload         10
     136: astore        12
     138: new           #58                 // class java/util/ArrayList
     141: dup
     142: aload         10
     144: bipush        10
     146: invokestatic  #64                 // Method kotlin/collections/CollectionsKt.collectionSizeOrDefault:(Ljava/lang/Iterable;I)I
     149: invokespecial #67                 // Method java/util/ArrayList."<init>":(I)V
     152: checkcast     #69                 // class java/util/Collection
     155: astore        13
     157: iconst_0
     158: istore        14
     160: aload         12
     162: invokeinterface #73,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     167: astore        15
     169: aload         15
     171: invokeinterface #79,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     176: ifeq          223
     179: aload         15
     181: invokeinterface #83,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     186: astore        16
     188: aload         13
     190: aload         16
     192: checkcast     #175                // class java/lang/String
     195: astore        17
     197: astore        18
     199: iconst_0
     200: istore        19
     202: aload         17
     204: invokestatic  #189                // Method java/lang/Integer.parseInt:(Ljava/lang/String;)I
     207: nop
     208: invokestatic  #108                // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     211: aload         18
     213: swap
     214: invokeinterface #112,  2          // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     219: pop
     220: goto          169
     223: aload         13
     225: checkcast     #85                 // class java/util/List
     228: nop
     229: nop
     230: aload         20
     232: swap
     233: invokeinterface #112,  2          // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     238: pop
     239: goto          66
     242: aload         4
     244: checkcast     #85                 // class java/util/List
     247: nop
     248: areturn

  static {};
    Code:
       0: ldc           #194                // String 5 1 9 5\n7 5 3\n2 4 6 8
       2: putstatic     #11                 // Field sample:Ljava/lang/String;
       5: ldc           #196                // String 4347 3350 196 162 233 4932 4419 3485 4509 4287 4433 4033 207 3682 2193 4223\n648 94 778 957 1634 2885 1964 2929 2754 89 972 112 80 2819 543 2820\n400 133 1010 918 1154 1008 126 150 1118 117 148 463 141 940 1101 89\n596 527 224 382 511 565 284 121 643 139 625 335 657 134 125 152\n2069 1183 233 213 2192 193 2222 2130 2073 2262 1969 2159 2149 410 181 1924\n1610 128 1021 511 740 1384 459 224 183 266 152 1845 1423 230 1500 1381\n5454 3936 250 5125 244 720 5059 202 4877 5186 313 6125 172 727 1982 748\n3390 3440 220 228 195 4525 1759 1865 1483 5174 4897 4511 5663 4976 3850 199\n130 1733 238 1123 231 1347 241 291 1389 1392 269 1687 1359 1694 1629 1750\n1590 1394 101 434 1196 623 1033 78 890 1413 74 1274 1512 1043 1103 84\n203 236 3001 1664 195 4616 2466 4875 986 1681 152 3788 541 4447 4063 5366\n216 4134 255 235 1894 5454 1529 4735 4962 220 2011 2475 185 5060 4676 4089\n224 253 19 546 1134 3666 3532 207 210 3947 2290 3573 3808 1494 4308 4372\n134 130 2236 118 142 2350 3007 2495 2813 2833 2576 2704 169 2666 2267 850\n401 151 309 961 124 1027 1084 389 1150 166 1057 137 932 669 590 188\n784 232 363 316 336 666 711 430 192 867 628 57 222 575 622 234
       7: putstatic     #15                 // Field hardInput:Ljava/lang/String;
      10: ldc           #198                // String 5 9 2 8\n9 4 7 3\n3 8 6 5
      12: putstatic     #19                 // Field xsample:Ljava/lang/String;
      15: return
}