import java.util.*
import java.io.*
import kotlin.math.*

const val SEARCHDEPTH = 7
const val SPEEDLIMIT = 1000
const val searchDepth = SEARCHDEPTH
const val speedLimitSquared = SPEEDLIMIT * SPEEDLIMIT
var nextSeq = 1

data class IntVec(val x : Int, val y : Int) {
  operator fun plus(v : IntVec) : IntVec {
    return IntVec(x + v.x, y + v.y)
  }
  operator fun compareTo(other : IntVec) : Int {
    return if (y == other.y) other.x - x else y - other.y
  }
}

data class RaceCourse(val thinkTime : Int, val stepLimit : Int, val width : Int, val length : Int, val vision : Int) {
  constructor(input : java.util.Scanner) :this(input.nextInt(), input.nextInt(), input.nextInt(), input.nextInt(), input.nextInt()) {}
}

fun addSquares(x : Int, y0 : Int, y1 : Int, squares : MutableList<IntVec>) {
  for (y in (if (y1 > y0) y0..y1 else y0 downTo y1)) squares.add(IntVec(x, y))
}

data class Movement(val from : IntVec, val to : IntVec) {
  fun touchedSquares() : MutableList<IntVec> {
    val r : MutableList<IntVec> = mutableListOf()
    if (to.x == from.x) addSquares(from.x, from.y, to.y, r)
    else {
      val a : Double = (to.y - from.y).toDouble() / (to.x - from.x).toDouble()
      val sgnx = if (from.x < to.x) 1 else -1
      var y1 = a * sgnx / 2.0 + from.y + 0.5
      var iy1 = (if (to.y > from.y) floor(y1) else ceil(y1) - 1).toInt()
      addSquares(from.x, from.y, iy1, r)
      for (x in (if (sgnx > 0) (from.x + sgnx)..(to.x - 1) else (from.x + sgnx).downTo(to.x + 1))) {
        val y0 = a * (x - from.x - sgnx / 2.0) + from.y + 0.5
        y1 = a * (x - from.x + sgnx / 2.0) + from.y + 0.5
        val iy0 = (if (to.y > from.y) ceil(y0) - 1 else floor(y0)).toInt()
        iy1 = (if (to.y > from.y) floor(y1) else ceil(y1) - 1).toInt()
        addSquares(x, iy0, iy1, r)
      }
      val y0 = a * (to.x - from.x - sgnx / 2.0) + from.y + 0.5
      val iy0 = (if (to.y > from.y) ceil(y0) - 1 else floor(y0)).toInt()
      addSquares(to.x, iy0, to.y, r)
    }
    return r
  }
}

data class PlayerState(val position : IntVec, val velocity : IntVec) {
  constructor (input : java.util.Scanner) : this(IntVec(input.nextInt(), input.nextInt()), IntVec(input.nextInt(), input.nextInt())) {}
  operator fun compareTo(other : PlayerState) : Int {
    val c1 = position.compareTo(other.position)
    return if (c1 == 0) velocity.compareTo(other.velocity) else c1
  }
}

data class RaceInfo(val stepNumber : Int, val timeLeft : Int, val me : PlayerState, val opponent : PlayerState, val squares : List<List<Int>>) {
  constructor(input : java.util.Scanner, course : RaceCourse)
     :this(input.nextInt(), input.nextInt(), PlayerState(input),
           PlayerState(input),
           Array(course.length, {Array(course.width, {input.nextInt()}).asList()}).asList()) {}
}

data class Candidate(val course : RaceCourse, val step : Int, val state : PlayerState, val from : Candidate?, val how : IntVec) : Comparable<Candidate> {
  val seq = nextSeq
  init {
    nextSeq += 1
  }
  val goaled = state.position.y >= course.length
  val goalTime = if (goaled) (step + course.length - state.position.y - 0.5) / state.velocity.y else 0.0

  operator override fun compareTo(other : Candidate) : Int {
    if (goaled) {
      if (!other.goaled || other.goalTime > goalTime) return -1
      else if (other.goalTime < goalTime) return 1
      else return 0
    } else if (state == other.state) return step - other.step
    else return other.state.compareTo(state)
  }

  override fun toString() : String {
    return "#${seq}: ${step}@(${state.position.x},${state.position.y})+(${state.velocity.x},${state.velocity.y}) <- #${from?.seq ?: 0}"
  }
}

