package gcj.y2022.round2

private fun solve(): String {
	val n = readInt()
	val kids = List(n) { readInts() }
	val sweets = List(n + 1) { readInts() }
	fun sqr(x: Int) = x.toLong() * x
	fun dist(i: Int, j: Int) = sqr(kids[i][0] - sweets[j][0]) + sqr(kids[i][1] - sweets[j][1])
	val dist = List(n) { i -> LongArray(n + 1) { j -> dist(i, j) } }
	val can = BooleanArray(1 shl (2 * n + 1))
	val howMask = IntArray(1 shl (2 * n + 1))
	val howI = IntArray(1 shl (2 * n + 1))
	val howJ = IntArray(1 shl (2 * n + 1))
	val maskInit = 1 shl n
	can[maskInit] = true
	val maxMaskKids = maskInit - 1
	for (mask in can.indices) {
		val maskKids = mask and maxMaskKids
		val maskSweets = mask and maxMaskKids.inv()
		val m = maskKids.countOneBits()
		if (maskSweets.countOneBits() != m + 1 || m == 0) continue
		for (i in 0 until n) {
			if (!mask.hasBit(i)) continue
			var minDist = Long.MAX_VALUE
			for (j in 0..n) {
				if (!mask.hasBit(n + j)) continue
				minDist = minOf(minDist, dist[i][j])
			}
			for (j in 0..n) {
				if (j == 0 || !mask.hasBit(n + j) || dist[i][j] != minDist) continue
				val newMask = mask xor (1 shl i) xor (1 shl (n + j))
				if (can[newMask]) {
					can[mask] = true
					howMask[mask] = newMask
					howI[mask] = i
					howJ[mask] = j
				}
			}
		}
	}
	var mask = can.lastIndex
	if (!can[mask]) return "IMPOSSIBLE"
	val ans = mutableListOf<String>()
	while (mask != maskInit) {
		ans.add("${howI[mask] + 1} ${howJ[mask] + 1}")
		mask = howMask[mask]
	}
	return "POSSIBLE\n" + ans.joinToString("\n")
}

fun main() = repeat(readInt()) { println("Case #${it + 1}: ${solve()}") }

private fun readLn() = readLine()!!
private fun readInt() = readLn().toInt()
private fun readStrings() = readLn().split(" ")
private fun readInts() = readStrings().map { it.toInt() }
private fun Int.bit(index: Int) = shr(index) and 1
private fun Int.hasBit(index: Int) = bit(index) != 0

Compiled from "c_small.kt"
public final class gcj.y2022.round2.C_smallKt {
  private static final java.lang.String solve();
    Code:
       0: invokestatic  #10                 // Method readInt:()I
       3: istore_0
       4: new           #12                 // class java/util/ArrayList
       7: dup
       8: iload_0
       9: invokespecial #16                 // Method java/util/ArrayList."<init>":(I)V
      12: astore_2
      13: iconst_0
      14: istore_3
      15: iload_3
      16: iload_0
      17: if_icmpge     49
      20: iload_3
      21: istore        4
      23: aload_2
      24: iload         4
      26: istore        5
      28: astore        20
      30: iconst_0
      31: istore        6
      33: invokestatic  #20                 // Method readInts:()Ljava/util/List;
      36: aload         20
      38: swap
      39: invokevirtual #24                 // Method java/util/ArrayList.add:(Ljava/lang/Object;)Z
      42: pop
      43: iinc          3, 1
      46: goto          15
      49: aload_2
      50: checkcast     #26                 // class java/util/List
      53: astore_1
      54: iload_0
      55: iconst_1
      56: iadd
      57: istore_3
      58: new           #12                 // class java/util/ArrayList
      61: dup
      62: iload_3
      63: invokespecial #16                 // Method java/util/ArrayList."<init>":(I)V
      66: astore        4
      68: iconst_0
      69: istore        5
      71: iload         5
      73: iload_3
      74: if_icmpge     108
      77: iload         5
      79: istore        6
      81: aload         4
      83: iload         6
      85: istore        7
      87: astore        20
      89: iconst_0
      90: istore        8
      92: invokestatic  #20                 // Method readInts:()Ljava/util/List;
      95: aload         20
      97: swap
      98: invokevirtual #24                 // Method java/util/ArrayList.add:(Ljava/lang/Object;)Z
     101: pop
     102: iinc          5, 1
     105: goto          71
     108: aload         4
     110: checkcast     #26                 // class java/util/List
     113: astore_2
     114: new           #12                 // class java/util/ArrayList
     117: dup
     118: iload_0
     119: invokespecial #16                 // Method java/util/ArrayList."<init>":(I)V
     122: astore        4
     124: iconst_0
     125: istore        5
     127: iload         5
     129: iload_0
     130: if_icmpge     208
     133: iload         5
     135: istore        6
     137: aload         4
     139: iload         6
     141: istore        7
     143: astore        20
     145: iconst_0
     146: istore        8
     148: iconst_0
     149: istore        9
     151: iload_0
     152: iconst_1
     153: iadd
     154: istore        10
     156: iload         10
     158: newarray       long
     160: astore        11
     162: iload         9
     164: iload         10
     166: if_icmpge     193
     169: iload         9
     171: istore        12
     173: aload         11
     175: iload         12
     177: aload_1
     178: aload_2
     179: iload         7
     181: iload         12
     183: invokestatic  #30                 // Method solve$dist:(Ljava/util/List;Ljava/util/List;II)J
     186: lastore
     187: iinc          9, 1
     190: goto          162
     193: aload         11
     195: aload         20
     197: swap
     198: invokevirtual #24                 // Method java/util/ArrayList.add:(Ljava/lang/Object;)Z
     201: pop
     202: iinc          5, 1
     205: goto          127
     208: aload         4
     210: checkcast     #26                 // class java/util/List
     213: astore_3
     214: iconst_1
     215: iconst_2
     216: iload_0
     217: imul
     218: iconst_1
     219: iadd
     220: ishl
     221: newarray       boolean
     223: astore        4
     225: iconst_1
     226: iconst_2
     227: iload_0
     228: imul
     229: iconst_1
     230: iadd
     231: ishl
     232: newarray       int
     234: astore        5
     236: iconst_1
     237: iconst_2
     238: iload_0
     239: imul
     240: iconst_1
     241: iadd
     242: ishl
     243: newarray       int
     245: astore        6
     247: iconst_1
     248: iconst_2
     249: iload_0
     250: imul
     251: iconst_1
     252: iadd
     253: ishl
     254: newarray       int
     256: astore        7
     258: iconst_1
     259: iload_0
     260: ishl
     261: istore        8
     263: aload         4
     265: iload         8
     267: iconst_1
     268: bastore
     269: iload         8
     271: iconst_1
     272: isub
     273: istore        9
     275: iconst_0
     276: istore        10
     278: aload         4
     280: arraylength
     281: istore        11
     283: iload         10
     285: iload         11
     287: if_icmpge     535
     290: iload         10
     292: iload         9
     294: iand
     295: istore        12
     297: iload         10
     299: iload         9
     301: iconst_m1
     302: ixor
     303: iand
     304: istore        13
     306: iload         12
     308: invokestatic  #36                 // Method java/lang/Integer.bitCount:(I)I
     311: istore        14
     313: iload         13
     315: invokestatic  #36                 // Method java/lang/Integer.bitCount:(I)I
     318: iload         14
     320: iconst_1
     321: iadd
     322: if_icmpne     529
     325: iload         14
     327: ifne          333
     330: goto          529
     333: iconst_0
     334: istore        15
     336: iload         15
     338: iload_0
     339: if_icmpge     529
     342: iload         10
     344: iload         15
     346: invokestatic  #40                 // Method hasBit:(II)Z
     349: ifeq          523
     352: ldc2_w        #41                 // long 9223372036854775807l
     355: lstore        16
     357: iconst_0
     358: istore        18
     360: iload         18
     362: iload_0
     363: if_icmpgt     411
     366: iload         10
     368: iload_0
     369: iload         18
     371: iadd
     372: invokestatic  #40                 // Method hasBit:(II)Z
     375: ifeq          399
     378: lload         16
     380: aload_3
     381: iload         15
     383: invokeinterface #46,  2           // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     388: checkcast     #48                 // class "[J"
     391: iload         18
     393: laload
     394: invokestatic  #54                 // Method java/lang/Math.min:(JJ)J
     397: lstore        16
     399: iload         18
     401: iload_0
     402: if_icmpeq     411
     405: iinc          18, 1
     408: goto          366
     411: iconst_0
     412: istore        18
     414: iload         18
     416: iload_0
     417: if_icmpgt     523
     420: iload         18
     422: ifeq          511
     425: iload         10
     427: iload_0
     428: iload         18
     430: iadd
     431: invokestatic  #40                 // Method hasBit:(II)Z
     434: ifeq          511
     437: aload_3
     438: iload         15
     440: invokeinterface #46,  2           // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     445: checkcast     #48                 // class "[J"
     448: iload         18
     450: laload
     451: lload         16
     453: lcmp
     454: ifeq          460
     457: goto          511
     460: iload         10
     462: iconst_1
     463: iload         15
     465: ishl
     466: ixor
     467: iconst_1
     468: iload_0
     469: iload         18
     471: iadd
     472: ishl
     473: ixor
     474: istore        19
     476: aload         4
     478: iload         19
     480: baload
     481: ifeq          511
     484: aload         4
     486: iload         10
     488: iconst_1
     489: bastore
     490: aload         5
     492: iload         10
     494: iload         19
     496: iastore
     497: aload         6
     499: iload         10
     501: iload         15
     503: iastore
     504: aload         7
     506: iload         10
     508: iload         18
     510: iastore
     511: iload         18
     513: iload_0
     514: if_icmpeq     523
     517: iinc          18, 1
     520: goto          420
     523: iinc          15, 1
     526: goto          336
     529: iinc          10, 1
     532: goto          283
     535: aload         4
     537: invokestatic  #60                 // Method kotlin/collections/ArraysKt.getLastIndex:([Z)I
     540: istore        10
     542: aload         4
     544: iload         10
     546: baload
     547: ifne          553
     550: ldc           #62                 // String IMPOSSIBLE
     552: areturn
     553: new           #12                 // class java/util/ArrayList
     556: dup
     557: invokespecial #65                 // Method java/util/ArrayList."<init>":()V
     560: checkcast     #26                 // class java/util/List
     563: astore        11
     565: iload         10
     567: iload         8
     569: if_icmpeq     625
     572: aload         11
     574: new           #67                 // class java/lang/StringBuilder
     577: dup
     578: invokespecial #68                 // Method java/lang/StringBuilder."<init>":()V
     581: aload         6
     583: iload         10
     585: iaload
     586: iconst_1
     587: iadd
     588: invokevirtual #72                 // Method java/lang/StringBuilder.append:(I)Ljava/lang/StringBuilder;
     591: bipush        32
     593: invokevirtual #75                 // Method java/lang/StringBuilder.append:(C)Ljava/lang/StringBuilder;
     596: aload         7
     598: iload         10
     600: iaload
     601: iconst_1
     602: iadd
     603: invokevirtual #72                 // Method java/lang/StringBuilder.append:(I)Ljava/lang/StringBuilder;
     606: invokevirtual #78                 // Method java/lang/StringBuilder.toString:()Ljava/lang/String;
     609: invokeinterface #79,  2           // InterfaceMethod java/util/List.add:(Ljava/lang/Object;)Z
     614: pop
     615: aload         5
     617: iload         10
     619: iaload
     620: istore        10
     622: goto          565
     625: new           #67                 // class java/lang/StringBuilder
     628: dup
     629: invokespecial #68                 // Method java/lang/StringBuilder."<init>":()V
     632: ldc           #81                 // String POSSIBLE\n
     634: invokevirtual #84                 // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
     637: aload         11
     639: checkcast     #86                 // class java/lang/Iterable
     642: ldc           #88                 // String \n
     644: checkcast     #90                 // class java/lang/CharSequence
     647: aconst_null
     648: aconst_null
     649: iconst_0
     650: aconst_null
     651: aconst_null
     652: bipush        62
     654: aconst_null
     655: invokestatic  #96                 // 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;
     658: invokevirtual #84                 // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
     661: invokevirtual #78                 // Method java/lang/StringBuilder.toString:()Ljava/lang/String;
     664: areturn

