package codeforces.vk2021.round1

import kotlin.random.Random
import kotlin.system.exitProcess

private fun solveSmart(a: List<Int>): List<Int> {
	val used = BooleanArray(a.size)
	val ans = IntArray(a.size) { -1 }
	for (i in a.indices) {
		if (a[i] == i) continue
		if (used[a[i]]) continue
		used[a[i]] = true
		ans[i] = a[i]
	}
	val unused = used.indices.filter { !used[it] }.toMutableList()
	val weakIndices = ans.indices.filter { ans[it] == -1 }
	for (i in weakIndices) {
		ans[i] = unused.last()
		unused.removeAt(unused.lastIndex)
	}
	for (i in weakIndices) {
		if (ans[i] == i) {
			val j = if (weakIndices.size > 1) {
				weakIndices.first { it != i }
			} else {
				val jj = ans.indices.firstOrNull { it != i && ans[it] == a[i] }
				jj ?: ans.indices.first { it != i && ans[it] != i }
			}
			val t = ans[i]; ans[i] = ans[j]; ans[j] = t
			break
		}
	}
	return ans.toList()
}

private fun solve() {
	readLn()
	val a = readInts().map { it - 1 }
	val ans = solveSmart(a)
	println(a.indices.count { a[it] == ans[it] })
	println(ans.map { it + 1 }.joinToString(" "))
}

fun main() {
//	stress()
	repeat(readInt()) { solve() }
}

private fun solveDumb(a: List<Int>): List<Int> {
	var bestCommon = -1
	var best: List<Int>? = null
	fun search(prefix: List<Int>) {
		if (prefix.size == a.size) {
			val common = a.indices.count { a[it] == prefix[it] }
			if (common > bestCommon) {
				bestCommon = common
				best = prefix
			}
			return
		}
		for (i in a.indices - prefix - listOf(prefix.size)) {
			search(prefix + i)
		}
	}
	search(listOf())
	return best!!
}

@Suppress("unused")
private fun stress() {
	val r = Random(566)
	while (true) {
		val n = 2 + r.nextInt(5)
		val a = List(n) { r.nextInt(n) }
		val smart = solveSmart(a)
		val dumb = solveDumb(a)
		println(a)
		println(smart)
		println(dumb)
		fun quality(b: List<Int>): Int {
			return b.indices.count { b[it] == a[it] }
		}
		if (quality(smart) != quality(dumb)) {
			exitProcess(0)
		}
	}
}

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

