package codeforces.kotlinheroes6
import java.util.*
import kotlin.system.exitProcess

fun main() {
	for (n in 1..20) solve(n)
	solve(readInt())
}

private fun solve(n: Int) {
	val set = List(2 * n + 1) { TreeSet<Int>() }
	val score = IntArray(n + 1) { 0 }
	val divs = List(n + 1) { mutableListOf<Int>() }
	for (i in 1..n) set[0].add(i)
	fun change(x: Int, delta: Int) {
		set[n + score[x]].remove(x)
		score[x] += delta
		set[n + score[x]].add(x)
	}
	fun remove(x: Int) {
		set[n + score[x]].remove(x)
		score[x] = -1
	}
	for (i in 1..n) {
		for (j in 2 * i..n step i) {
			change(j, +1)
			divs[j].add(i)
		}
	}
	val ans = mutableListOf(0)
	var bestScore = set.lastIndex
	for (k in 1..n) {
		while (set[bestScore].isEmpty()) bestScore--
		var bonus = bestScore - n
		val x = set[bestScore].last()
		remove(x)
		for (j in 2 * x..n step x) {
			if (score[j] == -1) {
				bonus--
				continue
			}
		}
		ans.add(ans.last() + bonus)
	}
	val fullSearch = researchFullSearch(n)
	if (!fullSearch.contentEquals(ans.toIntArray())) {
		println("! $n")
		println(ans.drop(1).joinToString(" "))
		println(fullSearch.drop(1).joinToString(" "))
		println(researchStupid(n).drop(1).joinToString(" "))
		exitProcess(0)
	}
	println(ans.drop(1).joinToString(" "))
}

private fun researchFullSearch(n: Int): IntArray {
	val ans = IntArray(n + 1) { 0 }
	for (mask in 0 until (1 shl n)) {
		var count = 0
		for (i in 0 until n) if (mask.hasBit(i)) for (j in 0 until n) if (!mask.hasBit(j) && (i + 1) % (j + 1) == 0) {
			count++
		}
		if (count >= 17) {
			println(count)
			println(n)
			println(mask.toString(2))
		}
		val size = mask.countOneBits()
		ans[size] = maxOf(ans[size], count)
	}
	return ans
}

private fun researchStupid(n: Int): IntArray {
	val ans = IntArray(n + 1) {
		val k = n - it
		var s = 0
		for (i in k + 1..n) for (j in 1..k) {
			if (i % j == 0) s++
		}
		s
	}
	return ans
}

private fun readLn() = readLine()!!
private fun readInt() = readLn().toInt()
private fun Int.bit(index: Int) = shr(index) and 1
private fun Int.hasBit(index: Int) = bit(index) != 0

Compiled from "g_wrong.kt"
public final class codeforces.kotlinheroes6.G_wrongKt {
  public static final void main();
    Code:
       0: iconst_1
       1: istore_0
       2: iload_0
       3: bipush        21
       5: if_icmpge     18
       8: iload_0
       9: invokestatic  #10                 // Method solve:(I)V
      12: iinc          0, 1
      15: goto          2
      18: invokestatic  #14                 // Method readInt:()I
      21: invokestatic  #10                 // Method solve:(I)V
      24: return