fun plan(info : RaceInfo, course : RaceCourse) : IntVec {
  val candidates = PriorityQueue<Candidate>()
  val initial = PlayerState(info.me.position, info.me.velocity)
  val initialCand = Candidate(course, 0, initial, null, IntVec(0, 0))
  val reached = mutableMapOf(initial to initialCand)
  var best = initialCand
  candidates.add(initialCand)
  while (!candidates.isEmpty()) {
    val c = candidates.poll()
    for (cay in 1 downTo -1) {
      for (cax in -1..1) {
        val accel = IntVec(cax, cay)
        var velo = c.state.velocity + accel
        if (velo.x * velo.x + velo.y * velo.y <= speedLimitSquared) {
          val pos = c.state.position + velo
          if (0 <= pos.x && pos.x < course.width) {
            val move = Movement(c.state.position, pos)
            val touched = move.touchedSquares()
            if (pos != info.opponent.position &&
                touched.all { s ->
                  0 > s.y || s.y >= course.length ||
                  info.squares[s.y][s.x] != 1}) {
              if (0 <= pos.y && pos.y < course.length &&
                  info.squares[pos.y][pos.x] == 2) {
                velo = IntVec(0, 0)
              }
              val nextState = PlayerState(pos, velo)
              val nextCand = Candidate(course, c.step + 1, nextState, c, accel)
              if (!nextCand.goaled &&
                  c.step < searchDepth &&
                  (!reached.containsKey(nextState) ||
                  reached[nextState]!!.step > c.step + 1)) {
                candidates.add(nextCand)
                reached[nextState] = nextCand
                if (nextCand < best) best = nextCand
              }
            }
          }
        }
      }
    }
  }
  if (best == initialCand) {
    var ax = 0
    var ay = 0
    if (info.me.velocity.x < 0) ax += 1
    else if (info.me.velocity.x > 0) ax -= 1
    if (info.me.velocity.y < 0) ay += 1
    else if (info.me.velocity.y > 0) ay -= 1
    return IntVec(ax, ay)
  }
  var c : Candidate = best
  while (c.from != initialCand) {
    c = c.from!!
  }
  return c.how
}

fun main(args : Array<String>) {
  val input = java.util.Scanner(System.`in`)
  val course = RaceCourse(input)
  println(0)
  System.out.flush()
  try {
    while (true) {
      val info = RaceInfo(input, course)
      val accel = plan(info, course)
      println("${accel.x} ${accel.y}")
      System.out.flush()
    }
  } catch (e : Exception) {
  }
}

Compiled from "greedy.kt"
public final class GreedyKt {
  public static final int SEARCHDEPTH;

  public static final int SPEEDLIMIT;

  public static final int searchDepth;

  public static final int speedLimitSquared;

  private static int nextSeq;

  public static final int getNextSeq();
    Code:
       0: getstatic     #10                 // Field nextSeq:I
       3: ireturn

  public static final void setNextSeq(int);
    Code:
       0: iload_0
       1: putstatic     #10                 // Field nextSeq:I
       4: return

  public static final void addSquares(int, int, int, java.util.List<IntVec>);
    Code:
       0: aload_3
       1: ldc           #19                 // String squares
       3: invokestatic  #25                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: iload_2
       7: iload_1
       8: if_icmple     26
      11: new           #27                 // class kotlin/ranges/IntRange
      14: dup
      15: iload_1
      16: iload_2
      17: invokespecial #31                 // Method kotlin/ranges/IntRange."<init>":(II)V
      20: checkcast     #33                 // class kotlin/ranges/IntProgression
      23: goto          31
      26: iload_1
      27: iload_2
      28: invokestatic  #39                 // Method kotlin/ranges/RangesKt.downTo:(II)Lkotlin/ranges/IntProgression;
      31: astore        4
      33: aload         4
      35: invokevirtual #42                 // Method kotlin/ranges/IntProgression.getFirst:()I
      38: istore        5
      40: aload         4
      42: invokevirtual #45                 // Method kotlin/ranges/IntProgression.getLast:()I
      45: istore        6
      47: aload         4
      49: invokevirtual #48                 // Method kotlin/ranges/IntProgression.getStep:()I
      52: istore        7
      54: iload         7
      56: ifle          66
      59: iload         5
      61: iload         6
      63: if_icmple     78
      66: iload         7
      68: ifge          112
      71: iload         6
      73: iload         5
      75: if_icmpgt     112
      78: aload_3
      79: new           #50                 // class IntVec
      82: dup
      83: iload_0
      84: iload         5
      86: invokespecial #51                 // Method IntVec."<init>":(II)V
      89: invokeinterface #57,  2           // InterfaceMethod java/util/List.add:(Ljava/lang/Object;)Z
      94: pop
      95: iload         5
      97: iload         6
      99: if_icmpeq     112
     102: iload         5
     104: iload         7
     106: iadd
     107: istore        5
     109: goto          78
     112: return