Compiled from "d.kt"
public final class codeforces.vk2021.round1.DKt {
  private static final java.util.List<java.lang.Integer> solveSmart(java.util.List<java.lang.Integer>);
    Code:
       0: aload_0
       1: invokeinterface #13,  1           // InterfaceMethod java/util/List.size:()I
       6: newarray       boolean
       8: astore_1
       9: iconst_0
      10: istore_3
      11: aload_0
      12: invokeinterface #13,  1           // InterfaceMethod java/util/List.size:()I
      17: istore        4
      19: iload         4
      21: newarray       int
      23: astore        5
      25: iload_3
      26: iload         4
      28: if_icmpge     46
      31: iload_3
      32: istore        6
      34: aload         5
      36: iload         6
      38: iconst_m1
      39: iastore
      40: iinc          3, 1
      43: goto          25
      46: aload         5
      48: astore_2
      49: iconst_0
      50: istore_3
      51: aload_0
      52: checkcast     #15                 // class java/util/Collection
      55: invokeinterface #16,  1           // InterfaceMethod java/util/Collection.size:()I
      60: istore        4
      62: iload_3
      63: iload         4
      65: if_icmpge     141
      68: aload_0
      69: iload_3
      70: invokeinterface #20,  2           // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
      75: checkcast     #22                 // class java/lang/Number
      78: invokevirtual #25                 // Method java/lang/Number.intValue:()I
      81: iload_3
      82: if_icmpeq     135
      85: aload_1
      86: aload_0
      87: iload_3
      88: invokeinterface #20,  2           // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
      93: checkcast     #22                 // class java/lang/Number
      96: invokevirtual #25                 // Method java/lang/Number.intValue:()I
      99: baload
     100: ifne          135
     103: aload_1
     104: aload_0
     105: iload_3
     106: invokeinterface #20,  2           // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     111: checkcast     #22                 // class java/lang/Number
     114: invokevirtual #25                 // Method java/lang/Number.intValue:()I
     117: iconst_1
     118: bastore
     119: aload_2
     120: iload_3
     121: aload_0
     122: iload_3
     123: invokeinterface #20,  2           // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     128: checkcast     #22                 // class java/lang/Number
     131: invokevirtual #25                 // Method java/lang/Number.intValue:()I
     134: iastore
     135: iinc          3, 1
     138: goto          62
     141: aload_1
     142: invokestatic  #31                 // Method kotlin/collections/ArraysKt.getIndices:([Z)Lkotlin/ranges/IntRange;
     145: checkcast     #33                 // class java/lang/Iterable
     148: astore        4
     150: iconst_0
     151: istore        5
     153: aload         4
     155: astore        6
     157: new           #35                 // class java/util/ArrayList
     160: dup
     161: invokespecial #39                 // Method java/util/ArrayList."<init>":()V
     164: checkcast     #15                 // class java/util/Collection
     167: astore        7
     169: iconst_0
     170: istore        8
     172: aload         6
     174: invokeinterface #43,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     179: astore        9
     181: aload         9
     183: invokeinterface #49,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     188: ifeq          241
     191: aload         9
     193: invokeinterface #53,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     198: astore        10
     200: aload         10
     202: checkcast     #22                 // class java/lang/Number
     205: invokevirtual #25                 // Method java/lang/Number.intValue:()I
     208: istore        11
     210: iconst_0
     211: istore        12
     213: aload_1
     214: iload         11
     216: baload
     217: ifne          224
     220: iconst_1
     221: goto          225
     224: iconst_0
     225: ifeq          181
     228: aload         7
     230: aload         10
     232: invokeinterface #57,  2           // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     237: pop
     238: goto          181
     241: aload         7
     243: checkcast     #9                  // class java/util/List
     246: nop
     247: checkcast     #15                 // class java/util/Collection
     250: invokestatic  #63                 // Method kotlin/collections/CollectionsKt.toMutableList:(Ljava/util/Collection;)Ljava/util/List;
     253: astore_3
     254: aload_2
     255: invokestatic  #66                 // Method kotlin/collections/ArraysKt.getIndices:([I)Lkotlin/ranges/IntRange;
     258: checkcast     #33                 // class java/lang/Iterable
     261: astore        5
     263: iconst_0
     264: istore        6
     266: aload         5
     268: astore        7
     270: new           #35                 // class java/util/ArrayList
     273: dup
     274: invokespecial #39                 // Method java/util/ArrayList."<init>":()V
     277: checkcast     #15                 // class java/util/Collection
     280: astore        8
     282: iconst_0
     283: istore        9
     285: aload         7
     287: invokeinterface #43,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     292: astore        10
     294: aload         10
     296: invokeinterface #49,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     301: ifeq          355
     304: aload         10
     306: invokeinterface #53,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     311: astore        11
     313: aload         11
     315: checkcast     #22                 // class java/lang/Number
     318: invokevirtual #25                 // Method java/lang/Number.intValue:()I
     321: istore        12
     323: iconst_0
     324: istore        13
     326: aload_2
     327: iload         12
     329: iaload
     330: iconst_m1
     331: if_icmpne     338
     334: iconst_1
     335: goto          339
     338: iconst_0
     339: ifeq          294
     342: aload         8
     344: aload         11
     346: invokeinterface #57,  2           // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     351: pop
     352: goto          294
     355: aload         8
     357: checkcast     #9                  // class java/util/List
     360: nop
     361: astore        4
     363: aload         4
     365: invokeinterface #67,  1           // InterfaceMethod java/util/List.iterator:()Ljava/util/Iterator;
     370: astore        5
     372: aload         5
     374: invokeinterface #49,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     379: ifeq          425
     382: aload         5
     384: invokeinterface #53,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     389: checkcast     #22                 // class java/lang/Number
     392: invokevirtual #25                 // Method java/lang/Number.intValue:()I
     395: istore        6
     397: aload_2
     398: iload         6
     400: aload_3
     401: invokestatic  #71                 // Method kotlin/collections/CollectionsKt.last:(Ljava/util/List;)Ljava/lang/Object;
     404: checkcast     #22                 // class java/lang/Number
     407: invokevirtual #25                 // Method java/lang/Number.intValue:()I
     410: iastore
     411: aload_3
     412: aload_3
     413: invokestatic  #75                 // Method kotlin/collections/CollectionsKt.getLastIndex:(Ljava/util/List;)I
     416: invokeinterface #78,  2           // InterfaceMethod java/util/List.remove:(I)Ljava/lang/Object;
     421: pop
     422: goto          372
     425: aload         4
     427: invokeinterface #67,  1           // InterfaceMethod java/util/List.iterator:()Ljava/util/Iterator;
     432: astore        5
     434: aload         5
     436: invokeinterface #49,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     441: ifeq          794
     444: aload         5
     446: invokeinterface #53,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     451: checkcast     #22                 // class java/lang/Number
     454: invokevirtual #25                 // Method java/lang/Number.intValue:()I
     457: istore        6
     459: aload_2
     460: iload         6
     462: iaload
     463: iload         6
     465: if_icmpne     434
     468: aload         4
     470: invokeinterface #13,  1           // InterfaceMethod java/util/List.size:()I
     475: iconst_1
     476: if_icmple     569
     479: aload         4
     481: checkcast     #33                 // class java/lang/Iterable
     484: astore        8
     486: iconst_0
     487: istore        9
     489: aload         8
     491: invokeinterface #43,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     496: astore        10
     498: aload         10
     500: invokeinterface #49,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     505: ifeq          550
     508: aload         10
     510: invokeinterface #53,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     515: astore        11
     517: aload         11
     519: checkcast     #22                 // class java/lang/Number
     522: invokevirtual #25                 // Method java/lang/Number.intValue:()I
     525: istore        12
     527: iconst_0
     528: istore        13
     530: iload         12
     532: iload         6
     534: if_icmpeq     541
     537: iconst_1
     538: goto          542
     541: iconst_0
     542: ifeq          498
     545: aload         11
     547: goto          560
     550: new           #80                 // class java/util/NoSuchElementException
     553: dup
     554: ldc           #82                 // String Collection contains no element matching the predicate.
     556: invokespecial #85                 // Method java/util/NoSuchElementException."<init>":(Ljava/lang/String;)V
     559: athrow
     560: checkcast     #22                 // class java/lang/Number
     563: invokevirtual #25                 // Method java/lang/Number.intValue:()I
     566: goto          769
     569: aload_2
     570: invokestatic  #66                 // Method kotlin/collections/ArraysKt.getIndices:([I)Lkotlin/ranges/IntRange;
     573: checkcast     #33                 // class java/lang/Iterable
     576: astore        9
     578: iconst_0
     579: istore        10
     581: aload         9
     583: invokeinterface #43,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     588: astore        11
     590: aload         11
     592: invokeinterface #49,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     597: ifeq          663
     600: aload         11
     602: invokeinterface #53,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     607: astore        12
     609: aload         12
     611: checkcast     #22                 // class java/lang/Number
     614: invokevirtual #25                 // Method java/lang/Number.intValue:()I
     617: istore        13
     619: iconst_0
     620: istore        14
     622: iload         13
     624: iload         6
     626: if_icmpeq     654
     629: aload_2
     630: iload         13
     632: iaload
     633: aload_0
     634: iload         6
     636: invokeinterface #20,  2           // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     641: checkcast     #22                 // class java/lang/Number
     644: invokevirtual #25                 // Method java/lang/Number.intValue:()I
     647: if_icmpne     654
     650: iconst_1
     651: goto          655
     654: iconst_0
     655: ifeq          590
     658: aload         12
     660: goto          664
     663: aconst_null
     664: checkcast     #87                 // class java/lang/Integer
     667: astore        8
     669: aload         8
     671: dup
     672: ifnull        681
     675: invokevirtual #88                 // Method java/lang/Integer.intValue:()I
     678: goto          769
     681: pop
     682: aload_2
     683: invokestatic  #66                 // Method kotlin/collections/ArraysKt.getIndices:([I)Lkotlin/ranges/IntRange;
     686: checkcast     #33                 // class java/lang/Iterable
     689: astore        9
     691: iconst_0
     692: istore        10
     694: aload         9
     696: invokeinterface #43,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     701: astore        11
     703: aload         11
     705: invokeinterface #49,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     710: ifeq          759
     713: aload         11
     715: checkcast     #90                 // class kotlin/collections/IntIterator
     718: invokevirtual #93                 // Method kotlin/collections/IntIterator.nextInt:()I
     721: istore        12
     723: iload         12
     725: istore        13
     727: iconst_0
     728: istore        14
     730: iload         13
     732: iload         6
     734: if_icmpeq     750
     737: aload_2
     738: iload         13
     740: iaload
     741: iload         6
     743: if_icmpeq     750
     746: iconst_1
     747: goto          751
     750: iconst_0
     751: ifeq          703
     754: iload         12
     756: goto          769
     759: new           #80                 // class java/util/NoSuchElementException
     762: dup
     763: ldc           #82                 // String Collection contains no element matching the predicate.
     765: invokespecial #85                 // Method java/util/NoSuchElementException."<init>":(Ljava/lang/String;)V
     768: athrow
     769: istore        7
     771: aload_2
     772: iload         6
     774: iaload
     775: istore        8
     777: aload_2
     778: iload         6
     780: aload_2
     781: iload         7
     783: iaload
     784: iastore
     785: aload_2
     786: iload         7
     788: iload         8
     790: iastore
     791: goto          794
     794: aload_2
     795: invokestatic  #97                 // Method kotlin/collections/ArraysKt.toList:([I)Ljava/util/List;
     798: areturn