  private static final void solve(int);
    Code:
       0: iconst_2
       1: iload_0
       2: imul
       3: iconst_1
       4: iadd
       5: istore_2
       6: new           #18                 // class java/util/ArrayList
       9: dup
      10: iload_2
      11: invokespecial #21                 // Method java/util/ArrayList."<init>":(I)V
      14: astore_3
      15: iconst_0
      16: istore        4
      18: iload         4
      20: iload_2
      21: if_icmpge     58
      24: iload         4
      26: istore        5
      28: aload_3
      29: iload         5
      31: istore        6
      33: astore        14
      35: iconst_0
      36: istore        7
      38: new           #23                 // class java/util/TreeSet
      41: dup
      42: invokespecial #25                 // Method java/util/TreeSet."<init>":()V
      45: aload         14
      47: swap
      48: invokevirtual #29                 // Method java/util/ArrayList.add:(Ljava/lang/Object;)Z
      51: pop
      52: iinc          4, 1
      55: goto          18
      58: aload_3
      59: checkcast     #31                 // class java/util/List
      62: astore_1
      63: iconst_0
      64: istore_3
      65: iload_0
      66: iconst_1
      67: iadd
      68: istore        4
      70: iload         4
      72: newarray       int
      74: astore        5
      76: iload_3
      77: iload         4
      79: if_icmpge     97
      82: iload_3
      83: istore        6
      85: aload         5
      87: iload         6
      89: iconst_0
      90: iastore
      91: iinc          3, 1
      94: goto          76
      97: aload         5
      99: astore_2
     100: iload_0
     101: iconst_1
     102: iadd
     103: istore        4
     105: new           #18                 // class java/util/ArrayList
     108: dup
     109: iload         4
     111: invokespecial #21                 // Method java/util/ArrayList."<init>":(I)V
     114: astore        5
     116: iconst_0
     117: istore        6
     119: iload         6
     121: iload         4
     123: if_icmpge     165
     126: iload         6
     128: istore        7
     130: aload         5
     132: iload         7
     134: istore        8
     136: astore        14
     138: iconst_0
     139: istore        9
     141: new           #18                 // class java/util/ArrayList
     144: dup
     145: invokespecial #32                 // Method java/util/ArrayList."<init>":()V
     148: checkcast     #31                 // class java/util/List
     151: nop
     152: aload         14
     154: swap
     155: invokevirtual #29                 // Method java/util/ArrayList.add:(Ljava/lang/Object;)Z
     158: pop
     159: iinc          6, 1
     162: goto          119
     165: aload         5
     167: checkcast     #31                 // class java/util/List
     170: astore_3
     171: iconst_1
     172: istore        4
     174: iload         4
     176: iload_0
     177: if_icmpgt     211
     180: aload_1
     181: iconst_0
     182: invokeinterface #36,  2           // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     187: checkcast     #23                 // class java/util/TreeSet
     190: iload         4
     192: invokestatic  #42                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     195: invokevirtual #43                 // Method java/util/TreeSet.add:(Ljava/lang/Object;)Z
     198: pop
     199: iload         4
     201: iload_0
     202: if_icmpeq     211
     205: iinc          4, 1
     208: goto          180
     211: iconst_1
     212: istore        4
     214: iload         4
     216: iload_0
     217: if_icmpgt     345
     220: iconst_2
     221: iload         4
     223: imul
     224: istore        5
     226: iload         4
     228: ifgt          264
     231: new           #45                 // class java/lang/IllegalArgumentException
     234: dup
     235: new           #47                 // class java/lang/StringBuilder
     238: dup
     239: invokespecial #48                 // Method java/lang/StringBuilder."<init>":()V
     242: ldc           #50                 // String Step must be positive, was:
     244: invokevirtual #54                 // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
     247: iload         4
     249: invokevirtual #57                 // Method java/lang/StringBuilder.append:(I)Ljava/lang/StringBuilder;
     252: bipush        46
     254: invokevirtual #60                 // Method java/lang/StringBuilder.append:(C)Ljava/lang/StringBuilder;
     257: invokevirtual #64                 // Method java/lang/StringBuilder.toString:()Ljava/lang/String;
     260: invokespecial #67                 // Method java/lang/IllegalArgumentException."<init>":(Ljava/lang/String;)V
     263: athrow
     264: iload         5
     266: istore        6
     268: iload         5
     270: iload_0
     271: iload         4
     273: invokestatic  #73                 // Method kotlin/internal/ProgressionUtilKt.getProgressionLastElement:(III)I
     276: istore        7
     278: iload         6
     280: iload         7
     282: if_icmpgt     333
     285: aload_1
     286: iload_0
     287: aload_2
     288: iload         6
     290: iconst_1
     291: invokestatic  #77                 // Method solve$change:(Ljava/util/List;I[III)V
     294: aload_3
     295: iload         6
     297: invokeinterface #36,  2           // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     302: checkcast     #31                 // class java/util/List
     305: iload         4
     307: invokestatic  #42                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     310: invokeinterface #78,  2           // InterfaceMethod java/util/List.add:(Ljava/lang/Object;)Z
     315: pop
     316: iload         6
     318: iload         7
     320: if_icmpeq     333
     323: iload         6
     325: iload         4
     327: iadd
     328: istore        6
     330: goto          285
     333: iload         4
     335: iload_0
     336: if_icmpeq     345
     339: iinc          4, 1
     342: goto          220
     345: iconst_1
     346: anewarray     #38                 // class java/lang/Integer
     349: astore        5
     351: aload         5
     353: iconst_0
     354: iconst_0
     355: invokestatic  #42                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     358: aastore
     359: aload         5
     361: invokestatic  #84                 // Method kotlin/collections/CollectionsKt.mutableListOf:([Ljava/lang/Object;)Ljava/util/List;
     364: astore        4
     366: aload_1
     367: invokestatic  #88                 // Method kotlin/collections/CollectionsKt.getLastIndex:(Ljava/util/List;)I
     370: istore        5
     372: iconst_1
     373: istore        6
     375: iload         6
     377: iload_0
     378: if_icmpgt     590
     381: aload_1
     382: iload         5
     384: invokeinterface #36,  2           // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     389: checkcast     #23                 // class java/util/TreeSet
     392: invokevirtual #92                 // Method java/util/TreeSet.isEmpty:()Z
     395: ifeq          404
     398: iinc          5, -1
     401: goto          381
     404: iload         5
     406: iload_0
     407: isub
     408: istore        7
     410: aload_1
     411: iload         5
     413: invokeinterface #36,  2           // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     418: checkcast     #23                 // class java/util/TreeSet
     421: invokevirtual #96                 // Method java/util/TreeSet.last:()Ljava/lang/Object;
     424: checkcast     #38                 // class java/lang/Integer
     427: astore        8
     429: aload_1
     430: iload_0
     431: aload_2
     432: aload         8
     434: invokestatic  #102                // Method kotlin/jvm/internal/Intrinsics.checkNotNull:(Ljava/lang/Object;)V
     437: aload         8
     439: invokevirtual #105                // Method java/lang/Integer.intValue:()I
     442: invokestatic  #109                // Method solve$remove:(Ljava/util/List;I[II)V
     445: iconst_2
     446: aload         8
     448: invokevirtual #105                // Method java/lang/Integer.intValue:()I
     451: imul
     452: istore        9
     454: aload         8
     456: invokevirtual #105                // Method java/lang/Integer.intValue:()I
     459: istore        10
     461: iload         10
     463: ifgt          499
     466: new           #45                 // class java/lang/IllegalArgumentException
     469: dup
     470: new           #47                 // class java/lang/StringBuilder
     473: dup
     474: invokespecial #48                 // Method java/lang/StringBuilder."<init>":()V
     477: ldc           #50                 // String Step must be positive, was:
     479: invokevirtual #54                 // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
     482: iload         10
     484: invokevirtual #57                 // Method java/lang/StringBuilder.append:(I)Ljava/lang/StringBuilder;
     487: bipush        46
     489: invokevirtual #60                 // Method java/lang/StringBuilder.append:(C)Ljava/lang/StringBuilder;
     492: invokevirtual #64                 // Method java/lang/StringBuilder.toString:()Ljava/lang/String;
     495: invokespecial #67                 // Method java/lang/IllegalArgumentException."<init>":(Ljava/lang/String;)V
     498: athrow
     499: iload         9
     501: istore        11
     503: iload         9
     505: iload_0
     506: iload         10
     508: invokestatic  #73                 // Method kotlin/internal/ProgressionUtilKt.getProgressionLastElement:(III)I
     511: istore        12
     513: iload         10
     515: istore        13
     517: iload         11
     519: iload         12
     521: if_icmpgt     553
     524: aload_2
     525: iload         11
     527: iaload
     528: iconst_m1
     529: if_icmpne     536
     532: iinc          7, -1
     535: nop
     536: iload         11
     538: iload         12
     540: if_icmpeq     553
     543: iload         11
     545: iload         13
     547: iadd
     548: istore        11
     550: goto          524
     553: aload         4
     555: aload         4
     557: invokestatic  #112                // Method kotlin/collections/CollectionsKt.last:(Ljava/util/List;)Ljava/lang/Object;
     560: checkcast     #114                // class java/lang/Number
     563: invokevirtual #115                // Method java/lang/Number.intValue:()I
     566: iload         7
     568: iadd
     569: invokestatic  #42                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     572: invokeinterface #78,  2           // InterfaceMethod java/util/List.add:(Ljava/lang/Object;)Z
     577: pop
     578: iload         6
     580: iload_0
     581: if_icmpeq     590
     584: iinc          6, 1
     587: goto          381
     590: iload_0
     591: invokestatic  #119                // Method researchFullSearch:(I)[I
     594: astore        6
     596: aload         6
     598: aload         4
     600: checkcast     #121                // class java/util/Collection
     603: invokestatic  #125                // Method kotlin/collections/CollectionsKt.toIntArray:(Ljava/util/Collection;)[I
     606: invokestatic  #131                // Method java/util/Arrays.equals:([I[I)Z
     609: ifne          753
     612: new           #47                 // class java/lang/StringBuilder
     615: dup
     616: invokespecial #48                 // Method java/lang/StringBuilder."<init>":()V
     619: ldc           #133                // String !
     621: invokevirtual #54                 // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
     624: iload_0
     625: invokevirtual #57                 // Method java/lang/StringBuilder.append:(I)Ljava/lang/StringBuilder;
     628: invokevirtual #64                 // Method java/lang/StringBuilder.toString:()Ljava/lang/String;
     631: getstatic     #139                // Field java/lang/System.out:Ljava/io/PrintStream;
     634: swap
     635: invokevirtual #144                // Method java/io/PrintStream.println:(Ljava/lang/Object;)V
     638: aload         4
     640: checkcast     #146                // class java/lang/Iterable
     643: iconst_1
     644: invokestatic  #150                // Method kotlin/collections/CollectionsKt.drop:(Ljava/lang/Iterable;I)Ljava/util/List;
     647: checkcast     #146                // class java/lang/Iterable
     650: ldc           #152                // String
     652: checkcast     #154                // class java/lang/CharSequence
     655: aconst_null
     656: aconst_null
     657: iconst_0
     658: aconst_null
     659: aconst_null
     660: bipush        62
     662: aconst_null
     663: invokestatic  #158                // 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;
     666: getstatic     #139                // Field java/lang/System.out:Ljava/io/PrintStream;
     669: swap
     670: invokevirtual #144                // Method java/io/PrintStream.println:(Ljava/lang/Object;)V
     673: aload         6
     675: iconst_1
     676: invokestatic  #163                // Method kotlin/collections/ArraysKt.drop:([II)Ljava/util/List;
     679: checkcast     #146                // class java/lang/Iterable
     682: ldc           #152                // String
     684: checkcast     #154                // class java/lang/CharSequence
     687: aconst_null
     688: aconst_null
     689: iconst_0
     690: aconst_null
     691: aconst_null
     692: bipush        62
     694: aconst_null
     695: invokestatic  #158                // 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;
     698: getstatic     #139                // Field java/lang/System.out:Ljava/io/PrintStream;
     701: swap
     702: invokevirtual #144                // Method java/io/PrintStream.println:(Ljava/lang/Object;)V
     705: iload_0
     706: invokestatic  #166                // Method researchStupid:(I)[I
     709: iconst_1
     710: invokestatic  #163                // Method kotlin/collections/ArraysKt.drop:([II)Ljava/util/List;
     713: checkcast     #146                // class java/lang/Iterable
     716: ldc           #152                // String
     718: checkcast     #154                // class java/lang/CharSequence
     721: aconst_null
     722: aconst_null
     723: iconst_0
     724: aconst_null
     725: aconst_null
     726: bipush        62
     728: aconst_null
     729: invokestatic  #158                // 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;
     732: getstatic     #139                // Field java/lang/System.out:Ljava/io/PrintStream;
     735: swap
     736: invokevirtual #144                // Method java/io/PrintStream.println:(Ljava/lang/Object;)V
     739: iconst_0
     740: invokestatic  #169                // Method java/lang/System.exit:(I)V
     743: new           #171                // class java/lang/RuntimeException
     746: dup
     747: ldc           #173                // String System.exit returned normally, while it was supposed to halt JVM.
     749: invokespecial #174                // Method java/lang/RuntimeException."<init>":(Ljava/lang/String;)V
     752: athrow
     753: aload         4
     755: checkcast     #146                // class java/lang/Iterable
     758: iconst_1
     759: invokestatic  #150                // Method kotlin/collections/CollectionsKt.drop:(Ljava/lang/Iterable;I)Ljava/util/List;
     762: checkcast     #146                // class java/lang/Iterable
     765: ldc           #152                // String
     767: checkcast     #154                // class java/lang/CharSequence
     770: aconst_null
     771: aconst_null
     772: iconst_0
     773: aconst_null
     774: aconst_null
     775: bipush        62
     777: aconst_null
     778: invokestatic  #158                // 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;
     781: getstatic     #139                // Field java/lang/System.out:Ljava/io/PrintStream;
     784: swap
     785: invokevirtual #144                // Method java/io/PrintStream.println:(Ljava/lang/Object;)V
     788: return