  public static final IntVec plan(RaceInfo, RaceCourse);
    Code:
       0: aload_0
       1: ldc           #66                 // String info
       3: invokestatic  #25                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: aload_1
       7: ldc           #68                 // String course
       9: invokestatic  #25                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
      12: new           #70                 // class java/util/PriorityQueue
      15: dup
      16: invokespecial #73                 // Method java/util/PriorityQueue."<init>":()V
      19: astore_2
      20: new           #75                 // class PlayerState
      23: dup
      24: aload_0
      25: invokevirtual #81                 // Method RaceInfo.getMe:()LPlayerState;
      28: invokevirtual #85                 // Method PlayerState.getPosition:()LIntVec;
      31: aload_0
      32: invokevirtual #81                 // Method RaceInfo.getMe:()LPlayerState;
      35: invokevirtual #88                 // Method PlayerState.getVelocity:()LIntVec;
      38: invokespecial #91                 // Method PlayerState."<init>":(LIntVec;LIntVec;)V
      41: astore_3
      42: new           #93                 // class Candidate
      45: dup
      46: aload_1
      47: iconst_0
      48: aload_3
      49: aconst_null
      50: new           #50                 // class IntVec
      53: dup
      54: iconst_0
      55: iconst_0
      56: invokespecial #51                 // Method IntVec."<init>":(II)V
      59: invokespecial #96                 // Method Candidate."<init>":(LRaceCourse;ILPlayerState;LCandidate;LIntVec;)V
      62: astore        4
      64: iconst_1
      65: anewarray     #98                 // class kotlin/Pair
      68: astore        6
      70: aload         6
      72: iconst_0
      73: aload_3
      74: aload         4
      76: invokestatic  #104                // Method kotlin/TuplesKt.to:(Ljava/lang/Object;Ljava/lang/Object;)Lkotlin/Pair;
      79: aastore
      80: aload         6
      82: invokestatic  #110                // Method kotlin/collections/MapsKt.mutableMapOf:([Lkotlin/Pair;)Ljava/util/Map;
      85: astore        5
      87: aload         4
      89: astore        6
      91: aload_2
      92: aload         4
      94: invokevirtual #111                // Method java/util/PriorityQueue.add:(Ljava/lang/Object;)Z
      97: pop
      98: aload_2
      99: invokevirtual #115                // Method java/util/PriorityQueue.isEmpty:()Z
     102: ifne          622
     105: aload_2
     106: invokevirtual #119                // Method java/util/PriorityQueue.poll:()Ljava/lang/Object;
     109: checkcast     #93                 // class Candidate
     112: astore        7
     114: iconst_1
     115: istore        8
     117: bipush        -2
     119: iload         8
     121: if_icmpge     98
     124: iconst_m1
     125: istore        9
     127: iload         9
     129: iconst_2
     130: if_icmpge     616
     133: new           #50                 // class IntVec
     136: dup
     137: iload         9
     139: iload         8
     141: invokespecial #51                 // Method IntVec."<init>":(II)V
     144: astore        10
     146: aload         7
     148: invokevirtual #122                // Method Candidate.getState:()LPlayerState;
     151: invokevirtual #88                 // Method PlayerState.getVelocity:()LIntVec;
     154: aload         10
     156: invokevirtual #126                // Method IntVec.plus:(LIntVec;)LIntVec;
     159: astore        11
     161: aload         11
     163: invokevirtual #129                // Method IntVec.getX:()I
     166: aload         11
     168: invokevirtual #129                // Method IntVec.getX:()I
     171: imul
     172: aload         11
     174: invokevirtual #132                // Method IntVec.getY:()I
     177: aload         11
     179: invokevirtual #132                // Method IntVec.getY:()I
     182: imul
     183: iadd
     184: ldc           #133                // int 1000000
     186: if_icmpgt     610
     189: aload         7
     191: invokevirtual #122                // Method Candidate.getState:()LPlayerState;
     194: invokevirtual #85                 // Method PlayerState.getPosition:()LIntVec;
     197: aload         11
     199: invokevirtual #126                // Method IntVec.plus:(LIntVec;)LIntVec;
     202: astore        12
     204: iconst_0
     205: aload         12
     207: invokevirtual #129                // Method IntVec.getX:()I
     210: if_icmpgt     610
     213: aload         12
     215: invokevirtual #129                // Method IntVec.getX:()I
     218: aload_1
     219: invokevirtual #138                // Method RaceCourse.getWidth:()I
     222: if_icmpge     610
     225: new           #140                // class Movement
     228: dup
     229: aload         7
     231: invokevirtual #122                // Method Candidate.getState:()LPlayerState;
     234: invokevirtual #85                 // Method PlayerState.getPosition:()LIntVec;
     237: aload         12
     239: invokespecial #141                // Method Movement."<init>":(LIntVec;LIntVec;)V
     242: astore        13
     244: aload         13
     246: invokevirtual #145                // Method Movement.touchedSquares:()Ljava/util/List;
     249: astore        14
     251: aload         12
     253: aload_0
     254: invokevirtual #148                // Method RaceInfo.getOpponent:()LPlayerState;
     257: invokevirtual #85                 // Method PlayerState.getPosition:()LIntVec;
     260: invokestatic  #152                // Method kotlin/jvm/internal/Intrinsics.areEqual:(Ljava/lang/Object;Ljava/lang/Object;)Z
     263: ifne          610
     266: aload         14
     268: checkcast     #154                // class java/lang/Iterable
     271: astore        15
     273: iconst_0
     274: istore        16
     276: aload         15
     278: instanceof    #156                // class java/util/Collection
     281: ifeq          301
     284: aload         15
     286: checkcast     #156                // class java/util/Collection
     289: invokeinterface #157,  1          // InterfaceMethod java/util/Collection.isEmpty:()Z
     294: ifeq          301
     297: iconst_1
     298: goto          410
     301: aload         15
     303: invokeinterface #161,  1          // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     308: astore        17
     310: aload         17
     312: invokeinterface #166,  1          // InterfaceMethod java/util/Iterator.hasNext:()Z
     317: ifeq          409
     320: aload         17
     322: invokeinterface #169,  1          // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     327: astore        18
     329: aload         18
     331: checkcast     #50                 // class IntVec
     334: astore        19
     336: iconst_0
     337: istore        20
     339: iconst_0
     340: aload         19
     342: invokevirtual #132                // Method IntVec.getY:()I
     345: if_icmpgt     397
     348: aload         19
     350: invokevirtual #132                // Method IntVec.getY:()I
     353: aload_1
     354: invokevirtual #172                // Method RaceCourse.getLength:()I
     357: if_icmpge     397
     360: aload_0
     361: invokevirtual #175                // Method RaceInfo.getSquares:()Ljava/util/List;
     364: aload         19
     366: invokevirtual #132                // Method IntVec.getY:()I
     369: invokeinterface #179,  2          // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     374: checkcast     #53                 // class java/util/List
     377: aload         19
     379: invokevirtual #129                // Method IntVec.getX:()I
     382: invokeinterface #179,  2          // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     387: checkcast     #181                // class java/lang/Number
     390: invokevirtual #184                // Method java/lang/Number.intValue:()I
     393: iconst_1
     394: if_icmpeq     401
     397: iconst_1
     398: goto          402
     401: iconst_0
     402: ifne          310
     405: iconst_0
     406: goto          410
     409: iconst_1
     410: ifeq          610
     413: iconst_0
     414: aload         12
     416: invokevirtual #132                // Method IntVec.getY:()I
     419: if_icmpgt     482
     422: aload         12
     424: invokevirtual #132                // Method IntVec.getY:()I
     427: aload_1
     428: invokevirtual #172                // Method RaceCourse.getLength:()I
     431: if_icmpge     482
     434: aload_0
     435: invokevirtual #175                // Method RaceInfo.getSquares:()Ljava/util/List;
     438: aload         12
     440: invokevirtual #132                // Method IntVec.getY:()I
     443: invokeinterface #179,  2          // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     448: checkcast     #53                 // class java/util/List
     451: aload         12
     453: invokevirtual #129                // Method IntVec.getX:()I
     456: invokeinterface #179,  2          // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     461: checkcast     #181                // class java/lang/Number
     464: invokevirtual #184                // Method java/lang/Number.intValue:()I
     467: iconst_2
     468: if_icmpne     482
     471: new           #50                 // class IntVec
     474: dup
     475: iconst_0
     476: iconst_0
     477: invokespecial #51                 // Method IntVec."<init>":(II)V
     480: astore        11
     482: new           #75                 // class PlayerState
     485: dup
     486: aload         12
     488: aload         11
     490: invokespecial #91                 // Method PlayerState."<init>":(LIntVec;LIntVec;)V
     493: astore        15
     495: new           #93                 // class Candidate
     498: dup
     499: aload_1
     500: aload         7
     502: invokevirtual #185                // Method Candidate.getStep:()I
     505: iconst_1
     506: iadd
     507: aload         15
     509: aload         7
     511: aload         10
     513: invokespecial #96                 // Method Candidate."<init>":(LRaceCourse;ILPlayerState;LCandidate;LIntVec;)V
     516: astore        16
     518: aload         16
     520: invokevirtual #188                // Method Candidate.getGoaled:()Z
     523: ifne          610
     526: aload         7
     528: invokevirtual #185                // Method Candidate.getStep:()I
     531: bipush        7
     533: if_icmpge     610
     536: aload         5
     538: aload         15
     540: invokeinterface #193,  2          // InterfaceMethod java/util/Map.containsKey:(Ljava/lang/Object;)Z
     545: ifeq          577
     548: aload         5
     550: aload         15
     552: invokeinterface #196,  2          // InterfaceMethod java/util/Map.get:(Ljava/lang/Object;)Ljava/lang/Object;
     557: dup
     558: invokestatic  #200                // Method kotlin/jvm/internal/Intrinsics.checkNotNull:(Ljava/lang/Object;)V
     561: checkcast     #93                 // class Candidate
     564: invokevirtual #185                // Method Candidate.getStep:()I
     567: aload         7
     569: invokevirtual #185                // Method Candidate.getStep:()I
     572: iconst_1
     573: iadd
     574: if_icmple     610
     577: aload_2
     578: aload         16
     580: invokevirtual #111                // Method java/util/PriorityQueue.add:(Ljava/lang/Object;)Z
     583: pop
     584: aload         5
     586: aload         15
     588: aload         16
     590: invokeinterface #204,  3          // InterfaceMethod java/util/Map.put:(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
     595: pop
     596: aload         16
     598: aload         6
     600: invokevirtual #208                // Method Candidate.compareTo:(LCandidate;)I
     603: ifge          610
     606: aload         16
     608: astore        6
     610: iinc          9, 1
     613: goto          127
     616: iinc          8, -1
     619: goto          117
     622: aload         6
     624: aload         4
     626: invokestatic  #152                // Method kotlin/jvm/internal/Intrinsics.areEqual:(Ljava/lang/Object;Ljava/lang/Object;)Z
     629: ifeq          720
     632: iconst_0
     633: istore        7
     635: iconst_0
     636: istore        8
     638: aload_0
     639: invokevirtual #81                 // Method RaceInfo.getMe:()LPlayerState;
     642: invokevirtual #88                 // Method PlayerState.getVelocity:()LIntVec;
     645: invokevirtual #129                // Method IntVec.getX:()I
     648: ifge          657
     651: iinc          7, 1
     654: goto          673
     657: aload_0
     658: invokevirtual #81                 // Method RaceInfo.getMe:()LPlayerState;
     661: invokevirtual #88                 // Method PlayerState.getVelocity:()LIntVec;
     664: invokevirtual #129                // Method IntVec.getX:()I
     667: ifle          673
     670: iinc          7, -1
     673: aload_0
     674: invokevirtual #81                 // Method RaceInfo.getMe:()LPlayerState;
     677: invokevirtual #88                 // Method PlayerState.getVelocity:()LIntVec;
     680: invokevirtual #132                // Method IntVec.getY:()I
     683: ifge          692
     686: iinc          8, 1
     689: goto          708
     692: aload_0
     693: invokevirtual #81                 // Method RaceInfo.getMe:()LPlayerState;
     696: invokevirtual #88                 // Method PlayerState.getVelocity:()LIntVec;
     699: invokevirtual #132                // Method IntVec.getY:()I
     702: ifle          708
     705: iinc          8, -1
     708: new           #50                 // class IntVec
     711: dup
     712: iload         7
     714: iload         8
     716: invokespecial #51                 // Method IntVec."<init>":(II)V
     719: areturn
     720: aload         6
     722: astore        7
     724: aload         7
     726: invokevirtual #212                // Method Candidate.getFrom:()LCandidate;
     729: aload         4
     731: invokestatic  #152                // Method kotlin/jvm/internal/Intrinsics.areEqual:(Ljava/lang/Object;Ljava/lang/Object;)Z
     734: ifne          751
     737: aload         7
     739: invokevirtual #212                // Method Candidate.getFrom:()LCandidate;
     742: dup
     743: invokestatic  #200                // Method kotlin/jvm/internal/Intrinsics.checkNotNull:(Ljava/lang/Object;)V
     746: astore        7
     748: goto          724
     751: aload         7
     753: invokevirtual #215                // Method Candidate.getHow:()LIntVec;
     756: areturn

