package atcoder.arc158

fun main() {
	readLn()
	val top = readInts()
	val bottom = readInts()
	val inf = Long.MAX_VALUE / 4
	fun solve(from: Int, to: Int): Modular {
		if (from + 1 == to) {
			return (top[from] + bottom[from]).toModular() * 3.toModularUnsafe()
		}
		val mid = (from + to) / 2
		var result = solve(from, mid) + solve(mid, to)
		val (scoresLeft, scoresRight) = List(2) { mode ->
			var bestUpTop = 0L
			var bestUpBottom = inf
			var bestDownTop = inf
			var bestDownBottom = 0L
			val range = if (mode == 1) mid until to else mid - 1 downTo from
			val rSize = if (mode == 1) to - mid else mid - from
			var scoresSum = 0.toModularUnsafe()
			val improve = LongArray(rSize * 2)
			var r = 0
			for (i in range) {
				val newBestUpTop = minOf(bestUpTop, bestUpBottom + bottom[i]) + top[i]
				val newBestUpBottom = minOf(bestUpBottom, bestUpTop + top[i]) + bottom[i]
				val newBestDownTop = minOf(bestDownTop, bestDownBottom + bottom[i]) + top[i]
				val newBestDownBottom = minOf(bestDownBottom, bestDownTop + top[i]) + bottom[i]
				scoresSum += (newBestUpTop + newBestUpBottom).toModular()
				improve[r++] = - newBestDownTop + newBestUpTop
				improve[r++] = - newBestDownBottom + newBestUpBottom
				bestUpTop = newBestUpTop; bestUpBottom = newBestUpBottom
				bestDownTop = newBestDownTop; bestDownBottom = newBestDownBottom
			}
			improve.sort()
			scoresSum to improve
		}
		val s1 = scoresLeft.first
		val s2 = scoresRight.first
		val i1 = scoresLeft.second
		val i2 = scoresRight.second
		var sc = s1 * (i2.size).toModularUnsafe() + s2 * (i1.size).toModularUnsafe()
		var j = i2.size
		var sumJ = 0.toModularUnsafe()
		for (i in i1.indices) {
			while (j >= 1 && i1[i] + i2[j - 1] > 0) {
				j--
				sumJ += i2[j].toModular()
			}
			sc -= i1[i].toModular() * (i2.size - j).toModularUnsafe()
			sc -= sumJ
		}
		result += sc * 2.toModularUnsafe()
		return result
	}
	println(solve(0, top.size))
}

private val bufferedReader = java.io.BufferedReader(java.io.InputStreamReader(System.`in`))
private fun readLn() = bufferedReader.readLine()
private fun readInt() = readLn().toInt()
private fun readStrings() = readLn().split(" ")
private fun readInts() = readStrings().map { it.toInt() }
private fun readLongs() = readStrings().map { it.toLong() }

private class Modular(val x: Int) {
	companion object {
		const val M = 998244353; val MOD_BIG_INTEGER = M.toBigInteger()
	}
	inline operator fun plus(that: Modular) = Modular((x + that.x).let { if (it >= M) it - M else it })
	inline operator fun minus(that: Modular) = Modular((x - that.x).let { if (it < 0) it + M else it })
	inline operator fun times(that: Modular) = Modular((x.toLong() * that.x % M).toInt())
	inline operator fun div(that: Modular) = times(that.inverse())
	inline fun inverse() = Modular(x.toBigInteger().modInverse(MOD_BIG_INTEGER).toInt())
	override fun toString() = x.toString()
}
private fun Int.toModularUnsafe() = Modular(this)
private fun Int.toModular() = Modular(if (this >= 0) { if (this < Modular.M) this else this % Modular.M } else { Modular.M - 1 - inv() % Modular.M })
private fun Long.toModular() = Modular((if (this >= 0) { if (this < Modular.M) this else this % Modular.M } else { Modular.M - 1 - inv() % Modular.M }).toInt())
private fun java.math.BigInteger.toModular() = Modular(mod(Modular.MOD_BIG_INTEGER).toInt())
private fun String.toModular() = Modular(fold(0L) { acc, c -> (c - '0' + 10 * acc) % Modular.M }.toInt())

private class ModularArray(val data: IntArray) {
	operator fun get(index: Int) = data[index].toModularUnsafe()
	operator fun set(index: Int, value: Modular) { data[index] = value.x }
}
private inline fun ModularArray(n: Int, init: (Int) -> Modular) = ModularArray(IntArray(n) { init(it).x })

private val factorials = mutableListOf(1.toModularUnsafe())
private fun factorial(n: Int): Modular {
	while (n >= factorials.size) factorials.add(factorials.last() * factorials.size.toModularUnsafe())
	return factorials[n]
}
private fun cnk(n: Int, k: Int) = factorial(n) / factorial(k) / factorial(n - k)

Compiled from "e.kt"
public final class atcoder.arc158.EKt {
  private static final java.io.BufferedReader bufferedReader;

  private static final java.util.List<atcoder.arc158.Modular> factorials;

  public static final void main();
    Code:
       0: invokestatic  #10                 // Method readLn:()Ljava/lang/String;
       3: pop
       4: invokestatic  #14                 // Method readInts:()Ljava/util/List;
       7: astore_0
       8: invokestatic  #14                 // Method readInts:()Ljava/util/List;
      11: astore_1
      12: ldc2_w        #15                 // long 2305843009213693951l
      15: lstore_2
      16: aload_0
      17: aload_1
      18: lload_2
      19: iconst_0
      20: aload_0
      21: invokeinterface #22,  1           // InterfaceMethod java/util/List.size:()I
      26: invokestatic  #26                 // Method main$solve:(Ljava/util/List;Ljava/util/List;JII)Latcoder/arc158/Modular;
      29: getstatic     #32                 // Field java/lang/System.out:Ljava/io/PrintStream;
      32: swap
      33: invokevirtual #38                 // Method java/io/PrintStream.println:(Ljava/lang/Object;)V
      36: return

  private static final java.lang.String readLn();
    Code:
       0: getstatic     #47                 // Field bufferedReader:Ljava/io/BufferedReader;
       3: invokevirtual #52                 // Method java/io/BufferedReader.readLine:()Ljava/lang/String;
       6: areturn

  private static final int readInt();
    Code:
       0: invokestatic  #10                 // Method readLn:()Ljava/lang/String;
       3: dup
       4: ldc           #55                 // String readLn(...)
       6: invokestatic  #61                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullExpressionValue:(Ljava/lang/Object;Ljava/lang/String;)V
       9: invokestatic  #67                 // Method java/lang/Integer.parseInt:(Ljava/lang/String;)I
      12: ireturn

  private static final java.util.List<java.lang.String> readStrings();
    Code:
       0: invokestatic  #10                 // Method readLn:()Ljava/lang/String;
       3: dup
       4: ldc           #55                 // String readLn(...)
       6: invokestatic  #61                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullExpressionValue:(Ljava/lang/Object;Ljava/lang/String;)V
       9: checkcast     #71                 // class java/lang/CharSequence
      12: iconst_1
      13: anewarray     #73                 // class java/lang/String
      16: astore_0
      17: aload_0
      18: iconst_0
      19: ldc           #75                 // String
      21: aastore
      22: aload_0
      23: iconst_0
      24: iconst_0
      25: bipush        6
      27: aconst_null
      28: invokestatic  #81                 // Method kotlin/text/StringsKt.split$default:(Ljava/lang/CharSequence;[Ljava/lang/String;ZIILjava/lang/Object;)Ljava/util/List;
      31: areturn

  private static final java.util.List<java.lang.Integer> readInts();
    Code:
       0: invokestatic  #84                 // 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           #88                 // class java/util/ArrayList
      14: dup
      15: aload_0
      16: bipush        10
      18: invokestatic  #94                 // Method kotlin/collections/CollectionsKt.collectionSizeOrDefault:(Ljava/lang/Iterable;I)I
      21: invokespecial #98                 // Method java/util/ArrayList."<init>":(I)V
      24: checkcast     #100                // class java/util/Collection
      27: astore_3
      28: iconst_0
      29: istore        4
      31: aload_2
      32: invokeinterface #104,  1          // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
      37: astore        5
      39: aload         5
      41: invokeinterface #110,  1          // InterfaceMethod java/util/Iterator.hasNext:()Z
      46: ifeq          92
      49: aload         5
      51: invokeinterface #114,  1          // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
      56: astore        6
      58: aload_3
      59: aload         6
      61: checkcast     #73                 // class java/lang/String
      64: astore        7
      66: astore        9
      68: iconst_0
      69: istore        8
      71: aload         7
      73: invokestatic  #67                 // Method java/lang/Integer.parseInt:(Ljava/lang/String;)I
      76: nop
      77: invokestatic  #118                // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
      80: aload         9
      82: swap
      83: invokeinterface #122,  2          // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
      88: pop
      89: goto          39
      92: aload_3
      93: checkcast     #18                 // class java/util/List
      96: nop
      97: areturn

  private static final java.util.List<java.lang.Long> readLongs();
    Code:
       0: invokestatic  #84                 // 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           #88                 // class java/util/ArrayList
      14: dup
      15: aload_0
      16: bipush        10
      18: invokestatic  #94                 // Method kotlin/collections/CollectionsKt.collectionSizeOrDefault:(Ljava/lang/Iterable;I)I
      21: invokespecial #98                 // Method java/util/ArrayList."<init>":(I)V
      24: checkcast     #100                // class java/util/Collection
      27: astore_3
      28: iconst_0
      29: istore        4
      31: aload_2
      32: invokeinterface #104,  1          // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
      37: astore        5
      39: aload         5
      41: invokeinterface #110,  1          // InterfaceMethod java/util/Iterator.hasNext:()Z
      46: ifeq          92
      49: aload         5
      51: invokeinterface #114,  1          // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
      56: astore        6
      58: aload_3
      59: aload         6
      61: checkcast     #73                 // class java/lang/String
      64: astore        7
      66: astore        9
      68: iconst_0
      69: istore        8
      71: aload         7
      73: invokestatic  #143                // Method java/lang/Long.parseLong:(Ljava/lang/String;)J
      76: nop
      77: invokestatic  #146                // Method java/lang/Long.valueOf:(J)Ljava/lang/Long;
      80: aload         9
      82: swap
      83: invokeinterface #122,  2          // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
      88: pop
      89: goto          39
      92: aload_3
      93: checkcast     #18                 // class java/util/List
      96: nop
      97: areturn