  private static final void solve();
    Code:
       0: invokestatic  #138                // Method readLn:()Ljava/lang/String;
       3: pop
       4: invokestatic  #142                // Method readInts:()Ljava/util/List;
       7: checkcast     #33                 // class java/lang/Iterable
      10: astore_1
      11: iconst_0
      12: istore_2
      13: aload_1
      14: astore_3
      15: new           #35                 // class java/util/ArrayList
      18: dup
      19: aload_1
      20: bipush        10
      22: invokestatic  #146                // Method kotlin/collections/CollectionsKt.collectionSizeOrDefault:(Ljava/lang/Iterable;I)I
      25: invokespecial #149                // Method java/util/ArrayList."<init>":(I)V
      28: checkcast     #15                 // class java/util/Collection
      31: astore        4
      33: iconst_0
      34: istore        5
      36: aload_3
      37: invokeinterface #43,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
      42: astore        6
      44: aload         6
      46: invokeinterface #49,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
      51: ifeq          99
      54: aload         6
      56: invokeinterface #53,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
      61: astore        7
      63: aload         4
      65: aload         7
      67: checkcast     #22                 // class java/lang/Number
      70: invokevirtual #25                 // Method java/lang/Number.intValue:()I
      73: istore        8
      75: astore        11
      77: iconst_0
      78: istore        9
      80: iload         8
      82: iconst_1
      83: isub
      84: invokestatic  #153                // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
      87: aload         11
      89: swap
      90: invokeinterface #57,  2           // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
      95: pop
      96: goto          44
      99: aload         4
     101: checkcast     #9                  // class java/util/List
     104: nop
     105: astore_0
     106: aload_0
     107: invokestatic  #155                // Method solveSmart:(Ljava/util/List;)Ljava/util/List;
     110: astore_1
     111: aload_0
     112: checkcast     #15                 // class java/util/Collection
     115: invokestatic  #158                // Method kotlin/collections/CollectionsKt.getIndices:(Ljava/util/Collection;)Lkotlin/ranges/IntRange;
     118: checkcast     #33                 // class java/lang/Iterable
     121: astore_2
     122: iconst_0
     123: istore_3
     124: aload_2
     125: instanceof    #15                 // class java/util/Collection
     128: ifeq          147
     131: aload_2
     132: checkcast     #15                 // class java/util/Collection
     135: invokeinterface #161,  1          // InterfaceMethod java/util/Collection.isEmpty:()Z
     140: ifeq          147
     143: iconst_0
     144: goto          240
     147: iconst_0
     148: istore        4
     150: aload_2
     151: invokeinterface #43,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     156: astore        5
     158: aload         5
     160: invokeinterface #49,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     165: ifeq          238
     168: aload         5
     170: checkcast     #90                 // class kotlin/collections/IntIterator
     173: invokevirtual #93                 // Method kotlin/collections/IntIterator.nextInt:()I
     176: istore        6
     178: iload         6
     180: istore        7
     182: iconst_0
     183: istore        8
     185: aload_0
     186: iload         7
     188: invokeinterface #20,  2           // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     193: checkcast     #22                 // class java/lang/Number
     196: invokevirtual #25                 // Method java/lang/Number.intValue:()I
     199: aload_1
     200: iload         7
     202: invokeinterface #20,  2           // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     207: checkcast     #22                 // class java/lang/Number
     210: invokevirtual #25                 // Method java/lang/Number.intValue:()I
     213: if_icmpne     220
     216: iconst_1
     217: goto          221
     220: iconst_0
     221: ifeq          158
     224: iinc          4, 1
     227: iload         4
     229: ifge          158
     232: invokestatic  #164                // Method kotlin/collections/CollectionsKt.throwCountOverflow:()V
     235: goto          158
     238: iload         4
     240: istore_2
     241: getstatic     #170                // Field java/lang/System.out:Ljava/io/PrintStream;
     244: iload_2
     245: invokevirtual #175                // Method java/io/PrintStream.println:(I)V
     248: aload_1
     249: checkcast     #33                 // class java/lang/Iterable
     252: astore_2
     253: iconst_0
     254: istore_3
     255: aload_2
     256: astore        4
     258: new           #35                 // class java/util/ArrayList
     261: dup
     262: aload_2
     263: bipush        10
     265: invokestatic  #146                // Method kotlin/collections/CollectionsKt.collectionSizeOrDefault:(Ljava/lang/Iterable;I)I
     268: invokespecial #149                // Method java/util/ArrayList."<init>":(I)V
     271: checkcast     #15                 // class java/util/Collection
     274: astore        5
     276: iconst_0
     277: istore        6
     279: aload         4
     281: invokeinterface #43,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     286: astore        7
     288: aload         7
     290: invokeinterface #49,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     295: ifeq          343
     298: aload         7
     300: invokeinterface #53,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     305: astore        8
     307: aload         5
     309: aload         8
     311: checkcast     #22                 // class java/lang/Number
     314: invokevirtual #25                 // Method java/lang/Number.intValue:()I
     317: istore        9
     319: astore        11
     321: iconst_0
     322: istore        10
     324: iload         9
     326: iconst_1
     327: iadd
     328: invokestatic  #153                // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     331: aload         11
     333: swap
     334: invokeinterface #57,  2           // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     339: pop
     340: goto          288
     343: aload         5
     345: checkcast     #9                  // class java/util/List
     348: nop
     349: checkcast     #33                 // class java/lang/Iterable
     352: ldc           #177                // String
     354: checkcast     #179                // class java/lang/CharSequence
     357: aconst_null
     358: aconst_null
     359: iconst_0
     360: aconst_null
     361: aconst_null
     362: bipush        62
     364: aconst_null
     365: invokestatic  #183                // 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;
     368: getstatic     #170                // Field java/lang/System.out:Ljava/io/PrintStream;
     371: swap
     372: invokevirtual #186                // Method java/io/PrintStream.println:(Ljava/lang/Object;)V
     375: return