  private static final int[] researchFullSearch(int);
    Code:
       0: iconst_0
       1: istore_2
       2: iload_0
       3: iconst_1
       4: iadd
       5: istore_3
       6: iload_3
       7: newarray       int
       9: astore        4
      11: iload_2
      12: iload_3
      13: if_icmpge     31
      16: iload_2
      17: istore        5
      19: aload         4
      21: iload         5
      23: iconst_0
      24: iastore
      25: iinc          2, 1
      28: goto          11
      31: aload         4
      33: astore_1
      34: iconst_0
      35: istore_2
      36: iconst_1
      37: iload_0
      38: ishl
      39: istore_3
      40: iload_2
      41: iload_3
      42: if_icmpge     182
      45: iconst_0
      46: istore        4
      48: iconst_0
      49: istore        5
      51: iload         5
      53: iload_0
      54: if_icmpge     111
      57: iload_2
      58: iload         5
      60: invokestatic  #196                // Method hasBit:(II)Z
      63: ifeq          105
      66: iconst_0
      67: istore        6
      69: iload         6
      71: iload_0
      72: if_icmpge     105
      75: iload_2
      76: iload         6
      78: invokestatic  #196                // Method hasBit:(II)Z
      81: ifne          99
      84: iload         5
      86: iconst_1
      87: iadd
      88: iload         6
      90: iconst_1
      91: iadd
      92: irem
      93: ifne          99
      96: iinc          4, 1
      99: iinc          6, 1
     102: goto          69
     105: iinc          5, 1
     108: goto          51
     111: iload         4
     113: bipush        17
     115: if_icmplt     157
     118: getstatic     #139                // Field java/lang/System.out:Ljava/io/PrintStream;
     121: iload         4
     123: invokevirtual #198                // Method java/io/PrintStream.println:(I)V
     126: getstatic     #139                // Field java/lang/System.out:Ljava/io/PrintStream;
     129: iload_0
     130: invokevirtual #198                // Method java/io/PrintStream.println:(I)V
     133: iload_2
     134: iconst_2
     135: invokestatic  #204                // Method kotlin/text/CharsKt.checkRadix:(I)I
     138: invokestatic  #207                // Method java/lang/Integer.toString:(II)Ljava/lang/String;
     141: dup
     142: ldc           #209                // String toString(...)
     144: invokestatic  #213                // Method kotlin/jvm/internal/Intrinsics.checkNotNullExpressionValue:(Ljava/lang/Object;Ljava/lang/String;)V
     147: astore        5
     149: getstatic     #139                // Field java/lang/System.out:Ljava/io/PrintStream;
     152: aload         5
     154: invokevirtual #144                // Method java/io/PrintStream.println:(Ljava/lang/Object;)V
     157: iload_2
     158: invokestatic  #216                // Method java/lang/Integer.bitCount:(I)I
     161: istore        5
     163: aload_1
     164: iload         5
     166: aload_1
     167: iload         5
     169: iaload
     170: iload         4
     172: invokestatic  #222                // Method java/lang/Math.max:(II)I
     175: iastore
     176: iinc          2, 1
     179: goto          40
     182: aload_1
     183: areturn

  private static final int[] researchStupid(int);
    Code:
       0: iconst_0
       1: istore_2
       2: iload_0
       3: iconst_1
       4: iadd
       5: istore_3
       6: iload_3
       7: newarray       int
       9: astore        4
      11: iload_2
      12: iload_3
      13: if_icmpge     107
      16: iload_2
      17: istore        5
      19: aload         4
      21: iload         5
      23: iload_0
      24: iload         5
      26: isub
      27: istore        6
      29: iconst_0
      30: istore        7
      32: iload         6
      34: iconst_1
      35: iadd
      36: istore        8
      38: iload         8
      40: iload_0
      41: if_icmpgt     98
      44: istore        11
      46: astore        10
      48: iconst_1
      49: istore        9
      51: iload         9
      53: iload         6
      55: if_icmpgt     82
      58: iload         8
      60: iload         9
      62: irem
      63: ifne          69
      66: iinc          7, 1
      69: iload         9
      71: iload         6
      73: if_icmpeq     82
      76: iinc          9, 1
      79: goto          58
      82: iload         8
      84: iload_0
      85: if_icmpeq     94
      88: iinc          8, 1
      91: goto          48
      94: aload         10
      96: iload         11
      98: iload         7
     100: iastore
     101: iinc          2, 1
     104: goto          11
     107: aload         4
     109: astore_1
     110: aload_1
     111: areturn

  private static final java.lang.String readLn();
    Code:
       0: invokestatic  #232                // Method kotlin/io/ConsoleKt.readLine:()Ljava/lang/String;
       3: dup
       4: invokestatic  #102                // Method kotlin/jvm/internal/Intrinsics.checkNotNull:(Ljava/lang/Object;)V
       7: areturn

  private static final int readInt();
    Code:
       0: invokestatic  #234                // Method readLn:()Ljava/lang/String;
       3: invokestatic  #238                // Method java/lang/Integer.parseInt:(Ljava/lang/String;)I
       6: ireturn

  private static final int bit(int, int);
    Code:
       0: iload_0
       1: iload_1
       2: ishr
       3: iconst_1
       4: iand
       5: ireturn

  private static final boolean hasBit(int, int);
    Code:
       0: iload_0
       1: iload_1
       2: invokestatic  #243                // Method bit:(II)I
       5: ifeq          12
       8: iconst_1
       9: goto          13
      12: iconst_0
      13: ireturn

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

  private static final void solve$change(java.util.List<? extends java.util.TreeSet<java.lang.Integer>>, int, int[], int, int);
    Code:
       0: aload_0
       1: iload_1
       2: aload_2
       3: iload_3
       4: iaload
       5: iadd
       6: invokeinterface #36,  2           // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
      11: checkcast     #23                 // class java/util/TreeSet
      14: iload_3
      15: invokestatic  #42                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
      18: invokevirtual #253                // Method java/util/TreeSet.remove:(Ljava/lang/Object;)Z
      21: pop
      22: aload_2
      23: iload_3
      24: aload_2
      25: iload_3
      26: iaload
      27: iload         4
      29: iadd
      30: iastore
      31: aload_0
      32: iload_1
      33: aload_2
      34: iload_3
      35: iaload
      36: iadd
      37: invokeinterface #36,  2           // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
      42: checkcast     #23                 // class java/util/TreeSet
      45: iload_3
      46: invokestatic  #42                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
      49: invokevirtual #43                 // Method java/util/TreeSet.add:(Ljava/lang/Object;)Z
      52: pop
      53: return

  private static final void solve$remove(java.util.List<? extends java.util.TreeSet<java.lang.Integer>>, int, int[], int);
    Code:
       0: aload_0
       1: iload_1
       2: aload_2
       3: iload_3
       4: iaload
       5: iadd
       6: invokeinterface #36,  2           // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
      11: checkcast     #23                 // class java/util/TreeSet
      14: iload_3
      15: invokestatic  #42                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
      18: invokevirtual #253                // Method java/util/TreeSet.remove:(Ljava/lang/Object;)Z
      21: pop
      22: aload_2
      23: iload_3
      24: iconst_m1
      25: iastore
      26: return
}


package codeforces.kotlinheroes6

private fun solve() {
	readLn()
	val a = readInts()
	val st = SegmentsTreeMax(a.size)
	val seen = IntArray(a.size + 1) { -1 }
	for (i in a.indices) {
		val x = a[i]
		val prev = seen[x]
		if (prev == -1) {
			seen[x] = i
			continue
		}
		val best = maxOf(st.get(prev, i), if (prev + 1 == i) 0 else 1)
		st.set(prev, best + 2)
	}
	println(maxOf(st.get(0, a.size), 1))
}

fun main() = repeat(readInt()) { solve() }

private class SegmentsTreeMax(size: Int) {
	val two: Int
	val a: Array<Int>

	init {
		var t = 1
		while (t < size) {
			t *= 2
		}
		two = t
		a = Array<Int>(2 * two, {_ -> 0})
	}

	fun get(from: Int, to: Int): Int {
		var res = Integer.MIN_VALUE
		var x = two + from
		var y = two + to
		while (x < y) {
			if (x % 2 == 1) {
				res = Math.max(res, a[x])
				x++
			}
			if (y % 2 == 1) {
				y--
				res = Math.max(res, a[y])
			}
			x /= 2
			y /= 2
		}
		return res
	}

	fun set(pos: Int, v: Int) {
		var x = two + pos
		a[x] = v
		while (x >= 2) {
			x /= 2
			a[x] = Math.max(a[2 * x], a[2 * x + 1])
		}
	}
}

private fun readLn() = readLine()!!
private fun readInt() = readLn().toInt()
private fun readStrings() = readLn().split(" ")
private fun readInts() = readStrings().map { it.toInt() }

Compiled from "e.kt"
public final class codeforces.kotlinheroes6.EKt {
  private static final void solve();
    Code:
       0: invokestatic  #10                 // Method readLn:()Ljava/lang/String;
       3: pop
       4: invokestatic  #14                 // Method readInts:()Ljava/util/List;
       7: astore_0
       8: new           #16                 // class codeforces/kotlinheroes6/SegmentsTreeMax
      11: dup
      12: aload_0
      13: invokeinterface #22,  1           // InterfaceMethod java/util/List.size:()I
      18: invokespecial #26                 // Method codeforces/kotlinheroes6/SegmentsTreeMax."<init>":(I)V
      21: astore_1
      22: iconst_0
      23: istore_3
      24: aload_0
      25: invokeinterface #22,  1           // InterfaceMethod java/util/List.size:()I
      30: iconst_1
      31: iadd
      32: istore        4
      34: iload         4
      36: newarray       int
      38: astore        5
      40: iload_3
      41: iload         4
      43: if_icmpge     61
      46: iload_3
      47: istore        6
      49: aload         5
      51: iload         6
      53: iconst_m1
      54: iastore
      55: iinc          3, 1
      58: goto          40
      61: aload         5
      63: astore_2
      64: iconst_0
      65: istore_3
      66: aload_0
      67: checkcast     #28                 // class java/util/Collection
      70: invokeinterface #29,  1           // InterfaceMethod java/util/Collection.size:()I
      75: istore        4
      77: iload_3
      78: iload         4
      80: if_icmpge     159
      83: aload_0
      84: iload_3
      85: invokeinterface #33,  2           // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
      90: checkcast     #35                 // class java/lang/Number
      93: invokevirtual #38                 // Method java/lang/Number.intValue:()I
      96: istore        5
      98: aload_2
      99: iload         5
     101: iaload
     102: istore        6
     104: iload         6
     106: iconst_m1
     107: if_icmpne     118
     110: aload_2
     111: iload         5
     113: iload_3
     114: iastore
     115: goto          153
     118: aload_1
     119: iload         6
     121: iload_3
     122: invokevirtual #41                 // Method codeforces/kotlinheroes6/SegmentsTreeMax.get:(II)I
     125: iload         6
     127: iconst_1
     128: iadd
     129: iload_3
     130: if_icmpne     137
     133: iconst_0
     134: goto          138
     137: iconst_1
     138: invokestatic  #46                 // Method java/lang/Math.max:(II)I
     141: istore        7
     143: aload_1
     144: iload         6
     146: iload         7
     148: iconst_2
     149: iadd
     150: invokevirtual #50                 // Method codeforces/kotlinheroes6/SegmentsTreeMax.set:(II)V
     153: iinc          3, 1
     156: goto          77
     159: aload_1
     160: iconst_0
     161: aload_0
     162: invokeinterface #22,  1           // InterfaceMethod java/util/List.size:()I
     167: invokevirtual #41                 // Method codeforces/kotlinheroes6/SegmentsTreeMax.get:(II)I
     170: iconst_1
     171: invokestatic  #46                 // Method java/lang/Math.max:(II)I
     174: istore_3
     175: getstatic     #56                 // Field java/lang/System.out:Ljava/io/PrintStream;
     178: iload_3
     179: invokevirtual #61                 // Method java/io/PrintStream.println:(I)V
     182: return