  public static final void main();
    Code:
       0: invokestatic  #10                 // Method readInt:()I
       3: istore_0
       4: iconst_0
       5: istore_1
       6: iload_1
       7: iload_0
       8: if_icmpge     61
      11: iload_1
      12: istore_2
      13: iconst_0
      14: istore_3
      15: new           #67                 // class java/lang/StringBuilder
      18: dup
      19: invokespecial #68                 // Method java/lang/StringBuilder."<init>":()V
      22: ldc           #129                // String Case #
      24: invokevirtual #84                 // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
      27: iload_2
      28: iconst_1
      29: iadd
      30: invokevirtual #72                 // Method java/lang/StringBuilder.append:(I)Ljava/lang/StringBuilder;
      33: ldc           #131                // String :
      35: invokevirtual #84                 // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
      38: invokestatic  #133                // Method solve:()Ljava/lang/String;
      41: invokevirtual #84                 // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
      44: invokevirtual #78                 // Method java/lang/StringBuilder.toString:()Ljava/lang/String;
      47: getstatic     #139                // Field java/lang/System.out:Ljava/io/PrintStream;
      50: swap
      51: invokevirtual #145                // Method java/io/PrintStream.println:(Ljava/lang/Object;)V
      54: nop
      55: iinc          1, 1
      58: goto          6
      61: return

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

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

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

  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  #220                // 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  #224                // Method main:()V
       3: return

  private static final long solve$sqr(int);
    Code:
       0: iload_0
       1: i2l
       2: iload_0
       3: i2l
       4: lmul
       5: lreturn

  private static final long solve$dist(java.util.List<? extends java.util.List<java.lang.Integer>>, java.util.List<? extends java.util.List<java.lang.Integer>>, int, int);
    Code:
       0: aload_0
       1: iload_2
       2: invokeinterface #46,  2           // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
       7: checkcast     #26                 // class java/util/List
      10: iconst_0
      11: invokeinterface #46,  2           // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
      16: checkcast     #232                // class java/lang/Number
      19: invokevirtual #235                // Method java/lang/Number.intValue:()I
      22: aload_1
      23: iload_3
      24: invokeinterface #46,  2           // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
      29: checkcast     #26                 // class java/util/List
      32: iconst_0
      33: invokeinterface #46,  2           // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
      38: checkcast     #232                // class java/lang/Number
      41: invokevirtual #235                // Method java/lang/Number.intValue:()I
      44: isub
      45: invokestatic  #237                // Method solve$sqr:(I)J
      48: aload_0
      49: iload_2
      50: invokeinterface #46,  2           // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
      55: checkcast     #26                 // class java/util/List
      58: iconst_1
      59: invokeinterface #46,  2           // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
      64: checkcast     #232                // class java/lang/Number
      67: invokevirtual #235                // Method java/lang/Number.intValue:()I
      70: aload_1
      71: iload_3
      72: invokeinterface #46,  2           // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
      77: checkcast     #26                 // class java/util/List
      80: iconst_1
      81: invokeinterface #46,  2           // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
      86: checkcast     #232                // class java/lang/Number
      89: invokevirtual #235                // Method java/lang/Number.intValue:()I
      92: isub
      93: invokestatic  #237                // Method solve$sqr:(I)J
      96: ladd
      97: lreturn
}


package gcj.y2022.round2
import kotlin.math.floor
import kotlin.math.round
import kotlin.math.sqrt

private fun rFloor(x: Int, y: Int) = floor(sqrt(1.0 * x * x + 1.0 * y * y)).toInt()
private fun y(x: Int, r: Int): Int {
	return round(sqrt(1.0 * r * r - 1.0 * x * x)).toInt()
}

private fun skips(rFloor: Int, x: Int, y: Int): Boolean {
	val y1 = y(x, rFloor)
	val y2 = y(x, rFloor + 1)
	return (y1 < y) and (y < y2)
}

private fun research2(m: Int): Int {
	/*
	val a = List(m + 2) { BooleanArray(m + 2) }
	val b = List(m + 2) { BooleanArray(m + 2) }
	for (r in 0..m) {
		for (x in 0..r) {
			val y = round(sqrt(1.0 * r * r - 1.0 * x * x)).toInt()
			b[x][y] = true
			b[y][x] = true
		}
	}
//	println(m)
//	var res = 0
	for (x in 0..m + 1) for (y in 0..m + 1) {
		if (y == 0) println(x)
		a[x][y] = round(sqrt(1.0 * x * x + 1.0 * y * y)) <= m
		if (a[x][y] != b[x][y]) {
//			println("$x $y	${a[x][y]} ${b[x][y]}")
			require(a[x][y])
//			res += 1
		}
	}
	 */

	val holes = IntArray(m + 1)
	for (y in 0..m) {
		if (y % 1000 == 0) System.err.println(y)
		for (x in 0..m) {
			val rFloor = rFloor(x, y)
			if (rFloor > m) break
			val skips = skips(rFloor, x, y) and skips(rFloor, y, x)
			if (skips) {
				val rFull = round(sqrt(1.0 * x * x + 1.0 * y * y)).toInt()
				if (rFull > m) continue
				holes[rFull]++
				println("$x $y")
//				if (b[x][y] || !a[x][y]) {
//					println("$x $y ${a[x][y]} ${b[x][y]}")
//				}
			}
		}
	}
	println(holes.contentToString())
//	var s = 0
//	for (x in holes) {
//		s += x
//		println(s)
//	}
	return 0
}