  public static final void main();
    Code:
       0: invokestatic  #201                // 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  #203                // Method solve:()V
      18: iinc          1, 1
      21: goto          6
      24: return

  private static final java.util.List<java.lang.Integer> solveDumb(java.util.List<java.lang.Integer>);
    Code:
       0: new           #207                // class kotlin/jvm/internal/Ref$IntRef
       3: dup
       4: invokespecial #208                // Method kotlin/jvm/internal/Ref$IntRef."<init>":()V
       7: astore_1
       8: aload_1
       9: iconst_m1
      10: putfield      #211                // Field kotlin/jvm/internal/Ref$IntRef.element:I
      13: new           #213                // class kotlin/jvm/internal/Ref$ObjectRef
      16: dup
      17: invokespecial #214                // Method kotlin/jvm/internal/Ref$ObjectRef."<init>":()V
      20: astore_2
      21: aload_0
      22: aload_1
      23: aload_2
      24: invokestatic  #217                // Method kotlin/collections/CollectionsKt.emptyList:()Ljava/util/List;
      27: invokestatic  #221                // Method solveDumb$search:(Ljava/util/List;Lkotlin/jvm/internal/Ref$IntRef;Lkotlin/jvm/internal/Ref$ObjectRef;Ljava/util/List;)V
      30: aload_2
      31: getfield      #223                // Field kotlin/jvm/internal/Ref$ObjectRef.element:Ljava/lang/Object;
      34: dup
      35: invokestatic  #228                // Method kotlin/jvm/internal/Intrinsics.checkNotNull:(Ljava/lang/Object;)V
      38: checkcast     #9                  // class java/util/List
      41: areturn