  public static final void main();
    Code:
       0: invokestatic  #77                 // Method readInt:()I
       3: istore_0
       4: iconst_0
       5: istore_1
       6: iload_1
       7: iload_0
       8: if_icmpge     24
      11: iload_1
      12: istore_2
      13: iconst_0
      14: istore_3
      15: invokestatic  #79                 // Method solve:()V
      18: iinc          1, 1
      21: goto          6
      24: return

  private static final java.lang.String readLn();
    Code:
       0: invokestatic  #86                 // Method kotlin/io/ConsoleKt.readLine:()Ljava/lang/String;
       3: dup
       4: invokestatic  #92                 // Method kotlin/jvm/internal/Intrinsics.checkNotNull:(Ljava/lang/Object;)V
       7: areturn

  private static final int readInt();
    Code:
       0: invokestatic  #10                 // Method readLn:()Ljava/lang/String;
       3: invokestatic  #98                 // Method java/lang/Integer.parseInt:(Ljava/lang/String;)I
       6: ireturn

  private static final java.util.List<java.lang.String> readStrings();
    Code:
       0: invokestatic  #10                 // Method readLn:()Ljava/lang/String;
       3: checkcast     #102                // class java/lang/CharSequence
       6: iconst_1
       7: anewarray     #104                // class java/lang/String
      10: astore_0
      11: aload_0
      12: iconst_0
      13: ldc           #106                // String
      15: aastore
      16: aload_0
      17: iconst_0
      18: iconst_0
      19: bipush        6
      21: aconst_null
      22: invokestatic  #112                // Method kotlin/text/StringsKt.split$default:(Ljava/lang/CharSequence;[Ljava/lang/String;ZIILjava/lang/Object;)Ljava/util/List;
      25: areturn