  public static final void main(java.lang.String[]);
    Code:
       0: aload_0
       1: ldc           #253                // String args
       3: invokestatic  #25                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: new           #255                // class java/util/Scanner
       9: dup
      10: getstatic     #261                // Field java/lang/System.in:Ljava/io/InputStream;
      13: invokespecial #264                // Method java/util/Scanner."<init>":(Ljava/io/InputStream;)V
      16: astore_1
      17: new           #135                // class RaceCourse
      20: dup
      21: aload_1
      22: invokespecial #267                // Method RaceCourse."<init>":(Ljava/util/Scanner;)V
      25: astore_2
      26: iconst_0
      27: istore_3
      28: getstatic     #271                // Field java/lang/System.out:Ljava/io/PrintStream;
      31: iload_3
      32: invokevirtual #276                // Method java/io/PrintStream.println:(I)V
      35: getstatic     #271                // Field java/lang/System.out:Ljava/io/PrintStream;
      38: invokevirtual #279                // Method java/io/PrintStream.flush:()V
      41: nop
      42: nop
      43: new           #77                 // class RaceInfo
      46: dup
      47: aload_1
      48: aload_2
      49: invokespecial #282                // Method RaceInfo."<init>":(Ljava/util/Scanner;LRaceCourse;)V
      52: astore_3
      53: aload_3
      54: aload_2
      55: invokestatic  #284                // Method plan:(LRaceInfo;LRaceCourse;)LIntVec;
      58: astore        4
      60: new           #286                // class java/lang/StringBuilder
      63: dup
      64: invokespecial #287                // Method java/lang/StringBuilder."<init>":()V
      67: aload         4
      69: invokevirtual #129                // Method IntVec.getX:()I
      72: invokevirtual #291                // Method java/lang/StringBuilder.append:(I)Ljava/lang/StringBuilder;
      75: bipush        32
      77: invokevirtual #294                // Method java/lang/StringBuilder.append:(C)Ljava/lang/StringBuilder;
      80: aload         4
      82: invokevirtual #132                // Method IntVec.getY:()I
      85: invokevirtual #291                // Method java/lang/StringBuilder.append:(I)Ljava/lang/StringBuilder;
      88: invokevirtual #298                // Method java/lang/StringBuilder.toString:()Ljava/lang/String;
      91: getstatic     #271                // Field java/lang/System.out:Ljava/io/PrintStream;
      94: swap
      95: invokevirtual #300                // Method java/io/PrintStream.println:(Ljava/lang/Object;)V
      98: getstatic     #271                // Field java/lang/System.out:Ljava/io/PrintStream;
     101: invokevirtual #279                // Method java/io/PrintStream.flush:()V
     104: goto          42
     107: astore_3
     108: return
    Exception table:
       from    to  target type
          41   107   107   Class java/lang/Exception