  private static final void stress();
    Code:
       0: sipush        566
       3: invokestatic  #239                // Method kotlin/random/RandomKt.Random:(I)Lkotlin/random/Random;
       6: astore_0
       7: nop
       8: iconst_2
       9: aload_0
      10: iconst_5
      11: invokevirtual #244                // Method kotlin/random/Random.nextInt:(I)I
      14: iadd
      15: istore_1
      16: new           #35                 // class java/util/ArrayList
      19: dup
      20: iload_1
      21: invokespecial #149                // Method java/util/ArrayList."<init>":(I)V
      24: astore_3
      25: iconst_0
      26: istore        4
      28: iload         4
      30: iload_1
      31: if_icmpge     69
      34: iload         4
      36: istore        5
      38: aload_3
      39: iload         5
      41: istore        6
      43: astore        8
      45: iconst_0
      46: istore        7
      48: aload_0
      49: iload_1
      50: invokevirtual #244                // Method kotlin/random/Random.nextInt:(I)I
      53: invokestatic  #153                // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
      56: aload         8
      58: swap
      59: invokevirtual #245                // Method java/util/ArrayList.add:(Ljava/lang/Object;)Z
      62: pop
      63: iinc          4, 1
      66: goto          28
      69: aload_3
      70: checkcast     #9                  // class java/util/List
      73: astore_2
      74: aload_2
      75: invokestatic  #155                // Method solveSmart:(Ljava/util/List;)Ljava/util/List;
      78: astore_3
      79: aload_2
      80: invokestatic  #247                // Method solveDumb:(Ljava/util/List;)Ljava/util/List;
      83: astore        4
      85: getstatic     #170                // Field java/lang/System.out:Ljava/io/PrintStream;
      88: aload_2
      89: invokevirtual #186                // Method java/io/PrintStream.println:(Ljava/lang/Object;)V
      92: getstatic     #170                // Field java/lang/System.out:Ljava/io/PrintStream;
      95: aload_3
      96: invokevirtual #186                // Method java/io/PrintStream.println:(Ljava/lang/Object;)V
      99: getstatic     #170                // Field java/lang/System.out:Ljava/io/PrintStream;
     102: aload         4
     104: invokevirtual #186                // Method java/io/PrintStream.println:(Ljava/lang/Object;)V
     107: aload_2
     108: aload_3
     109: invokestatic  #251                // Method stress$quality:(Ljava/util/List;Ljava/util/List;)I
     112: aload_2
     113: aload         4
     115: invokestatic  #251                // Method stress$quality:(Ljava/util/List;Ljava/util/List;)I
     118: if_icmpeq     7
     121: iconst_0
     122: invokestatic  #254                // Method java/lang/System.exit:(I)V
     125: new           #256                // class java/lang/RuntimeException
     128: dup
     129: ldc_w         #258                // String System.exit returned normally, while it was supposed to halt JVM.
     132: invokespecial #259                // Method java/lang/RuntimeException."<init>":(Ljava/lang/String;)V
     135: athrow

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

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