  private static final java.util.List<java.lang.Integer> readInts();
    Code:
       0: invokestatic  #115                // Method readStrings:()Ljava/util/List;
       3: checkcast     #117                // class java/lang/Iterable
       6: astore_0
       7: iconst_0
       8: istore_1
       9: aload_0
      10: astore_2
      11: new           #119                // class java/util/ArrayList
      14: dup
      15: aload_0
      16: bipush        10
      18: invokestatic  #125                // Method kotlin/collections/CollectionsKt.collectionSizeOrDefault:(Ljava/lang/Iterable;I)I
      21: invokespecial #126                // Method java/util/ArrayList."<init>":(I)V
      24: checkcast     #28                 // class java/util/Collection
      27: astore_3
      28: iconst_0
      29: istore        4
      31: aload_2
      32: invokeinterface #130,  1          // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
      37: astore        5
      39: aload         5
      41: invokeinterface #136,  1          // InterfaceMethod java/util/Iterator.hasNext:()Z
      46: ifeq          92
      49: aload         5
      51: invokeinterface #140,  1          // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
      56: astore        6
      58: aload_3
      59: aload         6
      61: checkcast     #104                // class java/lang/String
      64: astore        7
      66: astore        9
      68: iconst_0
      69: istore        8
      71: aload         7
      73: invokestatic  #98                 // Method java/lang/Integer.parseInt:(Ljava/lang/String;)I
      76: nop
      77: invokestatic  #144                // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
      80: aload         9
      82: swap
      83: invokeinterface #148,  2          // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
      88: pop
      89: goto          39
      92: aload_3
      93: checkcast     #18                 // class java/util/List
      96: nop
      97: areturn

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


package codeforces.round606

import kotlin.math.sqrt

fun main() {
	readLn()
	val a = readInts()
	val groups = a.groupBy { it }.toList().sortedByDescending { it.second.size }
	val b = groups.map { it.second.size }
	var bSelf = b.size
	var bSum = 0
	val (h, w) = (1..sqrt(a.size.toDouble()).toInt()).map { h ->
		while (bSelf > 0 && b[bSelf - 1] <= h) bSum += b[--bSelf]
		h to ((bSelf + bSum / h).takeIf { it >= h } ?: 0)
	}.maxByOrNull { it.first * it.second }!!
	println("${h * w}\n$h $w")
	val f = List(h) { IntArray(w) }
	var x = 0
	for (group in groups) repeat(minOf(group.second.size, h)) {
		f[x % h][(x % h + x / h) % w] = group.first
		if (++x == h * w) return f.forEach { println(it.joinToString(" ")) }
	}
}

private fun readLn() = readLine()!!
private fun readStrings() = readLn().split(" ")
private fun readInts() = readStrings().map { it.toInt() }

Compiled from "c.kt"
public final class codeforces.round606.CKt {
  public static final void main();
    Code:
       0: invokestatic  #10                 // Method readLn:()Ljava/lang/String;
       3: pop
       4: invokestatic  #14                 // Method readInts:()Ljava/util/List;
       7: astore_0
       8: aload_0
       9: checkcast     #16                 // class java/lang/Iterable
      12: astore_2
      13: iconst_0
      14: istore_3
      15: aload_2
      16: astore        4
      18: new           #18                 // class java/util/LinkedHashMap
      21: dup
      22: invokespecial #21                 // Method java/util/LinkedHashMap."<init>":()V
      25: checkcast     #23                 // class java/util/Map
      28: astore        5
      30: iconst_0
      31: istore        6
      33: aload         4
      35: invokeinterface #27,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
      40: astore        7
      42: aload         7
      44: invokeinterface #33,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
      49: ifeq          157
      52: aload         7
      54: invokeinterface #37,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
      59: astore        8
      61: aload         8
      63: checkcast     #39                 // class java/lang/Number
      66: invokevirtual #43                 // Method java/lang/Number.intValue:()I
      69: istore        9
      71: iconst_0
      72: istore        10
      74: iload         9
      76: invokestatic  #49                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
      79: astore        11
      81: aload         5
      83: astore        12
      85: iconst_0
      86: istore        13
      88: aload         12
      90: aload         11
      92: invokeinterface #53,  2           // InterfaceMethod java/util/Map.get:(Ljava/lang/Object;)Ljava/lang/Object;
      97: astore        14
      99: aload         14
     101: ifnonnull     136
     104: iconst_0
     105: istore        15
     107: new           #55                 // class java/util/ArrayList
     110: dup
     111: invokespecial #56                 // Method java/util/ArrayList."<init>":()V
     114: checkcast     #58                 // class java/util/List
     117: astore        15
     119: aload         12
     121: aload         11
     123: aload         15
     125: invokeinterface #62,  3           // InterfaceMethod java/util/Map.put:(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
     130: pop
     131: aload         15
     133: goto          138
     136: aload         14
     138: nop
     139: checkcast     #58                 // class java/util/List
     142: astore        9
     144: aload         9
     146: aload         8
     148: invokeinterface #66,  2           // InterfaceMethod java/util/List.add:(Ljava/lang/Object;)Z
     153: pop
     154: goto          42
     157: aload         5
     159: nop
     160: invokestatic  #72                 // Method kotlin/collections/MapsKt.toList:(Ljava/util/Map;)Ljava/util/List;
     163: checkcast     #16                 // class java/lang/Iterable
     166: astore_2
     167: iconst_0
     168: istore_3
     169: aload_2
     170: new           #74                 // class codeforces/round606/CKt$main$$inlined$sortedByDescending$1
     173: dup
     174: invokespecial #75                 // Method codeforces/round606/CKt$main$$inlined$sortedByDescending$1."<init>":()V
     177: checkcast     #77                 // class java/util/Comparator
     180: invokestatic  #83                 // Method kotlin/collections/CollectionsKt.sortedWith:(Ljava/lang/Iterable;Ljava/util/Comparator;)Ljava/util/List;
     183: astore_1
     184: aload_1
     185: checkcast     #16                 // class java/lang/Iterable
     188: astore_3
     189: iconst_0
     190: istore        4
     192: aload_3
     193: astore        5
     195: new           #55                 // class java/util/ArrayList
     198: dup
     199: aload_3
     200: bipush        10
     202: invokestatic  #87                 // Method kotlin/collections/CollectionsKt.collectionSizeOrDefault:(Ljava/lang/Iterable;I)I
     205: invokespecial #90                 // Method java/util/ArrayList."<init>":(I)V
     208: checkcast     #92                 // class java/util/Collection
     211: astore        6
     213: iconst_0
     214: istore        7
     216: aload         5
     218: invokeinterface #27,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     223: astore        8
     225: aload         8
     227: invokeinterface #33,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     232: ifeq          286
     235: aload         8
     237: invokeinterface #37,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     242: astore        9
     244: aload         6
     246: aload         9
     248: checkcast     #94                 // class kotlin/Pair
     251: astore        10
     253: astore        22
     255: iconst_0
     256: istore        11
     258: aload         10
     260: invokevirtual #97                 // Method kotlin/Pair.getSecond:()Ljava/lang/Object;
     263: checkcast     #58                 // class java/util/List
     266: invokeinterface #100,  1          // InterfaceMethod java/util/List.size:()I
     271: invokestatic  #49                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     274: aload         22
     276: swap
     277: invokeinterface #101,  2          // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     282: pop
     283: goto          225
     286: aload         6
     288: checkcast     #58                 // class java/util/List
     291: nop
     292: astore_2
     293: iconst_0
     294: istore_3
     295: aload_2
     296: invokeinterface #100,  1          // InterfaceMethod java/util/List.size:()I
     301: istore_3
     302: iconst_0
     303: istore        4
     305: new           #103                // class kotlin/ranges/IntRange
     308: dup
     309: iconst_1
     310: aload_0
     311: invokeinterface #100,  1          // InterfaceMethod java/util/List.size:()I
     316: i2d
     317: invokestatic  #109                // Method java/lang/Math.sqrt:(D)D
     320: d2i
     321: invokespecial #112                // Method kotlin/ranges/IntRange."<init>":(II)V
     324: checkcast     #16                 // class java/lang/Iterable
     327: astore        6
     329: iconst_0
     330: istore        7
     332: aload         6
     334: astore        8
     336: new           #55                 // class java/util/ArrayList
     339: dup
     340: aload         6
     342: bipush        10
     344: invokestatic  #87                 // Method kotlin/collections/CollectionsKt.collectionSizeOrDefault:(Ljava/lang/Iterable;I)I
     347: invokespecial #90                 // Method java/util/ArrayList."<init>":(I)V
     350: checkcast     #92                 // class java/util/Collection
     353: astore        9
     355: iconst_0
     356: istore        10
     358: aload         8
     360: invokeinterface #27,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     365: astore        11
     367: aload         11
     369: invokeinterface #33,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     374: ifeq          539
     377: aload         11
     379: checkcast     #114                // class kotlin/collections/IntIterator
     382: invokevirtual #117                // Method kotlin/collections/IntIterator.nextInt:()I
     385: istore        12
     387: aload         9
     389: iload         12
     391: istore        13
     393: astore        22
     395: iconst_0
     396: istore        14
     398: iload_3
     399: ifle          447
     402: aload_2
     403: iload_3
     404: iconst_1
     405: isub
     406: invokeinterface #120,  2          // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     411: checkcast     #39                 // class java/lang/Number
     414: invokevirtual #43                 // Method java/lang/Number.intValue:()I
     417: iload         13
     419: if_icmpgt     447
     422: iload         4
     424: aload_2
     425: iload_3
     426: iconst_m1
     427: iadd
     428: istore_3
     429: iload_3
     430: invokeinterface #120,  2          // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     435: checkcast     #39                 // class java/lang/Number
     438: invokevirtual #43                 // Method java/lang/Number.intValue:()I
     441: iadd
     442: istore        4
     444: goto          398
     447: iload         13
     449: invokestatic  #49                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     452: iload_3
     453: iload         4
     455: iload         13
     457: idiv
     458: iadd
     459: invokestatic  #49                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     462: astore        15
     464: aload         15
     466: checkcast     #39                 // class java/lang/Number
     469: invokevirtual #43                 // Method java/lang/Number.intValue:()I
     472: istore        16
     474: astore        17
     476: iconst_0
     477: istore        18
     479: iload         16
     481: iload         13
     483: if_icmplt     490
     486: iconst_1
     487: goto          491
     490: iconst_0
     491: invokestatic  #125                // Method java/lang/Boolean.valueOf:(Z)Ljava/lang/Boolean;
     494: aload         17
     496: swap
     497: invokevirtual #128                // Method java/lang/Boolean.booleanValue:()Z
     500: ifeq          508
     503: aload         15
     505: goto          509
     508: aconst_null
     509: dup
     510: ifnull        519
     513: invokevirtual #129                // Method java/lang/Integer.intValue:()I
     516: goto          521
     519: pop
     520: iconst_0
     521: invokestatic  #49                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     524: invokestatic  #135                // Method kotlin/TuplesKt.to:(Ljava/lang/Object;Ljava/lang/Object;)Lkotlin/Pair;
     527: aload         22
     529: swap
     530: invokeinterface #101,  2          // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     535: pop
     536: goto          367
     539: aload         9
     541: checkcast     #58                 // class java/util/List
     544: nop
     545: checkcast     #16                 // class java/lang/Iterable
     548: astore        6
     550: nop
     551: iconst_0
     552: istore        7
     554: aload         6
     556: invokeinterface #27,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     561: astore        8
     563: aload         8
     565: invokeinterface #33,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     570: ifne          577
     573: aconst_null
     574: goto          707
     577: aload         8
     579: invokeinterface #37,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     584: astore        9
     586: aload         8
     588: invokeinterface #33,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     593: ifne          601
     596: aload         9
     598: goto          707
     601: aload         9
     603: checkcast     #94                 // class kotlin/Pair
     606: astore        10
     608: iconst_0
     609: istore        11
     611: aload         10
     613: invokevirtual #138                // Method kotlin/Pair.getFirst:()Ljava/lang/Object;
     616: checkcast     #39                 // class java/lang/Number
     619: invokevirtual #43                 // Method java/lang/Number.intValue:()I
     622: aload         10
     624: invokevirtual #97                 // Method kotlin/Pair.getSecond:()Ljava/lang/Object;
     627: checkcast     #39                 // class java/lang/Number
     630: invokevirtual #43                 // Method java/lang/Number.intValue:()I
     633: imul
     634: istore        10
     636: aload         8
     638: invokeinterface #37,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     643: astore        11
     645: aload         11
     647: checkcast     #94                 // class kotlin/Pair
     650: astore        12
     652: iconst_0
     653: istore        13
     655: aload         12
     657: invokevirtual #138                // Method kotlin/Pair.getFirst:()Ljava/lang/Object;
     660: checkcast     #39                 // class java/lang/Number
     663: invokevirtual #43                 // Method java/lang/Number.intValue:()I
     666: aload         12
     668: invokevirtual #97                 // Method kotlin/Pair.getSecond:()Ljava/lang/Object;
     671: checkcast     #39                 // class java/lang/Number
     674: invokevirtual #43                 // Method java/lang/Number.intValue:()I
     677: imul
     678: istore        12
     680: iload         10
     682: iload         12
     684: if_icmpge     695
     687: aload         11
     689: astore        9
     691: iload         12
     693: istore        10
     695: aload         8
     697: invokeinterface #33,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     702: ifne          636
     705: aload         9
     707: dup
     708: invokestatic  #144                // Method kotlin/jvm/internal/Intrinsics.checkNotNull:(Ljava/lang/Object;)V
     711: checkcast     #94                 // class kotlin/Pair
     714: astore        5
     716: aload         5
     718: invokevirtual #147                // Method kotlin/Pair.component1:()Ljava/lang/Object;
     721: checkcast     #39                 // class java/lang/Number
     724: invokevirtual #43                 // Method java/lang/Number.intValue:()I
     727: istore        6
     729: aload         5
     731: invokevirtual #150                // Method kotlin/Pair.component2:()Ljava/lang/Object;
     734: checkcast     #39                 // class java/lang/Number
     737: invokevirtual #43                 // Method java/lang/Number.intValue:()I
     740: istore        7
     742: new           #152                // class java/lang/StringBuilder
     745: dup
     746: invokespecial #153                // Method java/lang/StringBuilder."<init>":()V
     749: iload         6
     751: iload         7
     753: imul
     754: invokevirtual #157                // Method java/lang/StringBuilder.append:(I)Ljava/lang/StringBuilder;
     757: bipush        10
     759: invokevirtual #160                // Method java/lang/StringBuilder.append:(C)Ljava/lang/StringBuilder;
     762: iload         6
     764: invokevirtual #157                // Method java/lang/StringBuilder.append:(I)Ljava/lang/StringBuilder;
     767: bipush        32
     769: invokevirtual #160                // Method java/lang/StringBuilder.append:(C)Ljava/lang/StringBuilder;
     772: iload         7
     774: invokevirtual #157                // Method java/lang/StringBuilder.append:(I)Ljava/lang/StringBuilder;
     777: invokevirtual #163                // Method java/lang/StringBuilder.toString:()Ljava/lang/String;
     780: getstatic     #169                // Field java/lang/System.out:Ljava/io/PrintStream;
     783: swap
     784: invokevirtual #174                // Method java/io/PrintStream.println:(Ljava/lang/Object;)V
     787: new           #55                 // class java/util/ArrayList
     790: dup
     791: iload         6
     793: invokespecial #90                 // Method java/util/ArrayList."<init>":(I)V
     796: astore        9
     798: iconst_0
     799: istore        10
     801: iload         10
     803: iload         6
     805: if_icmpge     840
     808: iload         10
     810: istore        11
     812: aload         9
     814: iload         11
     816: istore        12
     818: astore        22
     820: iconst_0
     821: istore        13
     823: iload         7
     825: newarray       int
     827: aload         22
     829: swap
     830: invokevirtual #175                // Method java/util/ArrayList.add:(Ljava/lang/Object;)Z
     833: pop
     834: iinc          10, 1
     837: goto          801
     840: aload         9
     842: checkcast     #58                 // class java/util/List
     845: astore        8
     847: iconst_0
     848: istore        9
     850: aload_1
     851: invokeinterface #176,  1          // InterfaceMethod java/util/List.iterator:()Ljava/util/Iterator;
     856: astore        10
     858: aload         10
     860: invokeinterface #33,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     865: ifeq          1061
     868: aload         10
     870: invokeinterface #37,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     875: checkcast     #94                 // class kotlin/Pair
     878: astore        11
     880: aload         11
     882: invokevirtual #97                 // Method kotlin/Pair.getSecond:()Ljava/lang/Object;
     885: checkcast     #58                 // class java/util/List
     888: invokeinterface #100,  1          // InterfaceMethod java/util/List.size:()I
     893: iload         6
     895: invokestatic  #180                // Method java/lang/Math.min:(II)I
     898: istore        12
     900: iconst_0
     901: istore        13
     903: iload         13
     905: iload         12
     907: if_icmpge     858
     910: iload         13
     912: istore        14
     914: iconst_0
     915: istore        15
     917: aload         8
     919: iload         9
     921: iload         6
     923: irem
     924: invokeinterface #120,  2          // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     929: checkcast     #182                // class "[I"
     932: iload         9
     934: iload         6
     936: irem
     937: iload         9
     939: iload         6
     941: idiv
     942: iadd
     943: iload         7
     945: irem
     946: aload         11
     948: invokevirtual #138                // Method kotlin/Pair.getFirst:()Ljava/lang/Object;
     951: checkcast     #39                 // class java/lang/Number
     954: invokevirtual #43                 // Method java/lang/Number.intValue:()I
     957: iastore
     958: iload         9
     960: iconst_1
     961: iadd
     962: istore        9
     964: iload         9
     966: iload         6
     968: iload         7
     970: imul
     971: if_icmpne     1054
     974: aload         8
     976: checkcast     #16                 // class java/lang/Iterable
     979: astore        16
     981: iconst_0
     982: istore        17
     984: aload         16
     986: invokeinterface #27,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     991: astore        18
     993: aload         18
     995: invokeinterface #33,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
    1000: ifeq          1052
    1003: aload         18
    1005: invokeinterface #37,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
    1010: astore        19
    1012: aload         19
    1014: checkcast     #182                // class "[I"
    1017: astore        20
    1019: iconst_0
    1020: istore        21
    1022: aload         20
    1024: ldc           #184                // String
    1026: checkcast     #186                // class java/lang/CharSequence
    1029: aconst_null
    1030: aconst_null
    1031: iconst_0
    1032: aconst_null
    1033: aconst_null
    1034: bipush        62
    1036: aconst_null
    1037: invokestatic  #192                // Method kotlin/collections/ArraysKt.joinToString$default:([ILjava/lang/CharSequence;Ljava/lang/CharSequence;Ljava/lang/CharSequence;ILjava/lang/CharSequence;Lkotlin/jvm/functions/Function1;ILjava/lang/Object;)Ljava/lang/String;
    1040: getstatic     #169                // Field java/lang/System.out:Ljava/io/PrintStream;
    1043: swap
    1044: invokevirtual #174                // Method java/io/PrintStream.println:(Ljava/lang/Object;)V
    1047: nop
    1048: nop
    1049: goto          993
    1052: nop
    1053: return
    1054: nop
    1055: iinc          13, 1
    1058: goto          903
    1061: return