private fun solve(): Long {
	return 777L
//	return research(readInt()) * 4L
}

fun main() {
//	for (r in 1..100) {
//		val v = research(r)
//		println("$r $v")
//		println(research(r) - research(r-1))
//	}
//	System.setIn(java.io.File("input.txt").inputStream())
//	System.setOut(java.io.PrintStream("output.txt"))
	research2(500)
//	repeat(readInt()) { println("Case #${it + 1}: ${solve()}") }
}

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

Compiled from "b_wip.kt"
public final class gcj.y2022.round2.B_wipKt {
  private static final int rFloor(int, int);
    Code:
       0: dconst_1
       1: iload_0
       2: i2d
       3: dmul
       4: iload_0
       5: i2d
       6: dmul
       7: dconst_1
       8: iload_1
       9: i2d
      10: dmul
      11: iload_1
      12: i2d
      13: dmul
      14: dadd
      15: invokestatic  #12                 // Method java/lang/Math.sqrt:(D)D
      18: invokestatic  #15                 // Method java/lang/Math.floor:(D)D
      21: d2i
      22: ireturn

  private static final int y(int, int);
    Code:
       0: dconst_1
       1: iload_1
       2: i2d
       3: dmul
       4: iload_1
       5: i2d
       6: dmul
       7: dconst_1
       8: iload_0
       9: i2d
      10: dmul
      11: iload_0
      12: i2d
      13: dmul
      14: dsub
      15: invokestatic  #12                 // Method java/lang/Math.sqrt:(D)D
      18: invokestatic  #21                 // Method java/lang/Math.rint:(D)D
      21: d2i
      22: ireturn

  private static final boolean skips(int, int, int);
    Code:
       0: iload_1
       1: iload_0
       2: invokestatic  #26                 // Method y:(II)I
       5: istore_3
       6: iload_1
       7: iload_0
       8: iconst_1
       9: iadd
      10: invokestatic  #26                 // Method y:(II)I
      13: istore        4
      15: iload_3
      16: iload_2
      17: if_icmpge     24
      20: iconst_1
      21: goto          25
      24: iconst_0
      25: iload_2
      26: iload         4
      28: if_icmpge     35
      31: iconst_1
      32: goto          36
      35: iconst_0
      36: iand
      37: ireturn

  private static final int research2(int);
    Code:
       0: iload_0
       1: iconst_1
       2: iadd
       3: newarray       int
       5: astore_1
       6: iconst_0
       7: istore_2
       8: iload_2
       9: iload_0
      10: if_icmpgt     166
      13: iload_2
      14: sipush        1000
      17: irem
      18: ifne          28
      21: getstatic     #36                 // Field java/lang/System.err:Ljava/io/PrintStream;
      24: iload_2
      25: invokevirtual #42                 // Method java/io/PrintStream.println:(I)V
      28: iconst_0
      29: istore_3
      30: iload_3
      31: iload_0
      32: if_icmpgt     155
      35: iload_3
      36: iload_2
      37: invokestatic  #44                 // Method rFloor:(II)I
      40: istore        4
      42: iload         4
      44: iload_0
      45: if_icmpgt     155
      48: iload         4
      50: iload_3
      51: iload_2
      52: invokestatic  #46                 // Method skips:(III)Z
      55: iload         4
      57: iload_2
      58: iload_3
      59: invokestatic  #46                 // Method skips:(III)Z
      62: iand
      63: istore        5
      65: iload         5
      67: ifeq          144
      70: dconst_1
      71: iload_3
      72: i2d
      73: dmul
      74: iload_3
      75: i2d
      76: dmul
      77: dconst_1
      78: iload_2
      79: i2d
      80: dmul
      81: iload_2
      82: i2d
      83: dmul
      84: dadd
      85: invokestatic  #12                 // Method java/lang/Math.sqrt:(D)D
      88: invokestatic  #21                 // Method java/lang/Math.rint:(D)D
      91: d2i
      92: istore        6
      94: iload         6
      96: iload_0
      97: if_icmpgt     144
     100: aload_1
     101: iload         6
     103: iaload
     104: istore        7
     106: aload_1
     107: iload         6
     109: iload         7
     111: iconst_1
     112: iadd
     113: iastore
     114: new           #48                 // class java/lang/StringBuilder
     117: dup
     118: invokespecial #52                 // Method java/lang/StringBuilder."<init>":()V
     121: iload_3
     122: invokevirtual #56                 // Method java/lang/StringBuilder.append:(I)Ljava/lang/StringBuilder;
     125: bipush        32
     127: invokevirtual #59                 // Method java/lang/StringBuilder.append:(C)Ljava/lang/StringBuilder;
     130: iload_2
     131: invokevirtual #56                 // Method java/lang/StringBuilder.append:(I)Ljava/lang/StringBuilder;
     134: invokevirtual #63                 // Method java/lang/StringBuilder.toString:()Ljava/lang/String;
     137: getstatic     #66                 // Field java/lang/System.out:Ljava/io/PrintStream;
     140: swap
     141: invokevirtual #69                 // Method java/io/PrintStream.println:(Ljava/lang/Object;)V
     144: iload_3
     145: iload_0
     146: if_icmpeq     155
     149: iinc          3, 1
     152: goto          35
     155: iload_2
     156: iload_0
     157: if_icmpeq     166
     160: iinc          2, 1
     163: goto          13
     166: aload_1
     167: invokestatic  #74                 // Method java/util/Arrays.toString:([I)Ljava/lang/String;
     170: dup
     171: ldc           #76                 // String toString(...)
     173: invokestatic  #82                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullExpressionValue:(Ljava/lang/Object;Ljava/lang/String;)V
     176: astore_2
     177: getstatic     #66                 // Field java/lang/System.out:Ljava/io/PrintStream;
     180: aload_2
     181: invokevirtual #69                 // Method java/io/PrintStream.println:(Ljava/lang/Object;)V
     184: iconst_0
     185: ireturn

  private static final long solve();
    Code:
       0: ldc2_w        #91                 // long 777l
       3: lreturn