  static {};
    Code:
       0: iconst_1
       1: putstatic     #10                 // Field nextSeq:I
       4: return
}


fun quickSort(arr: IntArray, low: Int, high: Int) {
    if (low < high) {
        val pivotIndex = partition(arr, low, high)
        quickSort(arr, low, pivotIndex - 1)
        quickSort(arr, pivotIndex + 1, high)
    }
}

fun partition(arr: IntArray, low: Int, high: Int): Int {
    val pivot = arr[high]
    var i = low - 1
    for (j in low until high) {
        if (arr[j] <= pivot) {
            i++
            val temp = arr[i]
            arr[i] = arr[j]
            arr[j] = temp
        }
    }
    val temp = arr[i + 1]
    arr[i + 1] = arr[high]
    arr[high] = temp
    return i + 1
}

//The code above implements the QuickSort algorithm, a classic divide-and-conquer algorithm for sorting an array. The quickSort function takes in an array arr, a low index low, and a high index high, and sorts the subarray arr[low..high] in place. The partition function is used to divide the subarray into two parts: elements smaller than the pivot and elements greater than the pivot. The pivot is chosen as the last element of the subarray. The partition function rearranges the elements so that all elements smaller than the pivot are before it, and all elements greater than the pivot are after it. The pivot index is then returned, which becomes the boundary between the two subarrays in the subsequent recursive calls to quickSort. The QuickSort algorithm sorts the array by repeatedly dividing it into smaller subarrays and sorting those subarrays until they are small enough to be sorted directly.