  private static final java.lang.String readLn();
    Code:
       0: invokestatic  #254                // Method kotlin/io/ConsoleKt.readLine:()Ljava/lang/String;
       3: dup
       4: invokestatic  #144                // Method kotlin/jvm/internal/Intrinsics.checkNotNull:(Ljava/lang/Object;)V
       7: areturn

  private static final java.util.List<java.lang.String> readStrings();
    Code:
       0: invokestatic  #10                 // Method readLn:()Ljava/lang/String;
       3: checkcast     #186                // class java/lang/CharSequence
       6: iconst_1
       7: anewarray     #258                // class java/lang/String
      10: astore_0
      11: aload_0
      12: iconst_0
      13: ldc           #184                // String
      15: aastore
      16: aload_0
      17: iconst_0
      18: iconst_0
      19: bipush        6
      21: aconst_null
      22: invokestatic  #264                // Method kotlin/text/StringsKt.split$default:(Ljava/lang/CharSequence;[Ljava/lang/String;ZIILjava/lang/Object;)Ljava/util/List;
      25: areturn

  private static final java.util.List<java.lang.Integer> readInts();
    Code:
       0: invokestatic  #267                // Method readStrings:()Ljava/util/List;
       3: checkcast     #16                 // class java/lang/Iterable
       6: astore_0
       7: iconst_0
       8: istore_1
       9: aload_0
      10: astore_2
      11: new           #55                 // class java/util/ArrayList
      14: dup
      15: aload_0
      16: bipush        10
      18: invokestatic  #87                 // Method kotlin/collections/CollectionsKt.collectionSizeOrDefault:(Ljava/lang/Iterable;I)I
      21: invokespecial #90                 // Method java/util/ArrayList."<init>":(I)V
      24: checkcast     #92                 // class java/util/Collection
      27: astore_3
      28: iconst_0
      29: istore        4
      31: aload_2
      32: invokeinterface #27,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
      37: astore        5
      39: aload         5
      41: invokeinterface #33,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
      46: ifeq          92
      49: aload         5
      51: invokeinterface #37,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
      56: astore        6
      58: aload_3
      59: aload         6
      61: checkcast     #258                // class java/lang/String
      64: astore        7
      66: astore        9
      68: iconst_0
      69: istore        8
      71: aload         7
      73: invokestatic  #271                // Method java/lang/Integer.parseInt:(Ljava/lang/String;)I
      76: nop
      77: invokestatic  #49                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
      80: aload         9
      82: swap
      83: invokeinterface #101,  2          // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
      88: pop
      89: goto          39
      92: aload_3
      93: checkcast     #58                 // class java/util/List
      96: nop
      97: areturn

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

Compiled from "Comparisons.kt"
public final class codeforces.round606.CKt$main$$inlined$sortedByDescending$1<T> implements java.util.Comparator {
  public codeforces.round606.CKt$main$$inlined$sortedByDescending$1();
    Code:
       0: aload_0
       1: invokespecial #16                 // Method java/lang/Object."<init>":()V
       4: return

  public final int compare(T, T);
    Code:
       0: aload_2
       1: checkcast     #23                 // class kotlin/Pair
       4: astore_3
       5: iconst_0
       6: istore        4
       8: aload_3
       9: invokevirtual #27                 // Method kotlin/Pair.getSecond:()Ljava/lang/Object;
      12: checkcast     #29                 // class java/util/List
      15: invokeinterface #33,  1           // InterfaceMethod java/util/List.size:()I
      20: invokestatic  #39                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
      23: checkcast     #41                 // class java/lang/Comparable
      26: aload_1
      27: checkcast     #23                 // class kotlin/Pair
      30: astore_3
      31: astore        5
      33: iconst_0
      34: istore        4
      36: aload_3
      37: invokevirtual #27                 // Method kotlin/Pair.getSecond:()Ljava/lang/Object;
      40: checkcast     #29                 // class java/util/List
      43: invokeinterface #33,  1           // InterfaceMethod java/util/List.size:()I
      48: invokestatic  #39                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
      51: aload         5
      53: swap
      54: checkcast     #41                 // class java/lang/Comparable
      57: invokestatic  #47                 // Method kotlin/comparisons/ComparisonsKt.compareValues:(Ljava/lang/Comparable;Ljava/lang/Comparable;)I
      60: ireturn
}


package codeforces.round637

private val digits = listOf("1110111", "0010010", "1011101", "1011011", "0111010",
		"1101011", "1101111", "1010010", "1111111", "1111011").map { it.toInt(2) }

fun main() {
	val (n, k) = readInts()
	val a = List(n) {
		val shown = readLn().toInt(2)
		digits.mapIndexedNotNull { d, digit ->
			(d to Integer.bitCount(digit xor shown)).takeIf { digit.inv() and shown == 0 }
		}
	}
	val can = List(n + 1) { BooleanArray(k + 1) }
	can[n][0] = true
	for (i in a.indices.reversed()) {
		for ((_, need) in a[i]) {
			for (j in 0..k - need) if (can[i + 1][j]) can[i][j + need] = true
		}
	}
	var x = k
	println(if (!can[0][x]) -1 else a.indices.joinToString("") { i ->
		val (d, need) = a[i].last { can[i + 1].getOrFalse(x - it.second) }
		x -= need
		d.toString()
	})
}

private fun BooleanArray.getOrFalse(index: Int) = getOrNull(index) ?: false
private fun readLn() = readLine()!!
private fun readStrings() = readLn().split(" ")
private fun readInts() = readStrings().map { it.toInt() }

Compiled from "b.kt"
public final class codeforces.round637.BKt {
  private static final java.util.List<java.lang.Integer> digits;