  private static final atcoder.arc158.Modular toModularUnsafe(int);
    Code:
       0: new           #151                // class atcoder/arc158/Modular
       3: dup
       4: iload_0
       5: invokespecial #152                // Method atcoder/arc158/Modular."<init>":(I)V
       8: areturn

  private static final atcoder.arc158.Modular toModular(int);
    Code:
       0: new           #151                // class atcoder/arc158/Modular
       3: dup
       4: iload_0
       5: iflt          25
       8: iload_0
       9: ldc           #155                // int 998244353
      11: if_icmpge     18
      14: iload_0
      15: goto          34
      18: iload_0
      19: ldc           #155                // int 998244353
      21: irem
      22: goto          34
      25: ldc           #156                // int 998244352
      27: iload_0
      28: iconst_m1
      29: ixor
      30: ldc           #155                // int 998244353
      32: irem
      33: isub
      34: invokespecial #152                // Method atcoder/arc158/Modular."<init>":(I)V
      37: areturn

  private static final atcoder.arc158.Modular toModular(long);
    Code:
       0: new           #151                // class atcoder/arc158/Modular
       3: dup
       4: lload_0
       5: lconst_0
       6: lcmp
       7: iflt          30
      10: lload_0
      11: ldc2_w        #159                // long 998244353l
      14: lcmp
      15: ifge          22
      18: lload_0
      19: goto          43
      22: lload_0
      23: ldc           #155                // int 998244353
      25: i2l
      26: lrem
      27: goto          43
      30: ldc           #156                // int 998244352
      32: i2l
      33: lload_0
      34: ldc2_w        #161                // long -1l
      37: lxor
      38: ldc           #155                // int 998244353
      40: i2l
      41: lrem
      42: lsub
      43: l2i
      44: invokespecial #152                // Method atcoder/arc158/Modular."<init>":(I)V
      47: areturn

  private static final atcoder.arc158.Modular toModular(java.math.BigInteger);
    Code:
       0: new           #151                // class atcoder/arc158/Modular
       3: dup
       4: aload_0
       5: getstatic     #167                // Field atcoder/arc158/Modular.Companion:Latcoder/arc158/Modular$Companion;
       8: invokevirtual #173                // Method atcoder/arc158/Modular$Companion.getMOD_BIG_INTEGER:()Ljava/math/BigInteger;
      11: invokevirtual #179                // Method java/math/BigInteger.mod:(Ljava/math/BigInteger;)Ljava/math/BigInteger;
      14: invokevirtual #182                // Method java/math/BigInteger.intValue:()I
      17: invokespecial #152                // Method atcoder/arc158/Modular."<init>":(I)V
      20: areturn

  private static final atcoder.arc158.Modular toModular(java.lang.String);
    Code:
       0: aload_0
       1: checkcast     #71                 // class java/lang/CharSequence
       4: astore_1
       5: lconst_0
       6: lstore_2
       7: iconst_0
       8: istore        4
      10: lload_2
      11: lstore        5
      13: iconst_0
      14: istore        7
      16: iload         7
      18: aload_1
      19: invokeinterface #187,  1          // InterfaceMethod java/lang/CharSequence.length:()I
      24: if_icmpge     73
      27: aload_1
      28: iload         7
      30: invokeinterface #191,  2          // InterfaceMethod java/lang/CharSequence.charAt:(I)C
      35: istore        8
      37: lload         5
      39: iload         8
      41: istore        9
      43: lstore        10
      45: iconst_0
      46: istore        12
      48: iload         9
      50: bipush        48
      52: isub
      53: i2l
      54: bipush        10
      56: i2l
      57: lload         10
      59: lmul
      60: ladd
      61: ldc           #155                // int 998244353
      63: i2l
      64: lrem
      65: lstore        5
      67: iinc          7, 1
      70: goto          16
      73: lload         5
      75: l2i
      76: istore        13
      78: new           #151                // class atcoder/arc158/Modular
      81: dup
      82: iload         13
      84: invokespecial #152                // Method atcoder/arc158/Modular."<init>":(I)V
      87: areturn

  private static final atcoder.arc158.ModularArray ModularArray(int, kotlin.jvm.functions.Function1<? super java.lang.Integer, atcoder.arc158.Modular>);
    Code:
       0: iconst_0
       1: istore_2
       2: iconst_0
       3: istore_3
       4: iload_0
       5: newarray       int
       7: astore        4
       9: iload_3
      10: iload_0
      11: if_icmpge     45
      14: iload_3
      15: istore        5
      17: aload         4
      19: iload         5
      21: aload_1
      22: iload         5
      24: invokestatic  #118                // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
      27: invokeinterface #210,  2          // InterfaceMethod kotlin/jvm/functions/Function1.invoke:(Ljava/lang/Object;)Ljava/lang/Object;
      32: checkcast     #151                // class atcoder/arc158/Modular
      35: invokevirtual #213                // Method atcoder/arc158/Modular.getX:()I
      38: iastore
      39: iinc          3, 1
      42: goto          9
      45: aload         4
      47: astore        6
      49: new           #215                // class atcoder/arc158/ModularArray
      52: dup
      53: aload         6
      55: invokespecial #218                // Method atcoder/arc158/ModularArray."<init>":([I)V
      58: areturn

  private static final atcoder.arc158.Modular factorial(int);
    Code:
       0: iload_0
       1: getstatic     #228                // Field factorials:Ljava/util/List;
       4: invokeinterface #22,  1           // InterfaceMethod java/util/List.size:()I
       9: if_icmplt     71
      12: getstatic     #228                // Field factorials:Ljava/util/List;
      15: getstatic     #228                // Field factorials:Ljava/util/List;
      18: invokestatic  #232                // Method kotlin/collections/CollectionsKt.last:(Ljava/util/List;)Ljava/lang/Object;
      21: checkcast     #151                // class atcoder/arc158/Modular
      24: astore_1
      25: getstatic     #228                // Field factorials:Ljava/util/List;
      28: invokeinterface #22,  1           // InterfaceMethod java/util/List.size:()I
      33: invokestatic  #234                // Method toModularUnsafe:(I)Latcoder/arc158/Modular;
      36: astore_2
      37: iconst_0
      38: istore_3
      39: new           #151                // class atcoder/arc158/Modular
      42: dup
      43: aload_1
      44: invokevirtual #213                // Method atcoder/arc158/Modular.getX:()I
      47: i2l
      48: aload_2
      49: invokevirtual #213                // Method atcoder/arc158/Modular.getX:()I
      52: i2l
      53: lmul
      54: ldc           #155                // int 998244353
      56: i2l
      57: lrem
      58: l2i
      59: invokespecial #152                // Method atcoder/arc158/Modular."<init>":(I)V
      62: invokeinterface #235,  2          // InterfaceMethod java/util/List.add:(Ljava/lang/Object;)Z
      67: pop
      68: goto          0
      71: getstatic     #228                // Field factorials:Ljava/util/List;
      74: iload_0
      75: invokeinterface #239,  2          // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
      80: checkcast     #151                // class atcoder/arc158/Modular
      83: areturn

  private static final atcoder.arc158.Modular cnk(int, int);
    Code:
       0: iload_0
       1: invokestatic  #247                // Method factorial:(I)Latcoder/arc158/Modular;
       4: astore_2
       5: iload_1
       6: invokestatic  #247                // Method factorial:(I)Latcoder/arc158/Modular;
       9: astore_3
      10: iconst_0
      11: istore        4
      13: aload_2
      14: astore        5
      16: aload_3
      17: astore        6
      19: iconst_0
      20: istore        7
      22: new           #151                // class atcoder/arc158/Modular
      25: dup
      26: aload         6
      28: invokevirtual #213                // Method atcoder/arc158/Modular.getX:()I
      31: i2l
      32: invokestatic  #250                // Method java/math/BigInteger.valueOf:(J)Ljava/math/BigInteger;
      35: dup
      36: ldc           #252                // String valueOf(...)
      38: invokestatic  #61                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullExpressionValue:(Ljava/lang/Object;Ljava/lang/String;)V
      41: getstatic     #167                // Field atcoder/arc158/Modular.Companion:Latcoder/arc158/Modular$Companion;
      44: invokevirtual #173                // Method atcoder/arc158/Modular$Companion.getMOD_BIG_INTEGER:()Ljava/math/BigInteger;
      47: invokevirtual #255                // Method java/math/BigInteger.modInverse:(Ljava/math/BigInteger;)Ljava/math/BigInteger;
      50: invokevirtual #182                // Method java/math/BigInteger.intValue:()I
      53: invokespecial #152                // Method atcoder/arc158/Modular."<init>":(I)V
      56: astore        6
      58: nop
      59: iconst_0
      60: istore        7
      62: new           #151                // class atcoder/arc158/Modular
      65: dup
      66: aload         5
      68: invokevirtual #213                // Method atcoder/arc158/Modular.getX:()I
      71: i2l
      72: aload         6
      74: invokevirtual #213                // Method atcoder/arc158/Modular.getX:()I
      77: i2l
      78: lmul
      79: ldc           #155                // int 998244353
      81: i2l
      82: lrem
      83: l2i
      84: invokespecial #152                // Method atcoder/arc158/Modular."<init>":(I)V
      87: nop
      88: astore_2
      89: iload_0
      90: iload_1
      91: isub
      92: invokestatic  #247                // Method factorial:(I)Latcoder/arc158/Modular;
      95: astore_3
      96: iconst_0
      97: istore        4
      99: aload_2
     100: astore        5
     102: aload_3
     103: astore        6
     105: iconst_0
     106: istore        7
     108: new           #151                // class atcoder/arc158/Modular
     111: dup
     112: aload         6
     114: invokevirtual #213                // Method atcoder/arc158/Modular.getX:()I
     117: i2l
     118: invokestatic  #250                // Method java/math/BigInteger.valueOf:(J)Ljava/math/BigInteger;
     121: dup
     122: ldc           #252                // String valueOf(...)
     124: invokestatic  #61                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullExpressionValue:(Ljava/lang/Object;Ljava/lang/String;)V
     127: getstatic     #167                // Field atcoder/arc158/Modular.Companion:Latcoder/arc158/Modular$Companion;
     130: invokevirtual #173                // Method atcoder/arc158/Modular$Companion.getMOD_BIG_INTEGER:()Ljava/math/BigInteger;
     133: invokevirtual #255                // Method java/math/BigInteger.modInverse:(Ljava/math/BigInteger;)Ljava/math/BigInteger;
     136: invokevirtual #182                // Method java/math/BigInteger.intValue:()I
     139: invokespecial #152                // Method atcoder/arc158/Modular."<init>":(I)V
     142: astore        6
     144: nop
     145: iconst_0
     146: istore        7
     148: new           #151                // class atcoder/arc158/Modular
     151: dup
     152: aload         5
     154: invokevirtual #213                // Method atcoder/arc158/Modular.getX:()I
     157: i2l
     158: aload         6
     160: invokevirtual #213                // Method atcoder/arc158/Modular.getX:()I
     163: i2l
     164: lmul
     165: ldc           #155                // int 998244353
     167: i2l
     168: lrem
     169: l2i
     170: invokespecial #152                // Method atcoder/arc158/Modular."<init>":(I)V
     173: nop
     174: areturn

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