Compiled from "kt.kt"
public final class KtKt {
  public static final void quickSort(int[], int, int);
    Code:
       0: aload_0
       1: ldc           #9                  // String arr
       3: invokestatic  #15                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: iload_1
       7: iload_2
       8: if_icmpge     34
      11: aload_0
      12: iload_1
      13: iload_2
      14: invokestatic  #19                 // Method partition:([III)I
      17: istore_3
      18: aload_0
      19: iload_1
      20: iload_3
      21: iconst_1
      22: isub
      23: invokestatic  #21                 // Method quickSort:([III)V
      26: aload_0
      27: iload_3
      28: iconst_1
      29: iadd
      30: iload_2
      31: invokestatic  #21                 // Method quickSort:([III)V
      34: return

  public static final int partition(int[], int, int);
    Code:
       0: aload_0
       1: ldc           #9                  // String arr
       3: invokestatic  #15                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: aload_0
       7: iload_2
       8: iaload
       9: istore_3
      10: iload_1
      11: iconst_1
      12: isub
      13: istore        4
      15: iload_1
      16: istore        5
      18: iload         5
      20: iload_2
      21: if_icmpge     61
      24: aload_0
      25: iload         5
      27: iaload
      28: iload_3
      29: if_icmpgt     55
      32: iinc          4, 1
      35: aload_0
      36: iload         4
      38: iaload
      39: istore        6
      41: aload_0
      42: iload         4
      44: aload_0
      45: iload         5
      47: iaload
      48: iastore
      49: aload_0
      50: iload         5
      52: iload         6
      54: iastore
      55: iinc          5, 1
      58: goto          18
      61: aload_0
      62: iload         4
      64: iconst_1
      65: iadd
      66: iaload
      67: istore        5
      69: aload_0
      70: iload         4
      72: iconst_1
      73: iadd
      74: aload_0
      75: iload_2
      76: iaload
      77: iastore
      78: aload_0
      79: iload_2
      80: iload         5
      82: iastore
      83: iload         4
      85: iconst_1
      86: iadd
      87: ireturn
}


enum class Relationship {

    EQUAL, SUBLIST, SUPERLIST, UNEQUAL

}

private enum class Case {
    EMPTY_CASE,
    FIRST_BIGGER_OR_EQUAL,
    FIRST_SMALLER
}

fun <T> List<T>.relationshipTo(other: List<T>): Relationship {
    return when (case(this, other)) {
        Case.EMPTY_CASE -> emptyCase(this, other)
        Case.FIRST_BIGGER_OR_EQUAL -> generalCase(this, other, Relationship.SUPERLIST)
        Case.FIRST_SMALLER -> generalCase(other, this, Relationship.SUBLIST)
    }
}

private fun <T> case(first: List<T>, second: List<T>): Case {
    if (first.isEmpty() || second.isEmpty()) return Case.EMPTY_CASE
    if (first.size >= second.size) return Case.FIRST_BIGGER_OR_EQUAL
    return Case.FIRST_SMALLER
}

private fun <T> emptyCase(first: List<T>, second: List<T>): Relationship {
    if (first.isEmpty() && second.isEmpty()) return Relationship.EQUAL
    if (first.isEmpty()) return Relationship.SUBLIST
    return Relationship.SUPERLIST
}

private fun <T> generalCase(first: List<T>, second: List<T>, case: Relationship): Relationship {
    for (i in 0..(first.size - second.size)) {
        for (j in 0 until second.size) {
            if (first[i+j] != second[j]) {
                break;
            }

            if (j + 1 == second.size) {
                if (first.size == second.size) return Relationship.EQUAL
                return case;
            }
        }
    }

    return Relationship.UNEQUAL
}