  public static final void main();
    Code:
       0: sipush        500
       3: invokestatic  #95                 // Method research2:(I)I
       6: pop
       7: return

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

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

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

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


package gcj.y2022.round2
import kotlin.math.round
import kotlin.math.sqrt

private fun dumb(m: Int): Int {
	val a = List(m + 2) { BooleanArray(m + 2) }
	val b = List(m + 2) { BooleanArray(m + 2) }
	for (r in 0..m) {
		for (x in 0..r) {
			val y = round(sqrt(1.0 * r * r - x * x)).toInt()
			b[x][y] = true
			b[y][x] = true
		}
	}
	var res = 0
	for (x in 0..m + 1) for (y in 0..m + 1) {
		a[x][y] = round(sqrt(1.0 * x * x + y * y)) <= m
		if (a[x][y] != b[x][y]) {
			require(a[x][y])
			res += 1
		}
	}
	return res
}

private fun solve() = dumb(readInt()) * 4L

fun main() = repeat(readInt()) { println("Case #${it + 1}: ${solve()}") }

private fun readLn() = readLine()!!
private fun readInt() = readLn().toInt()

Compiled from "b_small.kt"
public final class gcj.y2022.round2.B_smallKt {
  private static final int dumb(int);
    Code:
       0: iload_0
       1: iconst_2
       2: iadd
       3: istore_2
       4: new           #8                  // class java/util/ArrayList
       7: dup
       8: iload_2
       9: invokespecial #12                 // Method java/util/ArrayList."<init>":(I)V
      12: astore_3
      13: iconst_0
      14: istore        4
      16: iload         4
      18: iload_2
      19: if_icmpge     54
      22: iload         4
      24: istore        5
      26: aload_3
      27: iload         5
      29: istore        6
      31: astore        10
      33: iconst_0
      34: istore        7
      36: iload_0
      37: iconst_2
      38: iadd
      39: newarray       boolean
      41: aload         10
      43: swap
      44: invokevirtual #16                 // Method java/util/ArrayList.add:(Ljava/lang/Object;)Z
      47: pop
      48: iinc          4, 1
      51: goto          16
      54: aload_3
      55: checkcast     #18                 // class java/util/List
      58: astore_1
      59: iload_0
      60: iconst_2
      61: iadd
      62: istore_3
      63: new           #8                  // class java/util/ArrayList
      66: dup
      67: iload_3
      68: invokespecial #12                 // Method java/util/ArrayList."<init>":(I)V
      71: astore        4
      73: iconst_0
      74: istore        5
      76: iload         5
      78: iload_3
      79: if_icmpge     115
      82: iload         5
      84: istore        6
      86: aload         4
      88: iload         6
      90: istore        7
      92: astore        10
      94: iconst_0
      95: istore        8
      97: iload_0
      98: iconst_2
      99: iadd
     100: newarray       boolean
     102: aload         10
     104: swap
     105: invokevirtual #16                 // Method java/util/ArrayList.add:(Ljava/lang/Object;)Z
     108: pop
     109: iinc          5, 1
     112: goto          76
     115: aload         4
     117: checkcast     #18                 // class java/util/List
     120: astore_2
     121: iconst_0
     122: istore_3
     123: iload_3
     124: iload_0
     125: if_icmpgt     213
     128: iconst_0
     129: istore        4
     131: iload         4
     133: iload_3
     134: if_icmpgt     202
     137: dconst_1
     138: iload_3
     139: i2d
     140: dmul
     141: iload_3
     142: i2d
     143: dmul
     144: iload         4
     146: iload         4
     148: imul
     149: i2d
     150: dsub
     151: invokestatic  #24                 // Method java/lang/Math.sqrt:(D)D
     154: invokestatic  #27                 // Method java/lang/Math.rint:(D)D
     157: d2i
     158: istore        5
     160: aload_2
     161: iload         4
     163: invokeinterface #31,  2           // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     168: checkcast     #33                 // class "[Z"
     171: iload         5
     173: iconst_1
     174: bastore
     175: aload_2
     176: iload         5
     178: invokeinterface #31,  2           // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     183: checkcast     #33                 // class "[Z"
     186: iload         4
     188: iconst_1
     189: bastore
     190: iload         4
     192: iload_3
     193: if_icmpeq     202
     196: iinc          4, 1
     199: goto          137
     202: iload_3
     203: iload_0
     204: if_icmpeq     213
     207: iinc          3, 1
     210: goto          128
     213: iconst_0
     214: istore_3
     215: iconst_0
     216: istore        4
     218: iload_0
     219: iconst_1
     220: iadd
     221: istore        5
     223: iload         4
     225: iload         5
     227: if_icmpgt     386
     230: iconst_0
     231: istore        6
     233: iload_0
     234: iconst_1
     235: iadd
     236: istore        7
     238: iload         6
     240: iload         7
     242: if_icmpgt     373
     245: aload_1
     246: iload         4
     248: invokeinterface #31,  2           // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     253: checkcast     #33                 // class "[Z"
     256: iload         6
     258: dconst_1
     259: iload         4
     261: i2d
     262: dmul
     263: iload         4
     265: i2d
     266: dmul
     267: iload         6
     269: iload         6
     271: imul
     272: i2d
     273: dadd
     274: invokestatic  #24                 // Method java/lang/Math.sqrt:(D)D
     277: invokestatic  #27                 // Method java/lang/Math.rint:(D)D
     280: iload_0
     281: i2d
     282: dcmpg
     283: ifgt          290
     286: iconst_1
     287: goto          291
     290: iconst_0
     291: bastore
     292: aload_1
     293: iload         4
     295: invokeinterface #31,  2           // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     300: checkcast     #33                 // class "[Z"
     303: iload         6
     305: baload
     306: aload_2
     307: iload         4
     309: invokeinterface #31,  2           // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     314: checkcast     #33                 // class "[Z"
     317: iload         6
     319: baload
     320: if_icmpeq     360
     323: aload_1
     324: iload         4
     326: invokeinterface #31,  2           // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     331: checkcast     #33                 // class "[Z"
     334: iload         6
     336: baload
     337: ifne          357
     340: ldc           #35                 // String Failed requirement.
     342: astore        9
     344: new           #37                 // class java/lang/IllegalArgumentException
     347: dup
     348: aload         9
     350: invokevirtual #41                 // Method java/lang/Object.toString:()Ljava/lang/String;
     353: invokespecial #44                 // Method java/lang/IllegalArgumentException."<init>":(Ljava/lang/String;)V
     356: athrow
     357: iinc          3, 1
     360: iload         6
     362: iload         7
     364: if_icmpeq     373
     367: iinc          6, 1
     370: goto          245
     373: iload         4
     375: iload         5
     377: if_icmpeq     386
     380: iinc          4, 1
     383: goto          230
     386: iload_3
     387: ireturn

  private static final long solve();
    Code:
       0: invokestatic  #62                 // Method readInt:()I
       3: invokestatic  #64                 // Method dumb:(I)I
       6: i2l
       7: ldc2_w        #65                 // long 4l
      10: lmul
      11: lreturn

  public static final void main();
    Code:
       0: invokestatic  #62                 // Method readInt:()I
       3: istore_0
       4: iconst_0
       5: istore_1
       6: iload_1
       7: iload_0
       8: if_icmpge     61
      11: iload_1
      12: istore_2
      13: iconst_0
      14: istore_3
      15: new           #70                 // class java/lang/StringBuilder
      18: dup
      19: invokespecial #72                 // Method java/lang/StringBuilder."<init>":()V
      22: ldc           #74                 // String Case #
      24: invokevirtual #78                 // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
      27: iload_2
      28: iconst_1
      29: iadd
      30: invokevirtual #81                 // Method java/lang/StringBuilder.append:(I)Ljava/lang/StringBuilder;
      33: ldc           #83                 // String :
      35: invokevirtual #78                 // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
      38: invokestatic  #85                 // Method solve:()J
      41: invokevirtual #88                 // Method java/lang/StringBuilder.append:(J)Ljava/lang/StringBuilder;
      44: invokevirtual #89                 // Method java/lang/StringBuilder.toString:()Ljava/lang/String;
      47: getstatic     #95                 // Field java/lang/System.out:Ljava/io/PrintStream;
      50: swap
      51: invokevirtual #101                // Method java/io/PrintStream.println:(Ljava/lang/Object;)V
      54: nop
      55: iinc          1, 1
      58: goto          6
      61: return

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

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

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


package gcj.y2022.kickstart_c

private fun solve(): String {
	val (n, len) = readInts()
	val ants = List(n) { readInts() }
	val falls = ants.map { ant ->
		(if (ant[1] == 0) ant[0] else len - ant[0]) to ant[1]
	}.sortedBy { it.first }
	val order = ants.withIndex().sortedBy { it.value[0] }.map { it.index }
	var low = 0
	var high = n
	val timeOfFall = IntArray(n)
	for (fall in falls) {
		if (fall.second == 0) {
			timeOfFall[order[low]] = fall.first
			low++
		} else {
			high--
			timeOfFall[order[high]] = fall.first
		}
	}
	return timeOfFall.indices.sortedBy { timeOfFall[it] }.map { it + 1 }.joinToString(" ")
}

fun main() = repeat(readInt()) { println("Case #${it + 1}: ${solve()}") }

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

Compiled from "Comparisons.kt"
public final class gcj.y2022.kickstart_c.CKt$solve$$inlined$sortedBy$2<T> implements java.util.Comparator {
  public gcj.y2022.kickstart_c.CKt$solve$$inlined$sortedBy$2();
    Code:
       0: aload_0
       1: invokespecial #16                 // Method java/lang/Object."<init>":()V
       4: return