  private static final java.util.List<java.lang.String> readStrings();
    Code:
       0: invokestatic  #138                // Method readLn:()Ljava/lang/String;
       3: checkcast     #179                // class java/lang/CharSequence
       6: iconst_1
       7: anewarray     #278                // class java/lang/String
      10: astore_0
      11: aload_0
      12: iconst_0
      13: ldc           #177                // String
      15: aastore
      16: aload_0
      17: iconst_0
      18: iconst_0
      19: bipush        6
      21: aconst_null
      22: invokestatic  #284                // 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  #287                // Method readStrings:()Ljava/util/List;
       3: checkcast     #33                 // class java/lang/Iterable
       6: astore_0
       7: iconst_0
       8: istore_1
       9: aload_0
      10: astore_2
      11: new           #35                 // class java/util/ArrayList
      14: dup
      15: aload_0
      16: bipush        10
      18: invokestatic  #146                // Method kotlin/collections/CollectionsKt.collectionSizeOrDefault:(Ljava/lang/Iterable;I)I
      21: invokespecial #149                // Method java/util/ArrayList."<init>":(I)V
      24: checkcast     #15                 // class java/util/Collection
      27: astore_3
      28: iconst_0
      29: istore        4
      31: aload_2
      32: invokeinterface #43,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
      37: astore        5
      39: aload         5
      41: invokeinterface #49,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
      46: ifeq          92
      49: aload         5
      51: invokeinterface #53,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
      56: astore        6
      58: aload_3
      59: aload         6
      61: checkcast     #278                // class java/lang/String
      64: astore        7
      66: astore        9
      68: iconst_0
      69: istore        8
      71: aload         7
      73: invokestatic  #274                // Method java/lang/Integer.parseInt:(Ljava/lang/String;)I
      76: nop
      77: invokestatic  #153                // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
      80: aload         9
      82: swap
      83: invokeinterface #57,  2           // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
      88: pop
      89: goto          39
      92: aload_3
      93: checkcast     #9                  // class java/util/List
      96: nop
      97: areturn

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