Compiled from "Relationship.kt"
public final class RelationshipKt {
  public static final <T> Relationship relationshipTo(java.util.List<? extends T>, java.util.List<? extends T>);
    Code:
       0: aload_0
       1: ldc           #10                 // String <this>
       3: invokestatic  #16                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: aload_1
       7: ldc           #18                 // String other
       9: invokestatic  #16                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
      12: aload_0
      13: aload_1
      14: invokestatic  #22                 // Method case:(Ljava/util/List;Ljava/util/List;)LCase;
      17: getstatic     #28                 // Field RelationshipKt$WhenMappings.$EnumSwitchMapping$0:[I
      20: swap
      21: invokevirtual #34                 // Method Case.ordinal:()I
      24: iaload
      25: tableswitch   { // 1 to 3
                     1: 52
                     2: 60
                     3: 71
               default: 82
          }
      52: aload_0
      53: aload_1
      54: invokestatic  #37                 // Method emptyCase:(Ljava/util/List;Ljava/util/List;)LRelationship;
      57: goto          90
      60: aload_0
      61: aload_1
      62: getstatic     #43                 // Field Relationship.SUPERLIST:LRelationship;
      65: invokestatic  #47                 // Method generalCase:(Ljava/util/List;Ljava/util/List;LRelationship;)LRelationship;
      68: goto          90
      71: aload_1
      72: aload_0
      73: getstatic     #50                 // Field Relationship.SUBLIST:LRelationship;
      76: invokestatic  #47                 // Method generalCase:(Ljava/util/List;Ljava/util/List;LRelationship;)LRelationship;
      79: goto          90
      82: new           #52                 // class kotlin/NoWhenBranchMatchedException
      85: dup
      86: invokespecial #56                 // Method kotlin/NoWhenBranchMatchedException."<init>":()V
      89: athrow
      90: areturn

  private static final <T> Case case(java.util.List<? extends T>, java.util.List<? extends T>);
    Code:
       0: aload_0
       1: invokeinterface #65,  1           // InterfaceMethod java/util/List.isEmpty:()Z
       6: ifne          18
       9: aload_1
      10: invokeinterface #65,  1           // InterfaceMethod java/util/List.isEmpty:()Z
      15: ifeq          22
      18: getstatic     #69                 // Field Case.EMPTY_CASE:LCase;
      21: areturn
      22: aload_0
      23: invokeinterface #72,  1           // InterfaceMethod java/util/List.size:()I
      28: aload_1
      29: invokeinterface #72,  1           // InterfaceMethod java/util/List.size:()I
      34: if_icmplt     41
      37: getstatic     #75                 // Field Case.FIRST_BIGGER_OR_EQUAL:LCase;
      40: areturn
      41: getstatic     #78                 // Field Case.FIRST_SMALLER:LCase;
      44: areturn

  private static final <T> Relationship emptyCase(java.util.List<? extends T>, java.util.List<? extends T>);
    Code:
       0: aload_0
       1: invokeinterface #65,  1           // InterfaceMethod java/util/List.isEmpty:()Z
       6: ifeq          22
       9: aload_1
      10: invokeinterface #65,  1           // InterfaceMethod java/util/List.isEmpty:()Z
      15: ifeq          22
      18: getstatic     #83                 // Field Relationship.EQUAL:LRelationship;
      21: areturn
      22: aload_0
      23: invokeinterface #65,  1           // InterfaceMethod java/util/List.isEmpty:()Z
      28: ifeq          35
      31: getstatic     #50                 // Field Relationship.SUBLIST:LRelationship;
      34: areturn
      35: getstatic     #43                 // Field Relationship.SUPERLIST:LRelationship;
      38: areturn

  private static final <T> Relationship generalCase(java.util.List<? extends T>, java.util.List<? extends T>, Relationship);
    Code:
       0: iconst_0
       1: istore_3
       2: aload_0
       3: invokeinterface #72,  1           // InterfaceMethod java/util/List.size:()I
       8: aload_1
       9: invokeinterface #72,  1           // InterfaceMethod java/util/List.size:()I
      14: isub
      15: istore        4
      17: iload_3
      18: iload         4
      20: if_icmpgt     120
      23: iconst_0
      24: istore        5
      26: aload_1
      27: invokeinterface #72,  1           // InterfaceMethod java/util/List.size:()I
      32: istore        6
      34: iload         5
      36: iload         6
      38: if_icmpge     108
      41: aload_0
      42: iload_3
      43: iload         5
      45: iadd
      46: invokeinterface #88,  2           // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
      51: aload_1
      52: iload         5
      54: invokeinterface #88,  2           // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
      59: invokestatic  #92                 // Method kotlin/jvm/internal/Intrinsics.areEqual:(Ljava/lang/Object;Ljava/lang/Object;)Z
      62: ifne          68
      65: goto          108
      68: iload         5
      70: iconst_1
      71: iadd
      72: aload_1
      73: invokeinterface #72,  1           // InterfaceMethod java/util/List.size:()I
      78: if_icmpne     102
      81: aload_0
      82: invokeinterface #72,  1           // InterfaceMethod java/util/List.size:()I
      87: aload_1
      88: invokeinterface #72,  1           // InterfaceMethod java/util/List.size:()I
      93: if_icmpne     100
      96: getstatic     #83                 // Field Relationship.EQUAL:LRelationship;
      99: areturn
     100: aload_2
     101: areturn
     102: iinc          5, 1
     105: goto          34
     108: iload_3
     109: iload         4
     111: if_icmpeq     120
     114: iinc          3, 1
     117: goto          23
     120: getstatic     #95                 // Field Relationship.UNEQUAL:LRelationship;
     123: areturn
}

Compiled from "Relationship.kt"
public final class RelationshipKt$WhenMappings {
  public static final int[] $EnumSwitchMapping$0;