  public final int compare(T, T);
    Code:
       0: aload_1
       1: checkcast     #23                 // class kotlin/collections/IndexedValue
       4: astore_3
       5: iconst_0
       6: istore        4
       8: aload_3
       9: invokevirtual #27                 // Method kotlin/collections/IndexedValue.getValue:()Ljava/lang/Object;
      12: checkcast     #29                 // class java/util/List
      15: iconst_0
      16: invokeinterface #33,  2           // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
      21: checkcast     #35                 // class java/lang/Integer
      24: checkcast     #37                 // class java/lang/Comparable
      27: aload_2
      28: checkcast     #23                 // class kotlin/collections/IndexedValue
      31: astore_3
      32: astore        5
      34: iconst_0
      35: istore        4
      37: aload_3
      38: invokevirtual #27                 // Method kotlin/collections/IndexedValue.getValue:()Ljava/lang/Object;
      41: checkcast     #29                 // class java/util/List
      44: iconst_0
      45: invokeinterface #33,  2           // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
      50: checkcast     #35                 // class java/lang/Integer
      53: aload         5
      55: swap
      56: checkcast     #37                 // class java/lang/Comparable
      59: invokestatic  #43                 // Method kotlin/comparisons/ComparisonsKt.compareValues:(Ljava/lang/Comparable;Ljava/lang/Comparable;)I
      62: ireturn
}

Compiled from "c.kt"
public final class gcj.y2022.kickstart_c.CKt {
  private static final java.lang.String solve();
    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     82
      51: iload         5
      53: istore        6
      55: aload         4
      57: iload         6
      59: istore        7
      61: astore        18
      63: iconst_0
      64: istore        8
      66: invokestatic  #10                 // Method readInts:()Ljava/util/List;
      69: aload         18
      71: swap
      72: invokevirtual #32                 // Method java/util/ArrayList.add:(Ljava/lang/Object;)Z
      75: pop
      76: iinc          5, 1
      79: goto          45
      82: aload         4
      84: checkcast     #12                 // class java/util/List
      87: astore_3
      88: aload_3
      89: checkcast     #34                 // class java/lang/Iterable
      92: astore        5
      94: iconst_0
      95: istore        6
      97: aload         5
      99: astore        7
     101: new           #24                 // class java/util/ArrayList
     104: dup
     105: aload         5
     107: bipush        10
     109: invokestatic  #40                 // Method kotlin/collections/CollectionsKt.collectionSizeOrDefault:(Ljava/lang/Iterable;I)I
     112: invokespecial #28                 // Method java/util/ArrayList."<init>":(I)V
     115: checkcast     #42                 // class java/util/Collection
     118: astore        8
     120: iconst_0
     121: istore        9
     123: aload         7
     125: invokeinterface #46,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     130: astore        10
     132: aload         10
     134: invokeinterface #52,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     139: ifeq          241
     142: aload         10
     144: invokeinterface #56,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     149: astore        11
     151: aload         8
     153: aload         11
     155: checkcast     #12                 // class java/util/List
     158: astore        12
     160: astore        18
     162: iconst_0
     163: istore        13
     165: aload         12
     167: iconst_1
     168: invokeinterface #16,  2           // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     173: checkcast     #18                 // class java/lang/Number
     176: invokevirtual #22                 // Method java/lang/Number.intValue:()I
     179: ifne          199
     182: aload         12
     184: iconst_0
     185: invokeinterface #16,  2           // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     190: checkcast     #18                 // class java/lang/Number
     193: invokevirtual #22                 // Method java/lang/Number.intValue:()I
     196: goto          215
     199: iload_2
     200: aload         12
     202: iconst_0
     203: invokeinterface #16,  2           // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     208: checkcast     #18                 // class java/lang/Number
     211: invokevirtual #22                 // Method java/lang/Number.intValue:()I
     214: isub
     215: invokestatic  #62                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     218: aload         12
     220: iconst_1
     221: invokeinterface #16,  2           // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     226: invokestatic  #68                 // Method kotlin/TuplesKt.to:(Ljava/lang/Object;Ljava/lang/Object;)Lkotlin/Pair;
     229: aload         18
     231: swap
     232: invokeinterface #69,  2           // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     237: pop
     238: goto          132
     241: aload         8
     243: checkcast     #12                 // class java/util/List
     246: nop
     247: checkcast     #34                 // class java/lang/Iterable
     250: astore        5
     252: nop
     253: iconst_0
     254: istore        6
     256: aload         5
     258: new           #71                 // class gcj/y2022/kickstart_c/CKt$solve$$inlined$sortedBy$1
     261: dup
     262: invokespecial #74                 // Method gcj/y2022/kickstart_c/CKt$solve$$inlined$sortedBy$1."<init>":()V
     265: checkcast     #76                 // class java/util/Comparator
     268: invokestatic  #80                 // Method kotlin/collections/CollectionsKt.sortedWith:(Ljava/lang/Iterable;Ljava/util/Comparator;)Ljava/util/List;
     271: astore        4
     273: aload_3
     274: checkcast     #34                 // class java/lang/Iterable
     277: invokestatic  #84                 // Method kotlin/collections/CollectionsKt.withIndex:(Ljava/lang/Iterable;)Ljava/lang/Iterable;
     280: astore        6
     282: iconst_0
     283: istore        7
     285: aload         6
     287: new           #86                 // class gcj/y2022/kickstart_c/CKt$solve$$inlined$sortedBy$2
     290: dup
     291: invokespecial #87                 // Method gcj/y2022/kickstart_c/CKt$solve$$inlined$sortedBy$2."<init>":()V
     294: checkcast     #76                 // class java/util/Comparator
     297: invokestatic  #80                 // Method kotlin/collections/CollectionsKt.sortedWith:(Ljava/lang/Iterable;Ljava/util/Comparator;)Ljava/util/List;
     300: checkcast     #34                 // class java/lang/Iterable
     303: astore        6
     305: nop
     306: iconst_0
     307: istore        7
     309: aload         6
     311: astore        8
     313: new           #24                 // class java/util/ArrayList
     316: dup
     317: aload         6
     319: bipush        10
     321: invokestatic  #40                 // Method kotlin/collections/CollectionsKt.collectionSizeOrDefault:(Ljava/lang/Iterable;I)I
     324: invokespecial #28                 // Method java/util/ArrayList."<init>":(I)V
     327: checkcast     #42                 // class java/util/Collection
     330: astore        9
     332: iconst_0
     333: istore        10
     335: aload         8
     337: invokeinterface #46,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     342: astore        11
     344: aload         11
     346: invokeinterface #52,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     351: ifeq          397
     354: aload         11
     356: invokeinterface #56,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     361: astore        12
     363: aload         9
     365: aload         12
     367: checkcast     #89                 // class kotlin/collections/IndexedValue
     370: astore        13
     372: astore        18
     374: iconst_0
     375: istore        14
     377: aload         13
     379: invokevirtual #92                 // Method kotlin/collections/IndexedValue.getIndex:()I
     382: invokestatic  #62                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     385: aload         18
     387: swap
     388: invokeinterface #69,  2           // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     393: pop
     394: goto          344
     397: aload         9
     399: checkcast     #12                 // class java/util/List
     402: nop
     403: astore        5
     405: iconst_0
     406: istore        6
     408: iload_1
     409: istore        7
     411: iload_1
     412: newarray       int
     414: astore        8
     416: aload         4
     418: invokeinterface #93,  1           // InterfaceMethod java/util/List.iterator:()Ljava/util/Iterator;
     423: astore        9
     425: aload         9
     427: invokeinterface #52,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     432: ifeq          534
     435: aload         9
     437: invokeinterface #56,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     442: checkcast     #95                 // class kotlin/Pair
     445: astore        10
     447: aload         10
     449: invokevirtual #98                 // Method kotlin/Pair.getSecond:()Ljava/lang/Object;
     452: checkcast     #18                 // class java/lang/Number
     455: invokevirtual #22                 // Method java/lang/Number.intValue:()I
     458: ifne          499
     461: aload         8
     463: aload         5
     465: iload         6
     467: invokeinterface #16,  2           // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     472: checkcast     #18                 // class java/lang/Number
     475: invokevirtual #22                 // Method java/lang/Number.intValue:()I
     478: aload         10
     480: invokevirtual #101                // Method kotlin/Pair.getFirst:()Ljava/lang/Object;
     483: checkcast     #18                 // class java/lang/Number
     486: invokevirtual #22                 // Method java/lang/Number.intValue:()I
     489: iastore
     490: iload         6
     492: iinc          6, 1
     495: pop
     496: goto          425
     499: iinc          7, -1
     502: aload         8
     504: aload         5
     506: iload         7
     508: invokeinterface #16,  2           // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     513: checkcast     #18                 // class java/lang/Number
     516: invokevirtual #22                 // Method java/lang/Number.intValue:()I
     519: aload         10
     521: invokevirtual #101                // Method kotlin/Pair.getFirst:()Ljava/lang/Object;
     524: checkcast     #18                 // class java/lang/Number
     527: invokevirtual #22                 // Method java/lang/Number.intValue:()I
     530: iastore
     531: goto          425
     534: aload         8
     536: invokestatic  #107                // Method kotlin/collections/ArraysKt.getIndices:([I)Lkotlin/ranges/IntRange;
     539: checkcast     #34                 // class java/lang/Iterable
     542: astore        9
     544: iconst_0
     545: istore        10
     547: aload         9
     549: new           #109                // class gcj/y2022/kickstart_c/CKt$solve$$inlined$sortedBy$3
     552: dup
     553: aload         8
     555: invokespecial #112                // Method gcj/y2022/kickstart_c/CKt$solve$$inlined$sortedBy$3."<init>":([I)V
     558: checkcast     #76                 // class java/util/Comparator
     561: invokestatic  #80                 // Method kotlin/collections/CollectionsKt.sortedWith:(Ljava/lang/Iterable;Ljava/util/Comparator;)Ljava/util/List;
     564: checkcast     #34                 // class java/lang/Iterable
     567: astore        9
     569: nop
     570: iconst_0
     571: istore        10
     573: aload         9
     575: astore        11
     577: new           #24                 // class java/util/ArrayList
     580: dup
     581: aload         9
     583: bipush        10
     585: invokestatic  #40                 // Method kotlin/collections/CollectionsKt.collectionSizeOrDefault:(Ljava/lang/Iterable;I)I
     588: invokespecial #28                 // Method java/util/ArrayList."<init>":(I)V
     591: checkcast     #42                 // class java/util/Collection
     594: astore        12
     596: iconst_0
     597: istore        13
     599: aload         11
     601: invokeinterface #46,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     606: astore        14
     608: aload         14
     610: invokeinterface #52,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     615: ifeq          663
     618: aload         14
     620: invokeinterface #56,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     625: astore        15
     627: aload         12
     629: aload         15
     631: checkcast     #18                 // class java/lang/Number
     634: invokevirtual #22                 // Method java/lang/Number.intValue:()I
     637: istore        16
     639: astore        18
     641: iconst_0
     642: istore        17
     644: iload         16
     646: iconst_1
     647: iadd
     648: invokestatic  #62                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     651: aload         18
     653: swap
     654: invokeinterface #69,  2           // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     659: pop
     660: goto          608
     663: aload         12
     665: checkcast     #12                 // class java/util/List
     668: nop
     669: checkcast     #34                 // class java/lang/Iterable
     672: ldc           #114                // String
     674: checkcast     #116                // class java/lang/CharSequence
     677: aconst_null
     678: aconst_null
     679: iconst_0
     680: aconst_null
     681: aconst_null
     682: bipush        62
     684: aconst_null
     685: invokestatic  #120                // 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;
     688: areturn