  private static final atcoder.arc158.Modular main$solve(java.util.List<java.lang.Integer>, java.util.List<java.lang.Integer>, long, int, int);
    Code:
       0: iload         4
       2: iconst_1
       3: iadd
       4: iload         5
       6: if_icmpne     78
       9: aload_0
      10: iload         4
      12: invokeinterface #239,  2          // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
      17: checkcast     #268                // class java/lang/Number
      20: invokevirtual #269                // Method java/lang/Number.intValue:()I
      23: aload_1
      24: iload         4
      26: invokeinterface #239,  2          // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
      31: checkcast     #268                // class java/lang/Number
      34: invokevirtual #269                // Method java/lang/Number.intValue:()I
      37: iadd
      38: invokestatic  #271                // Method toModular:(I)Latcoder/arc158/Modular;
      41: astore        6
      43: iconst_3
      44: invokestatic  #234                // Method toModularUnsafe:(I)Latcoder/arc158/Modular;
      47: astore        7
      49: iconst_0
      50: istore        8
      52: new           #151                // class atcoder/arc158/Modular
      55: dup
      56: aload         6
      58: invokevirtual #213                // Method atcoder/arc158/Modular.getX:()I
      61: i2l
      62: aload         7
      64: invokevirtual #213                // Method atcoder/arc158/Modular.getX:()I
      67: i2l
      68: lmul
      69: ldc           #155                // int 998244353
      71: i2l
      72: lrem
      73: l2i
      74: invokespecial #152                // Method atcoder/arc158/Modular."<init>":(I)V
      77: areturn
      78: iload         4
      80: iload         5
      82: iadd
      83: iconst_2
      84: idiv
      85: istore        6
      87: aload_0
      88: aload_1
      89: lload_2
      90: iload         4
      92: iload         6
      94: invokestatic  #26                 // Method main$solve:(Ljava/util/List;Ljava/util/List;JII)Latcoder/arc158/Modular;
      97: astore        8
      99: aload_0
     100: aload_1
     101: lload_2
     102: iload         6
     104: iload         5
     106: invokestatic  #26                 // Method main$solve:(Ljava/util/List;Ljava/util/List;JII)Latcoder/arc158/Modular;
     109: astore        9
     111: iconst_0
     112: istore        10
     114: aload         8
     116: invokevirtual #213                // Method atcoder/arc158/Modular.getX:()I
     119: aload         9
     121: invokevirtual #213                // Method atcoder/arc158/Modular.getX:()I
     124: iadd
     125: istore        11
     127: iconst_0
     128: istore        14
     130: iload         11
     132: ldc           #155                // int 998244353
     134: if_icmplt     145
     137: iload         11
     139: ldc           #155                // int 998244353
     141: isub
     142: goto          147
     145: iload         11
     147: nop
     148: istore        45
     150: new           #151                // class atcoder/arc158/Modular
     153: dup
     154: iload         45
     156: invokespecial #152                // Method atcoder/arc158/Modular."<init>":(I)V
     159: astore        7
     161: iconst_2
     162: istore        9
     164: new           #88                 // class java/util/ArrayList
     167: dup
     168: iload         9
     170: invokespecial #98                 // Method java/util/ArrayList."<init>":(I)V
     173: astore        10
     175: iconst_0
     176: istore        11
     178: iload         11
     180: iload         9
     182: if_icmpge     631
     185: iload         11
     187: istore        12
     189: aload         10
     191: iload         12
     193: istore        13
     195: astore        44
     197: iconst_0
     198: istore        14
     200: lconst_0
     201: lstore        15
     203: lload_2
     204: lstore        17
     206: lload_2
     207: lstore        19
     209: lconst_0
     210: lstore        21
     212: iload         13
     214: iconst_1
     215: if_icmpne     231
     218: iload         6
     220: iload         5
     222: invokestatic  #277                // Method kotlin/ranges/RangesKt.until:(II)Lkotlin/ranges/IntRange;
     225: checkcast     #279                // class kotlin/ranges/IntProgression
     228: goto          240
     231: iload         6
     233: iconst_1
     234: isub
     235: iload         4
     237: invokestatic  #283                // Method kotlin/ranges/RangesKt.downTo:(II)Lkotlin/ranges/IntProgression;
     240: astore        23
     242: iload         13
     244: iconst_1
     245: if_icmpne     256
     248: iload         5
     250: iload         6
     252: isub
     253: goto          261
     256: iload         6
     258: iload         4
     260: isub
     261: istore        24
     263: iconst_0
     264: invokestatic  #234                // Method toModularUnsafe:(I)Latcoder/arc158/Modular;
     267: astore        25
     269: iload         24
     271: iconst_2
     272: imul
     273: newarray       long
     275: astore        26
     277: iconst_0
     278: istore        27
     280: aload         23
     282: invokevirtual #286                // Method kotlin/ranges/IntProgression.getFirst:()I
     285: istore        28
     287: aload         23
     289: invokevirtual #289                // Method kotlin/ranges/IntProgression.getLast:()I
     292: istore        29
     294: aload         23
     296: invokevirtual #292                // Method kotlin/ranges/IntProgression.getStep:()I
     299: istore        30
     301: iload         30
     303: ifle          313
     306: iload         28
     308: iload         29
     310: if_icmple     325
     313: iload         30
     315: ifge          606
     318: iload         29
     320: iload         28
     322: if_icmpgt     606
     325: lload         15
     327: lload         17
     329: aload_1
     330: iload         28
     332: invokeinterface #239,  2          // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     337: checkcast     #268                // class java/lang/Number
     340: invokevirtual #296                // Method java/lang/Number.longValue:()J
     343: ladd
     344: invokestatic  #302                // Method java/lang/Math.min:(JJ)J
     347: aload_0
     348: iload         28
     350: invokeinterface #239,  2          // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     355: checkcast     #268                // class java/lang/Number
     358: invokevirtual #296                // Method java/lang/Number.longValue:()J
     361: ladd
     362: lstore        31
     364: lload         17
     366: lload         15
     368: aload_0
     369: iload         28
     371: invokeinterface #239,  2          // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     376: checkcast     #268                // class java/lang/Number
     379: invokevirtual #296                // Method java/lang/Number.longValue:()J
     382: ladd
     383: invokestatic  #302                // Method java/lang/Math.min:(JJ)J
     386: aload_1
     387: iload         28
     389: invokeinterface #239,  2          // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     394: checkcast     #268                // class java/lang/Number
     397: invokevirtual #296                // Method java/lang/Number.longValue:()J
     400: ladd
     401: lstore        33
     403: lload         19
     405: lload         21
     407: aload_1
     408: iload         28
     410: invokeinterface #239,  2          // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     415: checkcast     #268                // class java/lang/Number
     418: invokevirtual #296                // Method java/lang/Number.longValue:()J
     421: ladd
     422: invokestatic  #302                // Method java/lang/Math.min:(JJ)J
     425: aload_0
     426: iload         28
     428: invokeinterface #239,  2          // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     433: checkcast     #268                // class java/lang/Number
     436: invokevirtual #296                // Method java/lang/Number.longValue:()J
     439: ladd
     440: lstore        35
     442: lload         21
     444: lload         19
     446: aload_0
     447: iload         28
     449: invokeinterface #239,  2          // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     454: checkcast     #268                // class java/lang/Number
     457: invokevirtual #296                // Method java/lang/Number.longValue:()J
     460: ladd
     461: invokestatic  #302                // Method java/lang/Math.min:(JJ)J
     464: aload_1
     465: iload         28
     467: invokeinterface #239,  2          // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     472: checkcast     #268                // class java/lang/Number
     475: invokevirtual #296                // Method java/lang/Number.longValue:()J
     478: ladd
     479: lstore        37
     481: aload         25
     483: astore        39
     485: lload         31
     487: lload         33
     489: ladd
     490: invokestatic  #304                // Method toModular:(J)Latcoder/arc158/Modular;
     493: astore        40
     495: iconst_0
     496: istore        41
     498: aload         39
     500: invokevirtual #213                // Method atcoder/arc158/Modular.getX:()I
     503: aload         40
     505: invokevirtual #213                // Method atcoder/arc158/Modular.getX:()I
     508: iadd
     509: istore        42
     511: iconst_0
     512: istore        43
     514: iload         42
     516: ldc           #155                // int 998244353
     518: if_icmplt     529
     521: iload         42
     523: ldc           #155                // int 998244353
     525: isub
     526: goto          531
     529: iload         42
     531: nop
     532: istore        46
     534: new           #151                // class atcoder/arc158/Modular
     537: dup
     538: iload         46
     540: invokespecial #152                // Method atcoder/arc158/Modular."<init>":(I)V
     543: astore        25
     545: aload         26
     547: iload         27
     549: iinc          27, 1
     552: lload         35
     554: lneg
     555: lload         31
     557: ladd
     558: lastore
     559: aload         26
     561: iload         27
     563: iinc          27, 1
     566: lload         37
     568: lneg
     569: lload         33
     571: ladd
     572: lastore
     573: lload         31
     575: lstore        15
     577: lload         33
     579: lstore        17
     581: lload         35
     583: lstore        19
     585: lload         37
     587: lstore        21
     589: iload         28
     591: iload         29
     593: if_icmpeq     606
     596: iload         28
     598: iload         30
     600: iadd
     601: istore        28
     603: goto          325
     606: aload         26
     608: invokestatic  #310                // Method kotlin/collections/ArraysKt.sort:([J)V
     611: aload         25
     613: aload         26
     615: invokestatic  #316                // Method kotlin/TuplesKt.to:(Ljava/lang/Object;Ljava/lang/Object;)Lkotlin/Pair;
     618: aload         44
     620: swap
     621: invokevirtual #317                // Method java/util/ArrayList.add:(Ljava/lang/Object;)Z
     624: pop
     625: iinc          11, 1
     628: goto          178
     631: aload         10
     633: checkcast     #18                 // class java/util/List
     636: astore        8
     638: aload         8
     640: iconst_0
     641: invokeinterface #239,  2          // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     646: checkcast     #319                // class kotlin/Pair
     649: astore        9
     651: aload         8
     653: iconst_1
     654: invokeinterface #239,  2          // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     659: checkcast     #319                // class kotlin/Pair
     662: astore        10
     664: aload         9
     666: invokevirtual #321                // Method kotlin/Pair.getFirst:()Ljava/lang/Object;
     669: checkcast     #151                // class atcoder/arc158/Modular
     672: astore        11
     674: aload         10
     676: invokevirtual #321                // Method kotlin/Pair.getFirst:()Ljava/lang/Object;
     679: checkcast     #151                // class atcoder/arc158/Modular
     682: astore        12
     684: aload         9
     686: invokevirtual #324                // Method kotlin/Pair.getSecond:()Ljava/lang/Object;
     689: checkcast     #326                // class "[J"
     692: astore        13
     694: aload         10
     696: invokevirtual #324                // Method kotlin/Pair.getSecond:()Ljava/lang/Object;
     699: checkcast     #326                // class "[J"
     702: astore        14
     704: aload         11
     706: astore        16
     708: aload         14
     710: arraylength
     711: invokestatic  #234                // Method toModularUnsafe:(I)Latcoder/arc158/Modular;
     714: astore        17
     716: iconst_0
     717: istore        18
     719: new           #151                // class atcoder/arc158/Modular
     722: dup
     723: aload         16
     725: invokevirtual #213                // Method atcoder/arc158/Modular.getX:()I
     728: i2l
     729: aload         17
     731: invokevirtual #213                // Method atcoder/arc158/Modular.getX:()I
     734: i2l
     735: lmul
     736: ldc           #155                // int 998244353
     738: i2l
     739: lrem
     740: l2i
     741: invokespecial #152                // Method atcoder/arc158/Modular."<init>":(I)V
     744: astore        16
     746: aload         12
     748: astore        17
     750: aload         13
     752: arraylength
     753: invokestatic  #234                // Method toModularUnsafe:(I)Latcoder/arc158/Modular;
     756: astore        18
     758: iconst_0
     759: istore        19
     761: new           #151                // class atcoder/arc158/Modular
     764: dup
     765: aload         17
     767: invokevirtual #213                // Method atcoder/arc158/Modular.getX:()I
     770: i2l
     771: aload         18
     773: invokevirtual #213                // Method atcoder/arc158/Modular.getX:()I
     776: i2l
     777: lmul
     778: ldc           #155                // int 998244353
     780: i2l
     781: lrem
     782: l2i
     783: invokespecial #152                // Method atcoder/arc158/Modular."<init>":(I)V
     786: astore        17
     788: nop
     789: iconst_0
     790: istore        18
     792: aload         16
     794: invokevirtual #213                // Method atcoder/arc158/Modular.getX:()I
     797: aload         17
     799: invokevirtual #213                // Method atcoder/arc158/Modular.getX:()I
     802: iadd
     803: istore        19
     805: iconst_0
     806: istore        22
     808: iload         19
     810: ldc           #155                // int 998244353
     812: if_icmplt     823
     815: iload         19
     817: ldc           #155                // int 998244353
     819: isub
     820: goto          825
     823: iload         19
     825: nop
     826: istore        47
     828: new           #151                // class atcoder/arc158/Modular
     831: dup
     832: iload         47
     834: invokespecial #152                // Method atcoder/arc158/Modular."<init>":(I)V
     837: astore        15
     839: aload         14
     841: arraylength
     842: istore        16
     844: iconst_0
     845: invokestatic  #234                // Method toModularUnsafe:(I)Latcoder/arc158/Modular;
     848: astore        17
     850: iconst_0
     851: istore        18
     853: aload         13
     855: arraylength
     856: istore        19
     858: iload         18
     860: iload         19
     862: if_icmpge     1121
     865: iload         16
     867: iconst_1
     868: if_icmplt     959
     871: aload         13
     873: iload         18
     875: laload
     876: aload         14
     878: iload         16
     880: iconst_1
     881: isub
     882: laload
     883: ladd
     884: lconst_0
     885: lcmp
     886: ifle          959
     889: iinc          16, -1
     892: aload         17
     894: astore        20
     896: aload         14
     898: iload         16
     900: laload
     901: invokestatic  #304                // Method toModular:(J)Latcoder/arc158/Modular;
     904: astore        21
     906: iconst_0
     907: istore        22
     909: aload         20
     911: invokevirtual #213                // Method atcoder/arc158/Modular.getX:()I
     914: aload         21
     916: invokevirtual #213                // Method atcoder/arc158/Modular.getX:()I
     919: iadd
     920: istore        23
     922: iconst_0
     923: istore        26
     925: iload         23
     927: ldc           #155                // int 998244353
     929: if_icmplt     940
     932: iload         23
     934: ldc           #155                // int 998244353
     936: isub
     937: goto          942
     940: iload         23
     942: nop
     943: istore        48
     945: new           #151                // class atcoder/arc158/Modular
     948: dup
     949: iload         48
     951: invokespecial #152                // Method atcoder/arc158/Modular."<init>":(I)V
     954: astore        17
     956: goto          865
     959: aload         15
     961: astore        20
     963: aload         13
     965: iload         18
     967: laload
     968: invokestatic  #304                // Method toModular:(J)Latcoder/arc158/Modular;
     971: astore        21
     973: aload         14
     975: arraylength
     976: iload         16
     978: isub
     979: invokestatic  #234                // Method toModularUnsafe:(I)Latcoder/arc158/Modular;
     982: astore        22
     984: iconst_0
     985: istore        23
     987: new           #151                // class atcoder/arc158/Modular
     990: dup
     991: aload         21
     993: invokevirtual #213                // Method atcoder/arc158/Modular.getX:()I
     996: i2l
     997: aload         22
     999: invokevirtual #213                // Method atcoder/arc158/Modular.getX:()I
    1002: i2l
    1003: lmul
    1004: ldc           #155                // int 998244353
    1006: i2l
    1007: lrem
    1008: l2i
    1009: invokespecial #152                // Method atcoder/arc158/Modular."<init>":(I)V
    1012: astore        21
    1014: nop
    1015: iconst_0
    1016: istore        22
    1018: aload         20
    1020: invokevirtual #213                // Method atcoder/arc158/Modular.getX:()I
    1023: aload         21
    1025: invokevirtual #213                // Method atcoder/arc158/Modular.getX:()I
    1028: isub
    1029: istore        23
    1031: iconst_0
    1032: istore        26
    1034: iload         23
    1036: ifge          1047
    1039: iload         23
    1041: ldc           #155                // int 998244353
    1043: iadd
    1044: goto          1049
    1047: iload         23
    1049: nop
    1050: istore        49
    1052: new           #151                // class atcoder/arc158/Modular
    1055: dup
    1056: iload         49
    1058: invokespecial #152                // Method atcoder/arc158/Modular."<init>":(I)V
    1061: astore        15
    1063: aload         15
    1065: astore        20
    1067: iconst_0
    1068: istore        21
    1070: aload         20
    1072: invokevirtual #213                // Method atcoder/arc158/Modular.getX:()I
    1075: aload         17
    1077: invokevirtual #213                // Method atcoder/arc158/Modular.getX:()I
    1080: isub
    1081: istore        22
    1083: iconst_0
    1084: istore        25
    1086: iload         22
    1088: ifge          1099
    1091: iload         22
    1093: ldc           #155                // int 998244353
    1095: iadd
    1096: goto          1101
    1099: iload         22
    1101: nop
    1102: istore        50
    1104: new           #151                // class atcoder/arc158/Modular
    1107: dup
    1108: iload         50
    1110: invokespecial #152                // Method atcoder/arc158/Modular."<init>":(I)V
    1113: astore        15
    1115: iinc          18, 1
    1118: goto          858
    1121: aload         7
    1123: astore        18
    1125: aload         15
    1127: astore        19
    1129: iconst_2
    1130: invokestatic  #234                // Method toModularUnsafe:(I)Latcoder/arc158/Modular;
    1133: astore        20
    1135: iconst_0
    1136: istore        21
    1138: new           #151                // class atcoder/arc158/Modular
    1141: dup
    1142: aload         19
    1144: invokevirtual #213                // Method atcoder/arc158/Modular.getX:()I
    1147: i2l
    1148: aload         20
    1150: invokevirtual #213                // Method atcoder/arc158/Modular.getX:()I
    1153: i2l
    1154: lmul
    1155: ldc           #155                // int 998244353
    1157: i2l
    1158: lrem
    1159: l2i
    1160: invokespecial #152                // Method atcoder/arc158/Modular."<init>":(I)V
    1163: astore        19
    1165: nop
    1166: iconst_0
    1167: istore        20
    1169: aload         18
    1171: invokevirtual #213                // Method atcoder/arc158/Modular.getX:()I
    1174: aload         19
    1176: invokevirtual #213                // Method atcoder/arc158/Modular.getX:()I
    1179: iadd
    1180: istore        21
    1182: iconst_0
    1183: istore        24
    1185: iload         21
    1187: ldc           #155                // int 998244353
    1189: if_icmplt     1200
    1192: iload         21
    1194: ldc           #155                // int 998244353
    1196: isub
    1197: goto          1202
    1200: iload         21
    1202: nop
    1203: istore        51
    1205: new           #151                // class atcoder/arc158/Modular
    1208: dup
    1209: iload         51
    1211: invokespecial #152                // Method atcoder/arc158/Modular."<init>":(I)V
    1214: astore        7
    1216: aload         7
    1218: areturn