  public static final void main();
    Code:
       0: invokestatic  #10                 // Method readInts:()Ljava/util/List;
       3: astore_0
       4: aload_0
       5: iconst_0
       6: invokeinterface #16,  2           // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
      11: checkcast     #18                 // class java/lang/Number
      14: invokevirtual #22                 // Method java/lang/Number.intValue:()I
      17: istore_1
      18: aload_0
      19: iconst_1
      20: invokeinterface #16,  2           // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
      25: checkcast     #18                 // class java/lang/Number
      28: invokevirtual #22                 // Method java/lang/Number.intValue:()I
      31: istore_2
      32: new           #24                 // class java/util/ArrayList
      35: dup
      36: iload_1
      37: invokespecial #28                 // Method java/util/ArrayList."<init>":(I)V
      40: astore        4
      42: iconst_0
      43: istore        5
      45: iload         5
      47: iload_1
      48: if_icmpge     290
      51: iload         5
      53: istore        6
      55: aload         4
      57: iload         6
      59: istore        7
      61: astore        32
      63: iconst_0
      64: istore        8
      66: invokestatic  #32                 // Method readLn:()Ljava/lang/String;
      69: iconst_2
      70: invokestatic  #38                 // Method kotlin/text/CharsKt.checkRadix:(I)I
      73: invokestatic  #44                 // Method java/lang/Integer.parseInt:(Ljava/lang/String;I)I
      76: istore        9
      78: getstatic     #48                 // Field digits:Ljava/util/List;
      81: checkcast     #50                 // class java/lang/Iterable
      84: astore        10
      86: iconst_0
      87: istore        11
      89: aload         10
      91: astore        12
      93: new           #24                 // class java/util/ArrayList
      96: dup
      97: invokespecial #52                 // Method java/util/ArrayList."<init>":()V
     100: checkcast     #54                 // class java/util/Collection
     103: astore        13
     105: iconst_0
     106: istore        14
     108: aload         12
     110: astore        15
     112: iconst_0
     113: istore        16
     115: iconst_0
     116: istore        17
     118: aload         15
     120: invokeinterface #58,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     125: astore        18
     127: aload         18
     129: invokeinterface #64,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     134: ifeq          269
     137: aload         18
     139: invokeinterface #68,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     144: astore        19
     146: iload         17
     148: iinc          17, 1
     151: istore        20
     153: iload         20
     155: ifge          161
     158: invokestatic  #73                 // Method kotlin/collections/CollectionsKt.throwIndexOverflow:()V
     161: iload         20
     163: aload         19
     165: astore        21
     167: istore        22
     169: iconst_0
     170: istore        23
     172: iload         22
     174: aload         21
     176: checkcast     #18                 // class java/lang/Number
     179: invokevirtual #22                 // Method java/lang/Number.intValue:()I
     182: istore        24
     184: istore        25
     186: iconst_0
     187: istore        26
     189: iload         25
     191: invokestatic  #77                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     194: iload         24
     196: iload         9
     198: ixor
     199: invokestatic  #80                 // Method java/lang/Integer.bitCount:(I)I
     202: invokestatic  #77                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     205: invokestatic  #86                 // Method kotlin/TuplesKt.to:(Ljava/lang/Object;Ljava/lang/Object;)Lkotlin/Pair;
     208: astore        27
     210: aload         27
     212: astore        28
     214: iconst_0
     215: istore        29
     217: iload         24
     219: iconst_m1
     220: ixor
     221: iload         9
     223: iand
     224: ifne          231
     227: iconst_1
     228: goto          232
     231: iconst_0
     232: ifeq          240
     235: aload         27
     237: goto          241
     240: aconst_null
     241: nop
     242: dup
     243: ifnull        264
     246: astore        30
     248: iconst_0
     249: istore        31
     251: aload         13
     253: aload         30
     255: invokeinterface #90,  2           // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     260: pop
     261: goto          265
     264: pop
     265: nop
     266: goto          127
     269: nop
     270: aload         13
     272: checkcast     #12                 // class java/util/List
     275: nop
     276: nop
     277: aload         32
     279: swap
     280: invokevirtual #91                 // Method java/util/ArrayList.add:(Ljava/lang/Object;)Z
     283: pop
     284: iinc          5, 1
     287: goto          45
     290: aload         4
     292: checkcast     #12                 // class java/util/List
     295: astore_3
     296: iload_1
     297: iconst_1
     298: iadd
     299: istore        5
     301: new           #24                 // class java/util/ArrayList
     304: dup
     305: iload         5
     307: invokespecial #28                 // Method java/util/ArrayList."<init>":(I)V
     310: astore        6
     312: iconst_0
     313: istore        7
     315: iload         7
     317: iload         5
     319: if_icmpge     355
     322: iload         7
     324: istore        8
     326: aload         6
     328: iload         8
     330: istore        9
     332: astore        32
     334: iconst_0
     335: istore        10
     337: iload_2
     338: iconst_1
     339: iadd
     340: newarray       boolean
     342: aload         32
     344: swap
     345: invokevirtual #91                 // Method java/util/ArrayList.add:(Ljava/lang/Object;)Z
     348: pop
     349: iinc          7, 1
     352: goto          315
     355: aload         6
     357: checkcast     #12                 // class java/util/List
     360: astore        4
     362: aload         4
     364: iload_1
     365: invokeinterface #16,  2           // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     370: checkcast     #93                 // class "[Z"
     373: iconst_0
     374: iconst_1
     375: bastore
     376: aload_3
     377: checkcast     #54                 // class java/util/Collection
     380: invokeinterface #96,  1           // InterfaceMethod java/util/Collection.size:()I
     385: iconst_m1
     386: iadd
     387: istore        5
     389: iconst_0
     390: iload         5
     392: if_icmpgt     525
     395: iload         5
     397: istore        6
     399: iinc          5, -1
     402: aload_3
     403: iload         6
     405: invokeinterface #16,  2           // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     410: checkcast     #12                 // class java/util/List
     413: invokeinterface #97,  1           // InterfaceMethod java/util/List.iterator:()Ljava/util/Iterator;
     418: astore        7
     420: aload         7
     422: invokeinterface #64,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     427: ifeq          519
     430: aload         7
     432: invokeinterface #68,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     437: checkcast     #99                 // class kotlin/Pair
     440: invokevirtual #102                // Method kotlin/Pair.component2:()Ljava/lang/Object;
     443: checkcast     #18                 // class java/lang/Number
     446: invokevirtual #22                 // Method java/lang/Number.intValue:()I
     449: istore        9
     451: iconst_0
     452: istore        10
     454: iload_2
     455: iload         9
     457: isub
     458: istore        11
     460: iload         10
     462: iload         11
     464: if_icmpgt     420
     467: aload         4
     469: iload         6
     471: iconst_1
     472: iadd
     473: invokeinterface #16,  2           // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     478: checkcast     #93                 // class "[Z"
     481: iload         10
     483: baload
     484: ifeq          506
     487: aload         4
     489: iload         6
     491: invokeinterface #16,  2           // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     496: checkcast     #93                 // class "[Z"
     499: iload         10
     501: iload         9
     503: iadd
     504: iconst_1
     505: bastore
     506: iload         10
     508: iload         11
     510: if_icmpeq     420
     513: iinc          10, 1
     516: goto          467
     519: iconst_0
     520: iload         5
     522: if_icmple     395
     525: new           #104                // class kotlin/jvm/internal/Ref$IntRef
     528: dup
     529: invokespecial #105                // Method kotlin/jvm/internal/Ref$IntRef."<init>":()V
     532: astore        5
     534: aload         5
     536: iload_2
     537: putfield      #109                // Field kotlin/jvm/internal/Ref$IntRef.element:I
     540: aload         4
     542: iconst_0
     543: invokeinterface #16,  2           // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     548: checkcast     #93                 // class "[Z"
     551: aload         5
     553: getfield      #109                // Field kotlin/jvm/internal/Ref$IntRef.element:I
     556: baload
     557: ifne          567
     560: iconst_m1
     561: invokestatic  #77                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     564: goto          602
     567: aload_3
     568: checkcast     #54                 // class java/util/Collection
     571: invokestatic  #113                // Method kotlin/collections/CollectionsKt.getIndices:(Ljava/util/Collection;)Lkotlin/ranges/IntRange;
     574: checkcast     #50                 // class java/lang/Iterable
     577: ldc           #115                // String
     579: checkcast     #117                // class java/lang/CharSequence
     582: aconst_null
     583: aconst_null
     584: iconst_0
     585: aconst_null
     586: aload_3
     587: aload         5
     589: aload         4
     591: invokedynamic #137,  0            // InvokeDynamic #0:invoke:(Ljava/util/List;Lkotlin/jvm/internal/Ref$IntRef;Ljava/util/List;)Lkotlin/jvm/functions/Function1;
     596: bipush        30
     598: aconst_null
     599: invokestatic  #141                // 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;
     602: getstatic     #147                // Field java/lang/System.out:Ljava/io/PrintStream;
     605: swap
     606: invokevirtual #153                // Method java/io/PrintStream.println:(Ljava/lang/Object;)V
     609: return