  public static final void main();
    Code:
       0: invokestatic  #156                // Method readInt:()I
       3: istore_0
       4: iconst_0
       5: istore_1
       6: iload_1
       7: iload_0
       8: if_icmpge     61
      11: iload_1
      12: istore_2
      13: iconst_0
      14: istore_3
      15: new           #158                // class java/lang/StringBuilder
      18: dup
      19: invokespecial #159                // Method java/lang/StringBuilder."<init>":()V
      22: ldc           #161                // String Case #
      24: invokevirtual #165                // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
      27: iload_2
      28: iconst_1
      29: iadd
      30: invokevirtual #168                // Method java/lang/StringBuilder.append:(I)Ljava/lang/StringBuilder;
      33: ldc           #170                // String :
      35: invokevirtual #165                // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
      38: invokestatic  #172                // Method solve:()Ljava/lang/String;
      41: invokevirtual #165                // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
      44: invokevirtual #175                // Method java/lang/StringBuilder.toString:()Ljava/lang/String;
      47: getstatic     #181                // Field java/lang/System.out:Ljava/io/PrintStream;
      50: swap
      51: invokevirtual #187                // Method java/io/PrintStream.println:(Ljava/lang/Object;)V
      54: nop
      55: iinc          1, 1
      58: goto          6
      61: return

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

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

  private static final java.util.List<java.lang.String> readStrings();
    Code:
       0: invokestatic  #201                // Method readLn:()Ljava/lang/String;
       3: checkcast     #116                // class java/lang/CharSequence
       6: iconst_1
       7: anewarray     #209                // class java/lang/String
      10: astore_0
      11: aload_0
      12: iconst_0
      13: ldc           #114                // String
      15: aastore
      16: aload_0
      17: iconst_0
      18: iconst_0
      19: bipush        6
      21: aconst_null
      22: invokestatic  #215                // 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  #218                // Method readStrings:()Ljava/util/List;
       3: checkcast     #34                 // 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  #40                 // Method kotlin/collections/CollectionsKt.collectionSizeOrDefault:(Ljava/lang/Iterable;I)I
      21: invokespecial #28                 // Method java/util/ArrayList."<init>":(I)V
      24: checkcast     #42                 // class java/util/Collection
      27: astore_3
      28: iconst_0
      29: istore        4
      31: aload_2
      32: invokeinterface #46,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
      37: astore        5
      39: aload         5
      41: invokeinterface #52,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
      46: ifeq          92
      49: aload         5
      51: invokeinterface #56,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
      56: astore        6
      58: aload_3
      59: aload         6
      61: checkcast     #209                // class java/lang/String
      64: astore        7
      66: astore        9
      68: iconst_0
      69: istore        8
      71: aload         7
      73: invokestatic  #205                // Method java/lang/Integer.parseInt:(Ljava/lang/String;)I
      76: nop
      77: invokestatic  #62                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
      80: aload         9
      82: swap
      83: invokeinterface #69,  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  #223                // Method main:()V
       3: return
}

Compiled from "Comparisons.kt"
public final class gcj.y2022.kickstart_c.CKt$solve$$inlined$sortedBy$1<T> implements java.util.Comparator {
  public gcj.y2022.kickstart_c.CKt$solve$$inlined$sortedBy$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_1
       1: checkcast     #23                 // class kotlin/Pair
       4: astore_3
       5: iconst_0
       6: istore        4
       8: aload_3
       9: invokevirtual #27                 // Method kotlin/Pair.getFirst:()Ljava/lang/Object;
      12: checkcast     #29                 // class java/lang/Integer
      15: checkcast     #31                 // class java/lang/Comparable
      18: aload_2
      19: checkcast     #23                 // class kotlin/Pair
      22: astore_3
      23: astore        5
      25: iconst_0
      26: istore        4
      28: aload_3
      29: invokevirtual #27                 // Method kotlin/Pair.getFirst:()Ljava/lang/Object;
      32: checkcast     #29                 // class java/lang/Integer
      35: aload         5
      37: swap
      38: checkcast     #31                 // class java/lang/Comparable
      41: invokestatic  #37                 // Method kotlin/comparisons/ComparisonsKt.compareValues:(Ljava/lang/Comparable;Ljava/lang/Comparable;)I
      44: ireturn
}

Compiled from "Comparisons.kt"
public final class gcj.y2022.kickstart_c.CKt$solve$$inlined$sortedBy$3<T> implements java.util.Comparator {
  final int[] $timeOfFall$inlined;

  public gcj.y2022.kickstart_c.CKt$solve$$inlined$sortedBy$3(int[]);
    Code:
       0: aload_0
       1: aload_1
       2: putfield      #18                 // Field $timeOfFall$inlined:[I
       5: aload_0
       6: invokespecial #21                 // Method java/lang/Object."<init>":()V
       9: return

  public final int compare(T, T);
    Code:
       0: aload_1
       1: checkcast     #28                 // class java/lang/Number
       4: invokevirtual #32                 // Method java/lang/Number.intValue:()I
       7: istore_3
       8: iconst_0
       9: istore        4
      11: aload_0
      12: getfield      #18                 // Field $timeOfFall$inlined:[I
      15: iload_3
      16: iaload
      17: invokestatic  #38                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
      20: checkcast     #40                 // class java/lang/Comparable
      23: aload_2
      24: checkcast     #28                 // class java/lang/Number
      27: invokevirtual #32                 // Method java/lang/Number.intValue:()I
      30: istore_3
      31: astore        5
      33: iconst_0
      34: istore        4
      36: aload_0
      37: getfield      #18                 // Field $timeOfFall$inlined:[I
      40: iload_3
      41: iaload
      42: invokestatic  #38                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
      45: aload         5
      47: swap
      48: checkcast     #40                 // class java/lang/Comparable
      51: invokestatic  #46                 // Method kotlin/comparisons/ComparisonsKt.compareValues:(Ljava/lang/Comparable;Ljava/lang/Comparable;)I
      54: ireturn
}


package gcj.y2022.kickstart_c

const val M = 1000000007

private fun solve(): Int {
	val n = readInt()
	val s = readLn()
	val a = List(n + 1) { List(n + 1) { IntArray(n + 1) } }
	for (i in n downTo 0) for (j in i..n) for (k in 0..j - i) {
		if (k == 0) {
			a[i][j][k] = 1
			continue
		}
		if (k == 1) {
			a[i][j][k] = j - i
			continue
		}
		a[i][j][k] = (a[i][j - 1][k].toModular() + a[i + 1][j][k].toModular() - a[i + 1][j - 1][k].toModular()).x
		if (s[i] == s[j - 1]) {
			a[i][j][k] = (a[i][j][k].toModular() + a[i + 1][j - 1][k - 2].toModular()).x
		}
	}
	val cnk = List(n + 1) { IntArray(n + 1) }
	for (i in cnk.indices) {
		cnk[i][0] = 1
		cnk[i][i] = 1
		for (j in 1 until i) cnk[i][j] = (cnk[i - 1][j - 1].toModular() + cnk[i - 1][j].toModular()).x
	}
	var ans = 0.toModular()
	for (i in 0 until n) {
		ans += a[0][n][i].toModular().div(cnk[n][i].toModular())
	}
	return ans.x
}

fun main() = repeat(readInt()) { println("Case #${it + 1}: ${solve()}") }

private fun readLn() = readLine()!!
private fun readInt() = readLn().toInt()

private fun Int.toModular() = Modular(this)//toDouble()
private class Modular {
	val x: Int
	@Suppress("ConvertSecondaryConstructorToPrimary")
	constructor(value: Int) { x = (value % M).let { if (it < 0) it + M else it } }
	operator fun plus(that: Modular) = Modular((x + that.x) % M)
	operator fun minus(that: Modular) = Modular((x + M - that.x) % M)
	operator fun times(that: Modular) = (x.toLong() * that.x % M).toInt().toModular()
	private fun modInverse() = Modular(x.toBigInteger().modInverse(M.toBigInteger()).toInt())
	operator fun div(that: Modular) = times(that.modInverse())
	override fun toString() = x.toString()
}
private operator fun Int.plus(that: Modular) = Modular(this) + that
private operator fun Int.minus(that: Modular) = Modular(this) - that
private operator fun Int.times(that: Modular) = Modular(this) * that
private operator fun Int.div(that: Modular) = Modular(this) / that

Compiled from "d.kt"
public final class gcj.y2022.kickstart_c.DKt {
  public static final int M;