  public static final atcoder.arc158.Modular access$toModularUnsafe(int);
    Code:
       0: iload_0
       1: invokestatic  #234                // Method toModularUnsafe:(I)Latcoder/arc158/Modular;
       4: areturn

  static {};
    Code:
       0: new           #49                 // class java/io/BufferedReader
       3: dup
       4: new           #366                // class java/io/InputStreamReader
       7: dup
       8: getstatic     #370                // Field java/lang/System.in:Ljava/io/InputStream;
      11: invokespecial #373                // Method java/io/InputStreamReader."<init>":(Ljava/io/InputStream;)V
      14: checkcast     #375                // class java/io/Reader
      17: invokespecial #378                // Method java/io/BufferedReader."<init>":(Ljava/io/Reader;)V
      20: putstatic     #47                 // Field bufferedReader:Ljava/io/BufferedReader;
      23: iconst_1
      24: anewarray     #151                // class atcoder/arc158/Modular
      27: astore_0
      28: aload_0
      29: iconst_0
      30: iconst_1
      31: invokestatic  #234                // Method toModularUnsafe:(I)Latcoder/arc158/Modular;
      34: aastore
      35: aload_0
      36: invokestatic  #382                // Method kotlin/collections/CollectionsKt.mutableListOf:([Ljava/lang/Object;)Ljava/util/List;
      39: putstatic     #228                // Field factorials:Ljava/util/List;
      42: return
}