  private static final void solveDumb$search(java.util.List<java.lang.Integer>, kotlin.jvm.internal.Ref$IntRef, kotlin.jvm.internal.Ref$ObjectRef<java.util.List<java.lang.Integer>>, java.util.List<java.lang.Integer>);
    Code:
       0: aload_3
       1: invokeinterface #13,  1           // InterfaceMethod java/util/List.size:()I
       6: aload_0
       7: invokeinterface #13,  1           // InterfaceMethod java/util/List.size:()I
      12: if_icmpne     172
      15: aload_0
      16: checkcast     #15                 // class java/util/Collection
      19: invokestatic  #158                // Method kotlin/collections/CollectionsKt.getIndices:(Ljava/util/Collection;)Lkotlin/ranges/IntRange;
      22: checkcast     #33                 // class java/lang/Iterable
      25: astore        5
      27: iconst_0
      28: istore        6
      30: aload         5
      32: instanceof    #15                 // class java/util/Collection
      35: ifeq          55
      38: aload         5
      40: checkcast     #15                 // class java/util/Collection
      43: invokeinterface #161,  1          // InterfaceMethod java/util/Collection.isEmpty:()Z
      48: ifeq          55
      51: iconst_0
      52: goto          149
      55: iconst_0
      56: istore        7
      58: aload         5
      60: invokeinterface #43,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
      65: astore        8
      67: aload         8
      69: invokeinterface #49,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
      74: ifeq          147
      77: aload         8
      79: checkcast     #90                 // class kotlin/collections/IntIterator
      82: invokevirtual #93                 // Method kotlin/collections/IntIterator.nextInt:()I
      85: istore        9
      87: iload         9
      89: istore        10
      91: iconst_0
      92: istore        11
      94: aload_0
      95: iload         10
      97: invokeinterface #20,  2           // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     102: checkcast     #22                 // class java/lang/Number
     105: invokevirtual #25                 // Method java/lang/Number.intValue:()I
     108: aload_3
     109: iload         10
     111: invokeinterface #20,  2           // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     116: checkcast     #22                 // class java/lang/Number
     119: invokevirtual #25                 // Method java/lang/Number.intValue:()I
     122: if_icmpne     129
     125: iconst_1
     126: goto          130
     129: iconst_0
     130: ifeq          67
     133: iinc          7, 1
     136: iload         7
     138: ifge          67
     141: invokestatic  #164                // Method kotlin/collections/CollectionsKt.throwCountOverflow:()V
     144: goto          67
     147: iload         7
     149: istore        4
     151: iload         4
     153: aload_1
     154: getfield      #211                // Field kotlin/jvm/internal/Ref$IntRef.element:I
     157: if_icmple     171
     160: aload_1
     161: iload         4
     163: putfield      #211                // Field kotlin/jvm/internal/Ref$IntRef.element:I
     166: aload_2
     167: aload_3
     168: putfield      #223                // Field kotlin/jvm/internal/Ref$ObjectRef.element:Ljava/lang/Object;
     171: return
     172: aload_0
     173: checkcast     #15                 // class java/util/Collection
     176: invokestatic  #158                // Method kotlin/collections/CollectionsKt.getIndices:(Ljava/util/Collection;)Lkotlin/ranges/IntRange;
     179: checkcast     #33                 // class java/lang/Iterable
     182: aload_3
     183: checkcast     #33                 // class java/lang/Iterable
     186: invokestatic  #299                // Method kotlin/collections/CollectionsKt.minus:(Ljava/lang/Iterable;Ljava/lang/Iterable;)Ljava/util/List;
     189: checkcast     #33                 // class java/lang/Iterable
     192: aload_3
     193: invokeinterface #13,  1           // InterfaceMethod java/util/List.size:()I
     198: invokestatic  #153                // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     201: invokestatic  #303                // Method kotlin/collections/CollectionsKt.listOf:(Ljava/lang/Object;)Ljava/util/List;
     204: checkcast     #33                 // class java/lang/Iterable
     207: invokestatic  #299                // Method kotlin/collections/CollectionsKt.minus:(Ljava/lang/Iterable;Ljava/lang/Iterable;)Ljava/util/List;
     210: invokeinterface #67,  1           // InterfaceMethod java/util/List.iterator:()Ljava/util/Iterator;
     215: astore        4
     217: aload         4
     219: invokeinterface #49,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     224: ifeq          263
     227: aload         4
     229: invokeinterface #53,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     234: checkcast     #22                 // class java/lang/Number
     237: invokevirtual #25                 // Method java/lang/Number.intValue:()I
     240: istore        5
     242: aload_0
     243: aload_1
     244: aload_2
     245: aload_3
     246: checkcast     #15                 // class java/util/Collection
     249: iload         5
     251: invokestatic  #153                // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     254: invokestatic  #307                // Method kotlin/collections/CollectionsKt.plus:(Ljava/util/Collection;Ljava/lang/Object;)Ljava/util/List;
     257: invokestatic  #221                // Method solveDumb$search:(Ljava/util/List;Lkotlin/jvm/internal/Ref$IntRef;Lkotlin/jvm/internal/Ref$ObjectRef;Ljava/util/List;)V
     260: goto          217
     263: return