  private static final boolean getOrFalse(boolean[], int);
    Code:
       0: aload_0
       1: iload_1
       2: invokestatic  #196                // Method kotlin/collections/ArraysKt.getOrNull:([ZI)Ljava/lang/Boolean;
       5: dup
       6: ifnull        15
       9: invokevirtual #201                // Method java/lang/Boolean.booleanValue:()Z
      12: goto          17
      15: pop
      16: iconst_0
      17: ireturn

  private static final java.lang.String readLn();
    Code:
       0: invokestatic  #208                // Method kotlin/io/ConsoleKt.readLine:()Ljava/lang/String;
       3: dup
       4: invokestatic  #213                // Method kotlin/jvm/internal/Intrinsics.checkNotNull:(Ljava/lang/Object;)V
       7: areturn

  private static final java.util.List<java.lang.String> readStrings();
    Code:
       0: invokestatic  #32                 // Method readLn:()Ljava/lang/String;
       3: checkcast     #117                // class java/lang/CharSequence
       6: iconst_1
       7: anewarray     #217                // class java/lang/String
      10: astore_0
      11: aload_0
      12: iconst_0
      13: ldc           #219                // String
      15: aastore
      16: aload_0
      17: iconst_0
      18: iconst_0
      19: bipush        6
      21: aconst_null
      22: invokestatic  #225                // Method kotlin/text/StringsKt.split$default:(Ljava/lang/CharSequence;[Ljava/lang/String;ZIILjava/lang/Object;)Ljava/util/List;
      25: areturn

  private static final java.util.List<java.lang.Integer> readInts();
    Code:
       0: invokestatic  #228                // Method readStrings:()Ljava/util/List;
       3: checkcast     #50                 // class java/lang/Iterable
       6: astore_0
       7: iconst_0
       8: istore_1
       9: aload_0
      10: astore_2
      11: new           #24                 // class java/util/ArrayList
      14: dup
      15: aload_0
      16: bipush        10
      18: invokestatic  #232                // Method kotlin/collections/CollectionsKt.collectionSizeOrDefault:(Ljava/lang/Iterable;I)I
      21: invokespecial #28                 // Method java/util/ArrayList."<init>":(I)V
      24: checkcast     #54                 // class java/util/Collection
      27: astore_3
      28: iconst_0
      29: istore        4
      31: aload_2
      32: invokeinterface #58,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
      37: astore        5
      39: aload         5
      41: invokeinterface #64,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
      46: ifeq          92
      49: aload         5
      51: invokeinterface #68,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
      56: astore        6
      58: aload_3
      59: aload         6
      61: checkcast     #217                // class java/lang/String
      64: astore        7
      66: astore        9
      68: iconst_0
      69: istore        8
      71: aload         7
      73: invokestatic  #235                // Method java/lang/Integer.parseInt:(Ljava/lang/String;)I
      76: nop
      77: invokestatic  #77                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
      80: aload         9
      82: swap
      83: invokeinterface #90,  2           // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
      88: pop
      89: goto          39
      92: aload_3
      93: checkcast     #12                 // class java/util/List
      96: nop
      97: areturn

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

  private static final java.lang.CharSequence main$lambda$6(java.util.List, kotlin.jvm.internal.Ref$IntRef, java.util.List, int);
    Code:
       0: aload_0
       1: iload_3
       2: invokeinterface #16,  2           // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
       7: checkcast     #12                 // class java/util/List
      10: astore        5
      12: iconst_0
      13: istore        6
      15: aload         5
      17: aload         5
      19: invokeinterface #248,  1          // InterfaceMethod java/util/List.size:()I
      24: invokeinterface #252,  2          // InterfaceMethod java/util/List.listIterator:(I)Ljava/util/ListIterator;
      29: astore        7
      31: aload         7
      33: invokeinterface #257,  1          // InterfaceMethod java/util/ListIterator.hasPrevious:()Z
      38: ifeq          99
      41: aload         7
      43: invokeinterface #260,  1          // InterfaceMethod java/util/ListIterator.previous:()Ljava/lang/Object;
      48: astore        8
      50: aload         8
      52: checkcast     #99                 // class kotlin/Pair
      55: astore        9
      57: iconst_0
      58: istore        10
      60: aload_2
      61: iload_3
      62: iconst_1
      63: iadd
      64: invokeinterface #16,  2           // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
      69: checkcast     #93                 // class "[Z"
      72: aload_1
      73: getfield      #109                // Field kotlin/jvm/internal/Ref$IntRef.element:I
      76: aload         9
      78: invokevirtual #263                // Method kotlin/Pair.getSecond:()Ljava/lang/Object;
      81: checkcast     #18                 // class java/lang/Number
      84: invokevirtual #22                 // Method java/lang/Number.intValue:()I
      87: isub
      88: invokestatic  #265                // Method getOrFalse:([ZI)Z
      91: ifeq          31
      94: aload         8
      96: goto          110
      99: new           #267                // class java/util/NoSuchElementException
     102: dup
     103: ldc_w         #269                // String List contains no element matching the predicate.
     106: invokespecial #272                // Method java/util/NoSuchElementException."<init>":(Ljava/lang/String;)V
     109: athrow
     110: checkcast     #99                 // class kotlin/Pair
     113: astore        4
     115: aload         4
     117: invokevirtual #275                // Method kotlin/Pair.component1:()Ljava/lang/Object;
     120: checkcast     #18                 // class java/lang/Number
     123: invokevirtual #22                 // Method java/lang/Number.intValue:()I
     126: istore        5
     128: aload         4
     130: invokevirtual #102                // Method kotlin/Pair.component2:()Ljava/lang/Object;
     133: checkcast     #18                 // class java/lang/Number
     136: invokevirtual #22                 // Method java/lang/Number.intValue:()I
     139: istore        6
     141: aload_1
     142: aload_1
     143: getfield      #109                // Field kotlin/jvm/internal/Ref$IntRef.element:I
     146: iload         6
     148: isub
     149: putfield      #109                // Field kotlin/jvm/internal/Ref$IntRef.element:I
     152: iload         5
     154: invokestatic  #278                // Method java/lang/String.valueOf:(I)Ljava/lang/String;
     157: checkcast     #117                // class java/lang/CharSequence
     160: areturn

  static {};
    Code:
       0: bipush        10
       2: anewarray     #217                // class java/lang/String
       5: astore_0
       6: aload_0
       7: iconst_0
       8: ldc_w         #290                // String 1110111
      11: aastore
      12: aload_0
      13: iconst_1
      14: ldc_w         #292                // String 0010010
      17: aastore
      18: aload_0
      19: iconst_2
      20: ldc_w         #294                // String 1011101
      23: aastore
      24: aload_0
      25: iconst_3
      26: ldc_w         #296                // String 1011011
      29: aastore
      30: aload_0
      31: iconst_4
      32: ldc_w         #298                // String 0111010
      35: aastore
      36: aload_0
      37: iconst_5
      38: ldc_w         #300                // String 1101011
      41: aastore
      42: aload_0
      43: bipush        6
      45: ldc_w         #302                // String 1101111
      48: aastore
      49: aload_0
      50: bipush        7
      52: ldc_w         #304                // String 1010010
      55: aastore
      56: aload_0
      57: bipush        8
      59: ldc_w         #306                // String 1111111
      62: aastore
      63: aload_0
      64: bipush        9
      66: ldc_w         #308                // String 1111011
      69: aastore
      70: aload_0
      71: invokestatic  #312                // Method kotlin/collections/CollectionsKt.listOf:([Ljava/lang/Object;)Ljava/util/List;
      74: checkcast     #50                 // class java/lang/Iterable
      77: astore_0
      78: nop
      79: iconst_0
      80: istore_1
      81: aload_0
      82: astore_2
      83: new           #24                 // class java/util/ArrayList
      86: dup
      87: aload_0
      88: bipush        10
      90: invokestatic  #232                // Method kotlin/collections/CollectionsKt.collectionSizeOrDefault:(Ljava/lang/Iterable;I)I
      93: invokespecial #28                 // Method java/util/ArrayList."<init>":(I)V
      96: checkcast     #54                 // class java/util/Collection
      99: astore_3
     100: iconst_0
     101: istore        4
     103: aload_2
     104: invokeinterface #58,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     109: astore        5
     111: aload         5
     113: invokeinterface #64,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     118: ifeq          168
     121: aload         5
     123: invokeinterface #68,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     128: astore        6
     130: aload_3
     131: aload         6
     133: checkcast     #217                // class java/lang/String
     136: astore        7
     138: astore        9
     140: iconst_0
     141: istore        8
     143: aload         7
     145: iconst_2
     146: invokestatic  #38                 // Method kotlin/text/CharsKt.checkRadix:(I)I
     149: invokestatic  #44                 // Method java/lang/Integer.parseInt:(Ljava/lang/String;I)I
     152: nop
     153: invokestatic  #77                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     156: aload         9
     158: swap
     159: invokeinterface #90,  2           // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     164: pop
     165: goto          111
     168: aload_3
     169: checkcast     #12                 // class java/util/List
     172: nop
     173: putstatic     #48                 // Field digits:Ljava/util/List;
     176: return
}