package atcoder.arc156

fun main() {
	var (_, k) = readInts()
	val a = readInts().toSet()
	val f = (0..a.size).first { it !in a }
	var ans = if (f > 0) take(k, f) else 0.toModularUnsafe()
	for (x in f..Int.MAX_VALUE) {
		ans += take(k - 1, x + 1)
		if (x !in a && --k == 0) break
	}
	println(ans)
}

private fun take(n: Int, m: Int) = cnk(n + m - 1, n)

//typealias Modular = Double; fun Number.toModular() = toDouble(); fun Number.toModularUnsafe() = toDouble()
//typealias ModularArray = DoubleArray; val ModularArray.data; get() = this
@Suppress("NOTHING_TO_INLINE")
private class Modular(val x: Int) {
	companion object {
		const val M = 998244353; val MOD_BIG_INTEGER = M.toBigInteger()
	}
	inline operator fun plus(that: Modular) = Modular((x + that.x).let { if (it >= M) it - M else it })
	inline operator fun minus(that: Modular) = Modular((x - that.x).let { if (it < 0) it + M else it })
	inline operator fun times(that: Modular) = Modular((x.toLong() * that.x % M).toInt())
	inline operator fun div(that: Modular) = times(that.inverse())
	inline fun inverse() = Modular(x.toBigInteger().modInverse(MOD_BIG_INTEGER).toInt())
	override fun toString() = x.toString()
}
private fun Int.toModularUnsafe() = Modular(this)
private fun Int.toModular() = Modular(if (this >= 0) { if (this < Modular.M) this else this % Modular.M } else { Modular.M - 1 - inv() % Modular.M })
private fun Long.toModular() = Modular((if (this >= 0) { if (this < Modular.M) this else this % Modular.M } else { Modular.M - 1 - inv() % Modular.M }).toInt())
private fun java.math.BigInteger.toModular() = Modular(mod(Modular.MOD_BIG_INTEGER).toInt())
private fun String.toModular() = Modular(fold(0L) { acc, c -> (c - '0' + 10 * acc) % Modular.M }.toInt())
private class ModularArray(val data: IntArray) {
	operator fun get(index: Int) = data[index].toModularUnsafe()
	operator fun set(index: Int, value: Modular) { data[index] = value.x }
}
private inline fun ModularArray(n: Int, init: (Int) -> Modular) = ModularArray(IntArray(n) { init(it).x })

private val factorials = mutableListOf(1.toModularUnsafe())
private fun factorial(n: Int): Modular {
	while (n >= factorials.size) factorials.add(factorials.last() * factorials.size.toModularUnsafe())
	return factorials[n]
}
private fun cnk(n: Int, k: Int) = factorial(n) / factorial(k) / factorial(n - k)

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

Compiled from "b.kt"
public final class atcoder.arc156.BKt {
  private static final java.util.List<atcoder.arc156.Modular> factorials;

  public static final void main();
    Code:
       0: invokestatic  #10                 // Method readInts:()Ljava/util/List;
       3: iconst_1
       4: invokeinterface #16,  2           // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
       9: checkcast     #18                 // class java/lang/Number
      12: invokevirtual #22                 // Method java/lang/Number.intValue:()I
      15: istore_0
      16: invokestatic  #10                 // Method readInts:()Ljava/util/List;
      19: checkcast     #24                 // class java/lang/Iterable
      22: invokestatic  #30                 // Method kotlin/collections/CollectionsKt.toSet:(Ljava/lang/Iterable;)Ljava/util/Set;
      25: astore_1
      26: new           #32                 // class kotlin/ranges/IntRange
      29: dup
      30: iconst_0
      31: aload_1
      32: invokeinterface #37,  1           // InterfaceMethod java/util/Set.size:()I
      37: invokespecial #41                 // Method kotlin/ranges/IntRange."<init>":(II)V
      40: checkcast     #24                 // class java/lang/Iterable
      43: astore_3
      44: iconst_0
      45: istore        4
      47: aload_3
      48: invokeinterface #45,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
      53: astore        5
      55: aload         5
      57: invokeinterface #51,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
      62: ifeq          109
      65: aload         5
      67: checkcast     #53                 // class kotlin/collections/IntIterator
      70: invokevirtual #56                 // Method kotlin/collections/IntIterator.nextInt:()I
      73: istore        6
      75: iload         6
      77: istore        7
      79: iconst_0
      80: istore        8
      82: aload_1
      83: iload         7
      85: invokestatic  #62                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
      88: invokeinterface #66,  2           // InterfaceMethod java/util/Set.contains:(Ljava/lang/Object;)Z
      93: ifne          100
      96: iconst_1
      97: goto          101
     100: iconst_0
     101: ifeq          55
     104: iload         6
     106: goto          119
     109: new           #68                 // class java/util/NoSuchElementException
     112: dup
     113: ldc           #70                 // String Collection contains no element matching the predicate.
     115: invokespecial #73                 // Method java/util/NoSuchElementException."<init>":(Ljava/lang/String;)V
     118: athrow
     119: istore_2
     120: iload_2
     121: ifle          132
     124: iload_0
     125: iload_2
     126: invokestatic  #77                 // Method take:(II)Latcoder/arc156/Modular;
     129: goto          136
     132: iconst_0
     133: invokestatic  #81                 // Method toModularUnsafe:(I)Latcoder/arc156/Modular;
     136: astore_3
     137: iload_2
     138: istore        4
     140: iload         4
     142: ldc           #82                 // int 2147483647
     144: if_icmpgt     245
     147: aload_3
     148: astore        5
     150: iload_0
     151: iconst_1
     152: isub
     153: iload         4
     155: iconst_1
     156: iadd
     157: invokestatic  #77                 // Method take:(II)Latcoder/arc156/Modular;
     160: astore        6
     162: iconst_0
     163: istore        7
     165: aload         5
     167: invokevirtual #87                 // Method atcoder/arc156/Modular.getX:()I
     170: aload         6
     172: invokevirtual #87                 // Method atcoder/arc156/Modular.getX:()I
     175: iadd
     176: istore        8
     178: iconst_0
     179: istore        9
     181: iload         8
     183: ldc           #88                 // int 998244353
     185: if_icmplt     196
     188: iload         8
     190: ldc           #88                 // int 998244353
     192: isub
     193: goto          198
     196: iload         8
     198: nop
     199: istore        10
     201: new           #84                 // class atcoder/arc156/Modular
     204: dup
     205: iload         10
     207: invokespecial #91                 // Method atcoder/arc156/Modular."<init>":(I)V
     210: astore_3
     211: aload_1
     212: iload         4
     214: invokestatic  #62                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     217: invokeinterface #66,  2           // InterfaceMethod java/util/Set.contains:(Ljava/lang/Object;)Z
     222: ifne          232
     225: iinc          0, -1
     228: iload_0
     229: ifeq          245
     232: iload         4
     234: ldc           #82                 // int 2147483647
     236: if_icmpeq     245
     239: iinc          4, 1
     242: goto          147
     245: getstatic     #97                 // Field java/lang/System.out:Ljava/io/PrintStream;
     248: aload_3
     249: invokevirtual #103                // Method java/io/PrintStream.println:(Ljava/lang/Object;)V
     252: return