  private static final int stress$quality(java.util.List<java.lang.Integer>, java.util.List<java.lang.Integer>);
    Code:
       0: aload_1
       1: checkcast     #15                 // class java/util/Collection
       4: invokestatic  #158                // Method kotlin/collections/CollectionsKt.getIndices:(Ljava/util/Collection;)Lkotlin/ranges/IntRange;
       7: checkcast     #33                 // class java/lang/Iterable
      10: astore_2
      11: iconst_0
      12: istore_3
      13: aload_2
      14: instanceof    #15                 // class java/util/Collection
      17: ifeq          36
      20: aload_2
      21: checkcast     #15                 // class java/util/Collection
      24: invokeinterface #161,  1          // InterfaceMethod java/util/Collection.isEmpty:()Z
      29: ifeq          36
      32: iconst_0
      33: goto          129
      36: iconst_0
      37: istore        4
      39: aload_2
      40: invokeinterface #43,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
      45: astore        5
      47: aload         5
      49: invokeinterface #49,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
      54: ifeq          127
      57: aload         5
      59: checkcast     #90                 // class kotlin/collections/IntIterator
      62: invokevirtual #93                 // Method kotlin/collections/IntIterator.nextInt:()I
      65: istore        6
      67: iload         6
      69: istore        7
      71: iconst_0
      72: istore        8
      74: aload_1
      75: iload         7
      77: invokeinterface #20,  2           // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
      82: checkcast     #22                 // class java/lang/Number
      85: invokevirtual #25                 // Method java/lang/Number.intValue:()I
      88: aload_0
      89: iload         7
      91: invokeinterface #20,  2           // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
      96: checkcast     #22                 // class java/lang/Number
      99: invokevirtual #25                 // Method java/lang/Number.intValue:()I
     102: if_icmpne     109
     105: iconst_1
     106: goto          110
     109: iconst_0
     110: ifeq          47
     113: iinc          4, 1
     116: iload         4
     118: ifge          47
     121: invokestatic  #164                // Method kotlin/collections/CollectionsKt.throwCountOverflow:()V
     124: goto          47
     127: iload         4
     129: ireturn
}