  static {};
    Code:
       0: invokestatic  #14                 // Method Case.values:()[LCase;
       3: arraylength
       4: newarray       int
       6: astore_0
       7: nop
       8: aload_0
       9: getstatic     #18                 // Field Case.EMPTY_CASE:LCase;
      12: invokevirtual #22                 // Method Case.ordinal:()I
      15: iconst_1
      16: iastore
      17: goto          21
      20: astore_1
      21: nop
      22: aload_0
      23: getstatic     #25                 // Field Case.FIRST_BIGGER_OR_EQUAL:LCase;
      26: invokevirtual #22                 // Method Case.ordinal:()I
      29: iconst_2
      30: iastore
      31: goto          35
      34: astore_1
      35: nop
      36: aload_0
      37: getstatic     #28                 // Field Case.FIRST_SMALLER:LCase;
      40: invokevirtual #22                 // Method Case.ordinal:()I
      43: iconst_3
      44: iastore
      45: goto          49
      48: astore_1
      49: aload_0
      50: putstatic     #32                 // Field $EnumSwitchMapping$0:[I
      53: return
    Exception table:
       from    to  target type
           7    17    20   Class java/lang/NoSuchFieldError
          21    31    34   Class java/lang/NoSuchFieldError
          35    45    48   Class java/lang/NoSuchFieldError
}

Compiled from "Relationship.kt"
public final class Relationship extends java.lang.Enum<Relationship> {
  public static final Relationship EQUAL;

  public static final Relationship SUBLIST;

  public static final Relationship SUPERLIST;

  public static final Relationship UNEQUAL;

  private static final Relationship[] $VALUES;

  private static final kotlin.enums.EnumEntries $ENTRIES;

  private Relationship();
    Code:
       0: aload_0
       1: aload_1
       2: iload_2
       3: invokespecial #10                 // Method java/lang/Enum."<init>":(Ljava/lang/String;I)V
       6: return

  public static Relationship[] values();
    Code:
       0: getstatic     #22                 // Field $VALUES:[LRelationship;
       3: invokevirtual #28                 // Method java/lang/Object.clone:()Ljava/lang/Object;
       6: checkcast     #29                 // class "[LRelationship;"
       9: areturn

  public static Relationship valueOf(java.lang.String);
    Code:
       0: ldc           #2                  // class Relationship
       2: aload_0
       3: invokestatic  #34                 // Method java/lang/Enum.valueOf:(Ljava/lang/Class;Ljava/lang/String;)Ljava/lang/Enum;
       6: checkcast     #2                  // class Relationship
       9: areturn

  public static kotlin.enums.EnumEntries<Relationship> getEntries();
    Code:
       0: getstatic     #43                 // Field $ENTRIES:Lkotlin/enums/EnumEntries;
       3: areturn

  private static final Relationship[] $values();
    Code:
       0: iconst_4
       1: anewarray     #2                  // class Relationship
       4: astore_0
       5: aload_0
       6: iconst_0
       7: getstatic     #47                 // Field EQUAL:LRelationship;
      10: aastore
      11: aload_0
      12: iconst_1
      13: getstatic     #50                 // Field SUBLIST:LRelationship;
      16: aastore
      17: aload_0
      18: iconst_2
      19: getstatic     #53                 // Field SUPERLIST:LRelationship;
      22: aastore
      23: aload_0
      24: iconst_3
      25: getstatic     #56                 // Field UNEQUAL:LRelationship;
      28: aastore
      29: aload_0
      30: areturn

  static {};
    Code:
       0: new           #2                  // class Relationship
       3: dup
       4: ldc           #58                 // String EQUAL
       6: iconst_0
       7: invokespecial #59                 // Method "<init>":(Ljava/lang/String;I)V
      10: putstatic     #47                 // Field EQUAL:LRelationship;
      13: new           #2                  // class Relationship
      16: dup
      17: ldc           #60                 // String SUBLIST
      19: iconst_1
      20: invokespecial #59                 // Method "<init>":(Ljava/lang/String;I)V
      23: putstatic     #50                 // Field SUBLIST:LRelationship;
      26: new           #2                  // class Relationship
      29: dup
      30: ldc           #61                 // String SUPERLIST
      32: iconst_2
      33: invokespecial #59                 // Method "<init>":(Ljava/lang/String;I)V
      36: putstatic     #53                 // Field SUPERLIST:LRelationship;
      39: new           #2                  // class Relationship
      42: dup
      43: ldc           #62                 // String UNEQUAL
      45: iconst_3
      46: invokespecial #59                 // Method "<init>":(Ljava/lang/String;I)V
      49: putstatic     #56                 // Field UNEQUAL:LRelationship;
      52: invokestatic  #64                 // Method $values:()[LRelationship;
      55: putstatic     #22                 // Field $VALUES:[LRelationship;
      58: getstatic     #22                 // Field $VALUES:[LRelationship;
      61: checkcast     #66                 // class "[Ljava/lang/Enum;"
      64: invokestatic  #72                 // Method kotlin/enums/EnumEntriesKt.enumEntries:([Ljava/lang/Enum;)Lkotlin/enums/EnumEntries;
      67: putstatic     #43                 // Field $ENTRIES:Lkotlin/enums/EnumEntries;
      70: return
}