  private static final atcoder.arc156.Modular take(int, int);
    Code:
       0: iload_0
       1: iload_1
       2: iadd
       3: iconst_1
       4: isub
       5: iload_0
       6: invokestatic  #125                // Method cnk:(II)Latcoder/arc156/Modular;
       9: areturn

  private static final atcoder.arc156.Modular toModularUnsafe(int);
    Code:
       0: new           #84                 // class atcoder/arc156/Modular
       3: dup
       4: iload_0
       5: invokespecial #91                 // Method atcoder/arc156/Modular."<init>":(I)V
       8: areturn

  private static final atcoder.arc156.Modular toModular(int);
    Code:
       0: new           #84                 // class atcoder/arc156/Modular
       3: dup
       4: iload_0
       5: iflt          25
       8: iload_0
       9: ldc           #88                 // int 998244353
      11: if_icmpge     18
      14: iload_0
      15: goto          34
      18: iload_0
      19: ldc           #88                 // int 998244353
      21: irem
      22: goto          34
      25: ldc           #130                // int 998244352
      27: iload_0
      28: iconst_m1
      29: ixor
      30: ldc           #88                 // int 998244353
      32: irem
      33: isub
      34: invokespecial #91                 // Method atcoder/arc156/Modular."<init>":(I)V
      37: areturn

  private static final atcoder.arc156.Modular toModular(long);
    Code:
       0: new           #84                 // class atcoder/arc156/Modular
       3: dup
       4: lload_0
       5: lconst_0
       6: lcmp
       7: iflt          30
      10: lload_0
      11: ldc2_w        #133                // long 998244353l
      14: lcmp
      15: ifge          22
      18: lload_0
      19: goto          43
      22: lload_0
      23: ldc           #88                 // int 998244353
      25: i2l
      26: lrem
      27: goto          43
      30: ldc           #130                // int 998244352
      32: i2l
      33: lload_0
      34: ldc2_w        #135                // long -1l
      37: lxor
      38: ldc           #88                 // int 998244353
      40: i2l
      41: lrem
      42: lsub
      43: l2i
      44: invokespecial #91                 // Method atcoder/arc156/Modular."<init>":(I)V
      47: areturn

  private static final atcoder.arc156.Modular toModular(java.math.BigInteger);
    Code:
       0: new           #84                 // class atcoder/arc156/Modular
       3: dup
       4: aload_0
       5: getstatic     #142                // Field atcoder/arc156/Modular.Companion:Latcoder/arc156/Modular$Companion;
       8: invokevirtual #148                // Method atcoder/arc156/Modular$Companion.getMOD_BIG_INTEGER:()Ljava/math/BigInteger;
      11: invokevirtual #154                // Method java/math/BigInteger.mod:(Ljava/math/BigInteger;)Ljava/math/BigInteger;
      14: invokevirtual #155                // Method java/math/BigInteger.intValue:()I
      17: invokespecial #91                 // Method atcoder/arc156/Modular."<init>":(I)V
      20: areturn

  private static final atcoder.arc156.Modular toModular(java.lang.String);
    Code:
       0: aload_0
       1: checkcast     #159                // class java/lang/CharSequence
       4: astore_1
       5: lconst_0
       6: lstore_2
       7: iconst_0
       8: istore        4
      10: lload_2
      11: lstore        5
      13: iconst_0
      14: istore        7
      16: iload         7
      18: aload_1
      19: invokeinterface #162,  1          // InterfaceMethod java/lang/CharSequence.length:()I
      24: if_icmpge     73
      27: aload_1
      28: iload         7
      30: invokeinterface #166,  2          // InterfaceMethod java/lang/CharSequence.charAt:(I)C
      35: istore        8
      37: lload         5
      39: iload         8
      41: istore        9
      43: lstore        10
      45: iconst_0
      46: istore        12
      48: iload         9
      50: bipush        48
      52: isub
      53: i2l
      54: bipush        10
      56: i2l
      57: lload         10
      59: lmul
      60: ladd
      61: ldc           #88                 // int 998244353
      63: i2l
      64: lrem
      65: lstore        5
      67: iinc          7, 1
      70: goto          16
      73: lload         5
      75: l2i
      76: istore        13
      78: new           #84                 // class atcoder/arc156/Modular
      81: dup
      82: iload         13
      84: invokespecial #91                 // Method atcoder/arc156/Modular."<init>":(I)V
      87: areturn

  private static final atcoder.arc156.ModularArray ModularArray(int, kotlin.jvm.functions.Function1<? super java.lang.Integer, atcoder.arc156.Modular>);
    Code:
       0: iconst_0
       1: istore_2
       2: iconst_0
       3: istore_3
       4: iload_0
       5: newarray       int
       7: astore        4
       9: iload_3
      10: iload_0
      11: if_icmpge     45
      14: iload_3
      15: istore        5
      17: aload         4
      19: iload         5
      21: aload_1
      22: iload         5
      24: invokestatic  #62                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
      27: invokeinterface #187,  2          // InterfaceMethod kotlin/jvm/functions/Function1.invoke:(Ljava/lang/Object;)Ljava/lang/Object;
      32: checkcast     #84                 // class atcoder/arc156/Modular
      35: invokevirtual #87                 // Method atcoder/arc156/Modular.getX:()I
      38: iastore
      39: iinc          3, 1
      42: goto          9
      45: aload         4
      47: astore        6
      49: new           #189                // class atcoder/arc156/ModularArray
      52: dup
      53: aload         6
      55: invokespecial #192                // Method atcoder/arc156/ModularArray."<init>":([I)V
      58: areturn

  private static final atcoder.arc156.Modular factorial(int);
    Code:
       0: iload_0
       1: getstatic     #202                // Field factorials:Ljava/util/List;
       4: invokeinterface #203,  1          // InterfaceMethod java/util/List.size:()I
       9: if_icmplt     71
      12: getstatic     #202                // Field factorials:Ljava/util/List;
      15: getstatic     #202                // Field factorials:Ljava/util/List;
      18: invokestatic  #207                // Method kotlin/collections/CollectionsKt.last:(Ljava/util/List;)Ljava/lang/Object;
      21: checkcast     #84                 // class atcoder/arc156/Modular
      24: astore_1
      25: getstatic     #202                // Field factorials:Ljava/util/List;
      28: invokeinterface #203,  1          // InterfaceMethod java/util/List.size:()I
      33: invokestatic  #81                 // Method toModularUnsafe:(I)Latcoder/arc156/Modular;
      36: astore_2
      37: iconst_0
      38: istore_3
      39: new           #84                 // class atcoder/arc156/Modular
      42: dup
      43: aload_1
      44: invokevirtual #87                 // Method atcoder/arc156/Modular.getX:()I
      47: i2l
      48: aload_2
      49: invokevirtual #87                 // Method atcoder/arc156/Modular.getX:()I
      52: i2l
      53: lmul
      54: ldc           #88                 // int 998244353
      56: i2l
      57: lrem
      58: l2i
      59: invokespecial #91                 // Method atcoder/arc156/Modular."<init>":(I)V
      62: invokeinterface #210,  2          // InterfaceMethod java/util/List.add:(Ljava/lang/Object;)Z
      67: pop
      68: goto          0
      71: getstatic     #202                // Field factorials:Ljava/util/List;
      74: iload_0
      75: invokeinterface #16,  2           // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
      80: checkcast     #84                 // class atcoder/arc156/Modular
      83: areturn