  private static final int solve();
    Code:
       0: invokestatic  #9                  // Method readInt:()I
       3: istore_0
       4: invokestatic  #13                 // Method readLn:()Ljava/lang/String;
       7: astore_1
       8: iload_0
       9: iconst_1
      10: iadd
      11: istore_3
      12: new           #15                 // class java/util/ArrayList
      15: dup
      16: iload_3
      17: invokespecial #19                 // Method java/util/ArrayList."<init>":(I)V
      20: astore        4
      22: iconst_0
      23: istore        5
      25: iload         5
      27: iload_3
      28: if_icmpge     124
      31: iload         5
      33: istore        6
      35: aload         4
      37: iload         6
      39: istore        7
      41: astore        16
      43: iconst_0
      44: istore        8
      46: iload_0
      47: iconst_1
      48: iadd
      49: istore        9
      51: new           #15                 // class java/util/ArrayList
      54: dup
      55: iload         9
      57: invokespecial #19                 // Method java/util/ArrayList."<init>":(I)V
      60: astore        10
      62: iconst_0
      63: istore        11
      65: iload         11
      67: iload         9
      69: if_icmpge     105
      72: iload         11
      74: istore        12
      76: aload         10
      78: iload         12
      80: istore        13
      82: astore        14
      84: iconst_0
      85: istore        15
      87: iload_0
      88: iconst_1
      89: iadd
      90: newarray       int
      92: aload         14
      94: swap
      95: invokevirtual #23                 // Method java/util/ArrayList.add:(Ljava/lang/Object;)Z
      98: pop
      99: iinc          11, 1
     102: goto          65
     105: aload         10
     107: checkcast     #25                 // class java/util/List
     110: nop
     111: aload         16
     113: swap
     114: invokevirtual #23                 // Method java/util/ArrayList.add:(Ljava/lang/Object;)Z
     117: pop
     118: iinc          5, 1
     121: goto          25
     124: aload         4
     126: checkcast     #25                 // class java/util/List
     129: astore_2
     130: iload_0
     131: istore_3
     132: iconst_m1
     133: iload_3
     134: if_icmpge     482
     137: iload_3
     138: istore        4
     140: iload         4
     142: iload_0
     143: if_icmpgt     476
     146: iconst_0
     147: istore        5
     149: iload         4
     151: iload_3
     152: isub
     153: istore        6
     155: iload         5
     157: iload         6
     159: if_icmpgt     464
     162: iload         5
     164: ifne          194
     167: aload_2
     168: iload_3
     169: invokeinterface #29,  2           // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     174: checkcast     #25                 // class java/util/List
     177: iload         4
     179: invokeinterface #29,  2           // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     184: checkcast     #31                 // class "[I"
     187: iload         5
     189: iconst_1
     190: iastore
     191: goto          451
     194: iload         5
     196: iconst_1
     197: if_icmpne     230
     200: aload_2
     201: iload_3
     202: invokeinterface #29,  2           // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     207: checkcast     #25                 // class java/util/List
     210: iload         4
     212: invokeinterface #29,  2           // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     217: checkcast     #31                 // class "[I"
     220: iload         5
     222: iload         4
     224: iload_3
     225: isub
     226: iastore
     227: goto          451
     230: aload_2
     231: iload_3
     232: invokeinterface #29,  2           // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     237: checkcast     #25                 // class java/util/List
     240: iload         4
     242: invokeinterface #29,  2           // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     247: checkcast     #31                 // class "[I"
     250: iload         5
     252: aload_2
     253: iload_3
     254: invokeinterface #29,  2           // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     259: checkcast     #25                 // class java/util/List
     262: iload         4
     264: iconst_1
     265: isub
     266: invokeinterface #29,  2           // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     271: checkcast     #31                 // class "[I"
     274: iload         5
     276: iaload
     277: invokestatic  #35                 // Method toModular:(I)Lgcj/y2022/kickstart_c/Modular;
     280: aload_2
     281: iload_3
     282: iconst_1
     283: iadd
     284: invokeinterface #29,  2           // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     289: checkcast     #25                 // class java/util/List
     292: iload         4
     294: invokeinterface #29,  2           // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     299: checkcast     #31                 // class "[I"
     302: iload         5
     304: iaload
     305: invokestatic  #35                 // Method toModular:(I)Lgcj/y2022/kickstart_c/Modular;
     308: invokevirtual #41                 // Method gcj/y2022/kickstart_c/Modular.plus:(Lgcj/y2022/kickstart_c/Modular;)Lgcj/y2022/kickstart_c/Modular;
     311: aload_2
     312: iload_3
     313: iconst_1
     314: iadd
     315: invokeinterface #29,  2           // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     320: checkcast     #25                 // class java/util/List
     323: iload         4
     325: iconst_1
     326: isub
     327: invokeinterface #29,  2           // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     332: checkcast     #31                 // class "[I"
     335: iload         5
     337: iaload
     338: invokestatic  #35                 // Method toModular:(I)Lgcj/y2022/kickstart_c/Modular;
     341: invokevirtual #44                 // Method gcj/y2022/kickstart_c/Modular.minus:(Lgcj/y2022/kickstart_c/Modular;)Lgcj/y2022/kickstart_c/Modular;
     344: invokevirtual #47                 // Method gcj/y2022/kickstart_c/Modular.getX:()I
     347: iastore
     348: aload_1
     349: iload_3
     350: invokevirtual #53                 // Method java/lang/String.charAt:(I)C
     353: aload_1
     354: iload         4
     356: iconst_1
     357: isub
     358: invokevirtual #53                 // Method java/lang/String.charAt:(I)C
     361: if_icmpne     451
     364: aload_2
     365: iload_3
     366: invokeinterface #29,  2           // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     371: checkcast     #25                 // class java/util/List
     374: iload         4
     376: invokeinterface #29,  2           // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     381: checkcast     #31                 // class "[I"
     384: iload         5
     386: aload_2
     387: iload_3
     388: invokeinterface #29,  2           // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     393: checkcast     #25                 // class java/util/List
     396: iload         4
     398: invokeinterface #29,  2           // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     403: checkcast     #31                 // class "[I"
     406: iload         5
     408: iaload
     409: invokestatic  #35                 // Method toModular:(I)Lgcj/y2022/kickstart_c/Modular;
     412: aload_2
     413: iload_3
     414: iconst_1
     415: iadd
     416: invokeinterface #29,  2           // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     421: checkcast     #25                 // class java/util/List
     424: iload         4
     426: iconst_1
     427: isub
     428: invokeinterface #29,  2           // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     433: checkcast     #31                 // class "[I"
     436: iload         5
     438: iconst_2
     439: isub
     440: iaload
     441: invokestatic  #35                 // Method toModular:(I)Lgcj/y2022/kickstart_c/Modular;
     444: invokevirtual #41                 // Method gcj/y2022/kickstart_c/Modular.plus:(Lgcj/y2022/kickstart_c/Modular;)Lgcj/y2022/kickstart_c/Modular;
     447: invokevirtual #47                 // Method gcj/y2022/kickstart_c/Modular.getX:()I
     450: iastore
     451: iload         5
     453: iload         6
     455: if_icmpeq     464
     458: iinc          5, 1
     461: goto          162
     464: iload         4
     466: iload_0
     467: if_icmpeq     476
     470: iinc          4, 1
     473: goto          146
     476: iinc          3, -1
     479: goto          132
     482: iload_0
     483: iconst_1
     484: iadd
     485: istore        4
     487: new           #15                 // class java/util/ArrayList
     490: dup
     491: iload         4
     493: invokespecial #19                 // Method java/util/ArrayList."<init>":(I)V
     496: astore        5
     498: iconst_0
     499: istore        6
     501: iload         6
     503: iload         4
     505: if_icmpge     541
     508: iload         6
     510: istore        7
     512: aload         5
     514: iload         7
     516: istore        8
     518: astore        16
     520: iconst_0
     521: istore        9
     523: iload_0
     524: iconst_1
     525: iadd
     526: newarray       int
     528: aload         16
     530: swap
     531: invokevirtual #23                 // Method java/util/ArrayList.add:(Ljava/lang/Object;)Z
     534: pop
     535: iinc          6, 1
     538: goto          501
     541: aload         5
     543: checkcast     #25                 // class java/util/List
     546: astore_3
     547: iconst_0
     548: istore        4
     550: aload_3
     551: checkcast     #55                 // class java/util/Collection
     554: invokeinterface #58,  1           // InterfaceMethod java/util/Collection.size:()I
     559: istore        5
     561: iload         4
     563: iload         5
     565: if_icmpge     679
     568: aload_3
     569: iload         4
     571: invokeinterface #29,  2           // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     576: checkcast     #31                 // class "[I"
     579: iconst_0
     580: iconst_1
     581: iastore
     582: aload_3
     583: iload         4
     585: invokeinterface #29,  2           // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     590: checkcast     #31                 // class "[I"
     593: iload         4
     595: iconst_1
     596: iastore
     597: iconst_1
     598: istore        6
     600: iload         6
     602: iload         4
     604: if_icmpge     673
     607: aload_3
     608: iload         4
     610: invokeinterface #29,  2           // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     615: checkcast     #31                 // class "[I"
     618: iload         6
     620: aload_3
     621: iload         4
     623: iconst_1
     624: isub
     625: invokeinterface #29,  2           // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     630: checkcast     #31                 // class "[I"
     633: iload         6
     635: iconst_1
     636: isub
     637: iaload
     638: invokestatic  #35                 // Method toModular:(I)Lgcj/y2022/kickstart_c/Modular;
     641: aload_3
     642: iload         4
     644: iconst_1
     645: isub
     646: invokeinterface #29,  2           // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     651: checkcast     #31                 // class "[I"
     654: iload         6
     656: iaload
     657: invokestatic  #35                 // Method toModular:(I)Lgcj/y2022/kickstart_c/Modular;
     660: invokevirtual #41                 // Method gcj/y2022/kickstart_c/Modular.plus:(Lgcj/y2022/kickstart_c/Modular;)Lgcj/y2022/kickstart_c/Modular;
     663: invokevirtual #47                 // Method gcj/y2022/kickstart_c/Modular.getX:()I
     666: iastore
     667: iinc          6, 1
     670: goto          600
     673: iinc          4, 1
     676: goto          561
     679: iconst_0
     680: invokestatic  #35                 // Method toModular:(I)Lgcj/y2022/kickstart_c/Modular;
     683: astore        4
     685: iconst_0
     686: istore        5
     688: iload         5
     690: iload_0
     691: if_icmpge     751
     694: aload         4
     696: aload_2
     697: iconst_0
     698: invokeinterface #29,  2           // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     703: checkcast     #25                 // class java/util/List
     706: iload_0
     707: invokeinterface #29,  2           // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     712: checkcast     #31                 // class "[I"
     715: iload         5
     717: iaload
     718: invokestatic  #35                 // Method toModular:(I)Lgcj/y2022/kickstart_c/Modular;
     721: aload_3
     722: iload_0
     723: invokeinterface #29,  2           // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     728: checkcast     #31                 // class "[I"
     731: iload         5
     733: iaload
     734: invokestatic  #35                 // Method toModular:(I)Lgcj/y2022/kickstart_c/Modular;
     737: invokevirtual #61                 // Method gcj/y2022/kickstart_c/Modular.div:(Lgcj/y2022/kickstart_c/Modular;)Lgcj/y2022/kickstart_c/Modular;
     740: invokevirtual #41                 // Method gcj/y2022/kickstart_c/Modular.plus:(Lgcj/y2022/kickstart_c/Modular;)Lgcj/y2022/kickstart_c/Modular;
     743: astore        4
     745: iinc          5, 1
     748: goto          688
     751: aload         4
     753: invokevirtual #47                 // Method gcj/y2022/kickstart_c/Modular.getX:()I
     756: ireturn