  private static final atcoder.arc156.Modular cnk(int, int);
    Code:
       0: iload_0
       1: invokestatic  #213                // Method factorial:(I)Latcoder/arc156/Modular;
       4: astore_2
       5: iload_1
       6: invokestatic  #213                // Method factorial:(I)Latcoder/arc156/Modular;
       9: astore_3
      10: iconst_0
      11: istore        4
      13: aload_2
      14: astore        5
      16: aload_3
      17: astore        6
      19: iconst_0
      20: istore        7
      22: new           #84                 // class atcoder/arc156/Modular
      25: dup
      26: aload         6
      28: invokevirtual #87                 // Method atcoder/arc156/Modular.getX:()I
      31: i2l
      32: invokestatic  #216                // Method java/math/BigInteger.valueOf:(J)Ljava/math/BigInteger;
      35: dup
      36: ldc           #218                // String valueOf(...)
      38: invokestatic  #224                // Method kotlin/jvm/internal/Intrinsics.checkNotNullExpressionValue:(Ljava/lang/Object;Ljava/lang/String;)V
      41: getstatic     #142                // Field atcoder/arc156/Modular.Companion:Latcoder/arc156/Modular$Companion;
      44: invokevirtual #148                // Method atcoder/arc156/Modular$Companion.getMOD_BIG_INTEGER:()Ljava/math/BigInteger;
      47: invokevirtual #227                // Method java/math/BigInteger.modInverse:(Ljava/math/BigInteger;)Ljava/math/BigInteger;
      50: invokevirtual #155                // Method java/math/BigInteger.intValue:()I
      53: invokespecial #91                 // Method atcoder/arc156/Modular."<init>":(I)V
      56: astore        6
      58: nop
      59: iconst_0
      60: istore        7
      62: new           #84                 // class atcoder/arc156/Modular
      65: dup
      66: aload         5
      68: invokevirtual #87                 // Method atcoder/arc156/Modular.getX:()I
      71: i2l
      72: aload         6
      74: invokevirtual #87                 // Method atcoder/arc156/Modular.getX:()I
      77: i2l
      78: lmul
      79: ldc           #88                 // int 998244353
      81: i2l
      82: lrem
      83: l2i
      84: invokespecial #91                 // Method atcoder/arc156/Modular."<init>":(I)V
      87: nop
      88: astore_2
      89: iload_0
      90: iload_1
      91: isub
      92: invokestatic  #213                // Method factorial:(I)Latcoder/arc156/Modular;
      95: astore_3
      96: iconst_0
      97: istore        4
      99: aload_2
     100: astore        5
     102: aload_3
     103: astore        6
     105: iconst_0
     106: istore        7
     108: new           #84                 // class atcoder/arc156/Modular
     111: dup
     112: aload         6
     114: invokevirtual #87                 // Method atcoder/arc156/Modular.getX:()I
     117: i2l
     118: invokestatic  #216                // Method java/math/BigInteger.valueOf:(J)Ljava/math/BigInteger;
     121: dup
     122: ldc           #218                // String valueOf(...)
     124: invokestatic  #224                // Method kotlin/jvm/internal/Intrinsics.checkNotNullExpressionValue:(Ljava/lang/Object;Ljava/lang/String;)V
     127: getstatic     #142                // Field atcoder/arc156/Modular.Companion:Latcoder/arc156/Modular$Companion;
     130: invokevirtual #148                // Method atcoder/arc156/Modular$Companion.getMOD_BIG_INTEGER:()Ljava/math/BigInteger;
     133: invokevirtual #227                // Method java/math/BigInteger.modInverse:(Ljava/math/BigInteger;)Ljava/math/BigInteger;
     136: invokevirtual #155                // Method java/math/BigInteger.intValue:()I
     139: invokespecial #91                 // Method atcoder/arc156/Modular."<init>":(I)V
     142: astore        6
     144: nop
     145: iconst_0
     146: istore        7
     148: new           #84                 // class atcoder/arc156/Modular
     151: dup
     152: aload         5
     154: invokevirtual #87                 // Method atcoder/arc156/Modular.getX:()I
     157: i2l
     158: aload         6
     160: invokevirtual #87                 // Method atcoder/arc156/Modular.getX:()I
     163: i2l
     164: lmul
     165: ldc           #88                 // int 998244353
     167: i2l
     168: lrem
     169: l2i
     170: invokespecial #91                 // Method atcoder/arc156/Modular."<init>":(I)V
     173: nop
     174: areturn

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

  private static final java.util.List<java.lang.String> readStrings();
    Code:
       0: invokestatic  #245                // Method readLn:()Ljava/lang/String;
       3: checkcast     #159                // class java/lang/CharSequence
       6: iconst_1
       7: anewarray     #178                // class java/lang/String
      10: astore_0
      11: aload_0
      12: iconst_0
      13: ldc           #247                // String
      15: aastore
      16: aload_0
      17: iconst_0
      18: iconst_0
      19: bipush        6
      21: aconst_null
      22: invokestatic  #253                // 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  #256                // Method readStrings:()Ljava/util/List;
       3: checkcast     #24                 // class java/lang/Iterable
       6: astore_0
       7: iconst_0
       8: istore_1
       9: aload_0
      10: astore_2
      11: new           #258                // class java/util/ArrayList
      14: dup
      15: aload_0
      16: bipush        10
      18: invokestatic  #262                // Method kotlin/collections/CollectionsKt.collectionSizeOrDefault:(Ljava/lang/Iterable;I)I
      21: invokespecial #263                // Method java/util/ArrayList."<init>":(I)V
      24: checkcast     #265                // class java/util/Collection
      27: astore_3
      28: iconst_0
      29: istore        4
      31: aload_2
      32: invokeinterface #45,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
      37: astore        5
      39: aload         5
      41: invokeinterface #51,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
      46: ifeq          92
      49: aload         5
      51: invokeinterface #269,  1          // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
      56: astore        6
      58: aload_3
      59: aload         6
      61: checkcast     #178                // class java/lang/String
      64: astore        7
      66: astore        9
      68: iconst_0
      69: istore        8
      71: aload         7
      73: invokestatic  #273                // 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 #274,  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  #286                // Method main:()V
       3: return

  public static final atcoder.arc156.Modular access$toModularUnsafe(int);
    Code:
       0: iload_0
       1: invokestatic  #81                 // Method toModularUnsafe:(I)Latcoder/arc156/Modular;
       4: areturn

  static {};
    Code:
       0: iconst_1
       1: anewarray     #84                 // class atcoder/arc156/Modular
       4: astore_0
       5: aload_0
       6: iconst_0
       7: iconst_1
       8: invokestatic  #81                 // Method toModularUnsafe:(I)Latcoder/arc156/Modular;
      11: aastore
      12: aload_0
      13: invokestatic  #295                // Method kotlin/collections/CollectionsKt.mutableListOf:([Ljava/lang/Object;)Ljava/util/List;
      16: putstatic     #202                // Field factorials:Ljava/util/List;
      19: return
}


package atcoder.arc156

import kotlin.random.Random

fun main() {
	val n = readInt()
	val nei = List(n) { mutableListOf<Int>() }
	repeat(n - 1) {
		val (u, v) = readInts().map { it - 1 }
		nei[u].add(v); nei[v].add(u)
	}
	val r = Random(566)
	val byDegree = nei.indices.sortedBy { nei[it].size }
	val p = IntArray(n)
	for (i in nei.indices) {
		p[byDegree[i]] = byDegree[n - 1 - i]
	}
	while (true) {
		var perfect = true
		for (v in nei.indices) {
			for (u in nei[v]) if (u < v) {
				val vv = p[v]
				val uu = p[u]
				if (uu in nei[vv]) {
					if (v == uu && u == vv) continue
					perfect = false
					var w: Int
					while (true) {
						w = r.nextInt(n)
						if (w != v && w != u) break
					}
					val temp = p[v]; p[v] = p[u]; p[u] = p[w]; p[w] = temp
				}
			}
		}
		if (perfect) break
	}
	println(p.map { it + 1 }.joinToString(" "))
}

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 atcoder.arc156.C_researchKt$main$$inlined$sortedBy$1<T> implements java.util.Comparator {
  final java.util.List $nei$inlined;

  public atcoder.arc156.C_researchKt$main$$inlined$sortedBy$1(java.util.List);
    Code:
       0: aload_0
       1: aload_1
       2: putfield      #18                 // Field $nei$inlined:Ljava/util/List;
       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 $nei$inlined:Ljava/util/List;
      15: iload_3
      16: invokeinterface #38,  2           // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
      21: checkcast     #34                 // class java/util/List
      24: invokeinterface #41,  1           // InterfaceMethod java/util/List.size:()I
      29: invokestatic  #47                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
      32: checkcast     #49                 // class java/lang/Comparable
      35: aload_2
      36: checkcast     #28                 // class java/lang/Number
      39: invokevirtual #32                 // Method java/lang/Number.intValue:()I
      42: istore_3
      43: astore        5
      45: iconst_0
      46: istore        4
      48: aload_0
      49: getfield      #18                 // Field $nei$inlined:Ljava/util/List;
      52: iload_3
      53: invokeinterface #38,  2           // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
      58: checkcast     #34                 // class java/util/List
      61: invokeinterface #41,  1           // InterfaceMethod java/util/List.size:()I
      66: invokestatic  #47                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
      69: aload         5
      71: swap
      72: checkcast     #49                 // class java/lang/Comparable
      75: invokestatic  #55                 // Method kotlin/comparisons/ComparisonsKt.compareValues:(Ljava/lang/Comparable;Ljava/lang/Comparable;)I
      78: ireturn
}

Compiled from "c_research.kt"
public final class atcoder.arc156.C_researchKt {
  public static final void main();
    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     57
      20: iload_3
      21: istore        4
      23: aload_2
      24: iload         4
      26: istore        5
      28: astore        17
      30: iconst_0
      31: istore        6
      33: new           #12                 // class java/util/ArrayList
      36: dup
      37: invokespecial #18                 // Method java/util/ArrayList."<init>":()V
      40: checkcast     #20                 // class java/util/List
      43: nop
      44: aload         17
      46: swap
      47: invokevirtual #24                 // Method java/util/ArrayList.add:(Ljava/lang/Object;)Z
      50: pop
      51: iinc          3, 1
      54: goto          15
      57: aload_2
      58: checkcast     #20                 // class java/util/List
      61: astore_1
      62: iload_0
      63: iconst_1
      64: isub
      65: istore_2
      66: iconst_0
      67: istore_3
      68: iload_3
      69: iload_2
      70: if_icmpge     271
      73: iload_3
      74: istore        4
      76: iconst_0
      77: istore        5
      79: invokestatic  #28                 // Method readInts:()Ljava/util/List;
      82: checkcast     #30                 // class java/lang/Iterable
      85: astore        6
      87: iconst_0
      88: istore        7
      90: aload         6
      92: astore        8
      94: new           #12                 // class java/util/ArrayList
      97: dup
      98: aload         6
     100: bipush        10
     102: invokestatic  #36                 // Method kotlin/collections/CollectionsKt.collectionSizeOrDefault:(Ljava/lang/Iterable;I)I
     105: invokespecial #16                 // Method java/util/ArrayList."<init>":(I)V
     108: checkcast     #38                 // class java/util/Collection
     111: astore        9
     113: iconst_0
     114: istore        10
     116: aload         8
     118: invokeinterface #42,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     123: astore        11
     125: aload         11
     127: invokeinterface #48,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     132: ifeq          180
     135: aload         11
     137: invokeinterface #52,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     142: astore        12
     144: aload         9
     146: aload         12
     148: checkcast     #54                 // class java/lang/Number
     151: invokevirtual #57                 // Method java/lang/Number.intValue:()I
     154: istore        13
     156: astore        14
     158: iconst_0
     159: istore        15
     161: iload         13
     163: iconst_1
     164: isub
     165: invokestatic  #63                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     168: aload         14
     170: swap
     171: invokeinterface #64,  2           // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     176: pop
     177: goto          125
     180: aload         9
     182: checkcast     #20                 // class java/util/List
     185: nop
     186: astore        16
     188: aload         16
     190: iconst_0
     191: invokeinterface #68,  2           // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     196: checkcast     #54                 // class java/lang/Number
     199: invokevirtual #57                 // Method java/lang/Number.intValue:()I
     202: istore        6
     204: aload         16
     206: iconst_1
     207: invokeinterface #68,  2           // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     212: checkcast     #54                 // class java/lang/Number
     215: invokevirtual #57                 // Method java/lang/Number.intValue:()I
     218: istore        7
     220: aload_1
     221: iload         6
     223: invokeinterface #68,  2           // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     228: checkcast     #20                 // class java/util/List
     231: iload         7
     233: invokestatic  #63                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     236: invokeinterface #69,  2           // InterfaceMethod java/util/List.add:(Ljava/lang/Object;)Z
     241: pop
     242: aload_1
     243: iload         7
     245: invokeinterface #68,  2           // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     250: checkcast     #20                 // class java/util/List
     253: iload         6
     255: invokestatic  #63                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     258: invokeinterface #69,  2           // InterfaceMethod java/util/List.add:(Ljava/lang/Object;)Z
     263: pop
     264: nop
     265: iinc          3, 1
     268: goto          68
     271: sipush        566
     274: invokestatic  #75                 // Method kotlin/random/RandomKt.Random:(I)Lkotlin/random/Random;
     277: astore_2
     278: aload_1
     279: checkcast     #38                 // class java/util/Collection
     282: invokestatic  #79                 // Method kotlin/collections/CollectionsKt.getIndices:(Ljava/util/Collection;)Lkotlin/ranges/IntRange;
     285: checkcast     #30                 // class java/lang/Iterable
     288: astore        4
     290: iconst_0
     291: istore        5
     293: aload         4
     295: new           #81                 // class atcoder/arc156/C_researchKt$main$$inlined$sortedBy$1
     298: dup
     299: aload_1
     300: invokespecial #84                 // Method atcoder/arc156/C_researchKt$main$$inlined$sortedBy$1."<init>":(Ljava/util/List;)V
     303: checkcast     #86                 // class java/util/Comparator
     306: invokestatic  #90                 // Method kotlin/collections/CollectionsKt.sortedWith:(Ljava/lang/Iterable;Ljava/util/Comparator;)Ljava/util/List;
     309: astore_3
     310: iload_0
     311: newarray       int
     313: astore        4
     315: iconst_0
     316: istore        5
     318: aload_1
     319: checkcast     #38                 // class java/util/Collection
     322: invokeinterface #93,  1           // InterfaceMethod java/util/Collection.size:()I
     327: istore        6
     329: iload         5
     331: iload         6
     333: if_icmpge     377
     336: aload         4
     338: aload_3
     339: iload         5
     341: invokeinterface #68,  2           // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     346: checkcast     #54                 // class java/lang/Number
     349: invokevirtual #57                 // Method java/lang/Number.intValue:()I
     352: aload_3
     353: iload_0
     354: iconst_1
     355: isub
     356: iload         5
     358: isub
     359: invokeinterface #68,  2           // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     364: checkcast     #54                 // class java/lang/Number
     367: invokevirtual #57                 // Method java/lang/Number.intValue:()I
     370: iastore
     371: iinc          5, 1
     374: goto          329
     377: nop
     378: iconst_1
     379: istore        5
     381: iconst_0
     382: istore        6
     384: aload_1
     385: checkcast     #38                 // class java/util/Collection
     388: invokeinterface #93,  1           // InterfaceMethod java/util/Collection.size:()I
     393: istore        7
     395: iload         6
     397: iload         7
     399: if_icmpge     578
     402: aload_1
     403: iload         6
     405: invokeinterface #68,  2           // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     410: checkcast     #20                 // class java/util/List
     413: invokeinterface #94,  1           // InterfaceMethod java/util/List.iterator:()Ljava/util/Iterator;
     418: astore        8
     420: aload         8
     422: invokeinterface #48,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     427: ifeq          572
     430: aload         8
     432: invokeinterface #52,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     437: checkcast     #54                 // class java/lang/Number
     440: invokevirtual #57                 // Method java/lang/Number.intValue:()I
     443: istore        9
     445: iload         9
     447: iload         6
     449: if_icmpge     420
     452: aload         4
     454: iload         6
     456: iaload
     457: istore        10
     459: aload         4
     461: iload         9
     463: iaload
     464: istore        11
     466: aload_1
     467: iload         10
     469: invokeinterface #68,  2           // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     474: checkcast     #20                 // class java/util/List
     477: iload         11
     479: invokestatic  #63                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     482: invokeinterface #97,  2           // InterfaceMethod java/util/List.contains:(Ljava/lang/Object;)Z
     487: ifeq          420
     490: iload         6
     492: iload         11
     494: if_icmpne     504
     497: iload         9
     499: iload         10
     501: if_icmpeq     420
     504: iconst_0
     505: istore        5
     507: iconst_0
     508: istore        12
     510: nop
     511: aload_2
     512: iload_0
     513: invokevirtual #103                // Method kotlin/random/Random.nextInt:(I)I
     516: istore        12
     518: iload         12
     520: iload         6
     522: if_icmpeq     510
     525: iload         12
     527: iload         9
     529: if_icmpeq     510
     532: goto          535
     535: aload         4
     537: iload         6
     539: iaload
     540: istore        13
     542: aload         4
     544: iload         6
     546: aload         4
     548: iload         9
     550: iaload
     551: iastore
     552: aload         4
     554: iload         9
     556: aload         4
     558: iload         12
     560: iaload
     561: iastore
     562: aload         4
     564: iload         12
     566: iload         13
     568: iastore
     569: goto          420
     572: iinc          6, 1
     575: goto          395
     578: iload         5
     580: ifeq          377
     583: goto          586
     586: aload         4
     588: astore        5
     590: iconst_0
     591: istore        6
     593: aload         5
     595: astore        7
     597: new           #12                 // class java/util/ArrayList
     600: dup
     601: aload         5
     603: arraylength
     604: invokespecial #16                 // Method java/util/ArrayList."<init>":(I)V
     607: checkcast     #38                 // class java/util/Collection
     610: astore        8
     612: iconst_0
     613: istore        9
     615: iconst_0
     616: istore        10
     618: aload         7
     620: arraylength
     621: istore        11
     623: iload         10
     625: iload         11
     627: if_icmpge     670
     630: aload         7
     632: iload         10
     634: iaload
     635: istore        12
     637: aload         8
     639: iload         12
     641: istore        13
     643: astore        17
     645: iconst_0
     646: istore        14
     648: iload         13
     650: iconst_1
     651: iadd
     652: invokestatic  #63                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     655: aload         17
     657: swap
     658: invokeinterface #64,  2           // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     663: pop
     664: iinc          10, 1
     667: goto          623
     670: aload         8
     672: checkcast     #20                 // class java/util/List
     675: nop
     676: checkcast     #30                 // class java/lang/Iterable
     679: ldc           #105                // String
     681: checkcast     #107                // class java/lang/CharSequence
     684: aconst_null
     685: aconst_null
     686: iconst_0
     687: aconst_null
     688: aconst_null
     689: bipush        62
     691: aconst_null
     692: invokestatic  #111                // 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;
     695: getstatic     #117                // Field java/lang/System.out:Ljava/io/PrintStream;
     698: swap
     699: invokevirtual #123                // Method java/io/PrintStream.println:(Ljava/lang/Object;)V
     702: return

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

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

  private static final java.util.List<java.lang.String> readStrings();
    Code:
       0: invokestatic  #172                // Method readLn:()Ljava/lang/String;
       3: checkcast     #107                // class java/lang/CharSequence
       6: iconst_1
       7: anewarray     #180                // class java/lang/String
      10: astore_0
      11: aload_0
      12: iconst_0
      13: ldc           #105                // String
      15: aastore
      16: aload_0
      17: iconst_0
      18: iconst_0
      19: bipush        6
      21: aconst_null
      22: invokestatic  #186                // 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  #189                // Method readStrings:()Ljava/util/List;
       3: checkcast     #30                 // 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  #36                 // Method kotlin/collections/CollectionsKt.collectionSizeOrDefault:(Ljava/lang/Iterable;I)I
      21: invokespecial #16                 // Method java/util/ArrayList."<init>":(I)V
      24: checkcast     #38                 // class java/util/Collection
      27: astore_3
      28: iconst_0
      29: istore        4
      31: aload_2
      32: invokeinterface #42,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
      37: astore        5
      39: aload         5
      41: invokeinterface #48,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
      46: ifeq          92
      49: aload         5
      51: invokeinterface #52,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
      56: astore        6
      58: aload_3
      59: aload         6
      61: checkcast     #180                // class java/lang/String
      64: astore        7
      66: astore        9
      68: iconst_0
      69: istore        8
      71: aload         7
      73: invokestatic  #176                // Method java/lang/Integer.parseInt:(Ljava/lang/String;)I
      76: nop
      77: invokestatic  #63                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
      80: aload         9
      82: swap
      83: invokeinterface #64,  2           // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
      88: pop
      89: goto          39
      92: aload_3
      93: checkcast     #20                 // class java/util/List
      96: nop
      97: areturn

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