  public static final void main();
    Code:
       0: invokestatic  #9                  // Method readInt:()I
       3: istore_0
       4: iconst_0
       5: istore_1
       6: iload_1
       7: iload_0
       8: if_icmpge     61
      11: iload_1
      12: istore_2
      13: iconst_0
      14: istore_3
      15: new           #81                 // class java/lang/StringBuilder
      18: dup
      19: invokespecial #83                 // Method java/lang/StringBuilder."<init>":()V
      22: ldc           #85                 // String Case #
      24: invokevirtual #89                 // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
      27: iload_2
      28: iconst_1
      29: iadd
      30: invokevirtual #92                 // Method java/lang/StringBuilder.append:(I)Ljava/lang/StringBuilder;
      33: ldc           #94                 // String :
      35: invokevirtual #89                 // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
      38: invokestatic  #96                 // Method solve:()I
      41: invokevirtual #92                 // Method java/lang/StringBuilder.append:(I)Ljava/lang/StringBuilder;
      44: invokevirtual #99                 // Method java/lang/StringBuilder.toString:()Ljava/lang/String;
      47: getstatic     #105                // Field java/lang/System.out:Ljava/io/PrintStream;
      50: swap
      51: invokevirtual #111                // Method java/io/PrintStream.println:(Ljava/lang/Object;)V
      54: nop
      55: iinc          1, 1
      58: goto          6
      61: return

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

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

  private static final gcj.y2022.kickstart_c.Modular toModular(int);
    Code:
       0: new           #37                 // class gcj/y2022/kickstart_c/Modular
       3: dup
       4: iload_0
       5: invokespecial #129                // Method gcj/y2022/kickstart_c/Modular."<init>":(I)V
       8: areturn

  private static final gcj.y2022.kickstart_c.Modular plus(int, gcj.y2022.kickstart_c.Modular);
    Code:
       0: new           #37                 // class gcj/y2022/kickstart_c/Modular
       3: dup
       4: iload_0
       5: invokespecial #129                // Method gcj/y2022/kickstart_c/Modular."<init>":(I)V
       8: aload_1
       9: invokevirtual #41                 // Method gcj/y2022/kickstart_c/Modular.plus:(Lgcj/y2022/kickstart_c/Modular;)Lgcj/y2022/kickstart_c/Modular;
      12: areturn

  private static final gcj.y2022.kickstart_c.Modular minus(int, gcj.y2022.kickstart_c.Modular);
    Code:
       0: new           #37                 // class gcj/y2022/kickstart_c/Modular
       3: dup
       4: iload_0
       5: invokespecial #129                // Method gcj/y2022/kickstart_c/Modular."<init>":(I)V
       8: aload_1
       9: invokevirtual #44                 // Method gcj/y2022/kickstart_c/Modular.minus:(Lgcj/y2022/kickstart_c/Modular;)Lgcj/y2022/kickstart_c/Modular;
      12: areturn

  private static final gcj.y2022.kickstart_c.Modular times(int, gcj.y2022.kickstart_c.Modular);
    Code:
       0: new           #37                 // class gcj/y2022/kickstart_c/Modular
       3: dup
       4: iload_0
       5: invokespecial #129                // Method gcj/y2022/kickstart_c/Modular."<init>":(I)V
       8: aload_1
       9: invokevirtual #137                // Method gcj/y2022/kickstart_c/Modular.times:(Lgcj/y2022/kickstart_c/Modular;)Lgcj/y2022/kickstart_c/Modular;
      12: areturn

  private static final gcj.y2022.kickstart_c.Modular div(int, gcj.y2022.kickstart_c.Modular);
    Code:
       0: new           #37                 // class gcj/y2022/kickstart_c/Modular
       3: dup
       4: iload_0
       5: invokespecial #129                // Method gcj/y2022/kickstart_c/Modular."<init>":(I)V
       8: aload_1
       9: invokevirtual #61                 // Method gcj/y2022/kickstart_c/Modular.div:(Lgcj/y2022/kickstart_c/Modular;)Lgcj/y2022/kickstart_c/Modular;
      12: areturn

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

  public static final gcj.y2022.kickstart_c.Modular access$toModular(int);
    Code:
       0: iload_0
       1: invokestatic  #35                 // Method toModular:(I)Lgcj/y2022/kickstart_c/Modular;
       4: areturn
}