var ifCount = 0
var elseCount = 0
const val cheapSeatCoast = 8
const val expSeatCoast = 10

fun main() {
    val (rows,seats) = greeting()
    val cinema = mutListCreator(rows)
    boardFiller(cinema,rows,seats)
    multipleChoise(cinema,rows,seats)
}

fun greeting(): Pair<Int,Int>{
    println("Enter the number of rows:")
    val rows = readln().toInt()
    println("Enter the number of seats in each row:")
    val seats = readln().toInt()
    return Pair(rows,seats)
}

fun mutListCreator(rows:Int):MutableList<MutableList<String>>{
    val outList = mutableListOf<MutableList<String>>()
    for(i in 0 until rows){
        val a = mutableListOf<String>()
        outList.add(a)
    }
    return outList
}

fun boardFiller(list: MutableList<MutableList<String>>, rows:Int, columns:Int){
    for(j in 0 until columns) {
        for (i in 0 until rows) {
            list[i].add("S ")
        }
    }
}

fun boardPrint(list:MutableList<MutableList<String>>,rows:Int,seats:Int){
    println("Cinema:")
    print("  ")
    for(i in 1 until seats+1){
        print("$i ")
    }
    println()
    for(i in 0 until rows) {
        println("${i+1} ${list[i].joinToString("")}")
    }
}

fun seatChoise(list:MutableList<MutableList<String>>,rows:Int,seats:Int){
    println("Enter a row number:")
    val r = readln().toInt()
    println("Enter a seat number in that row:")
    val s = readln().toInt()
    if(r>rows||s>seats) {
        println("Wrong input!")
        seatChoise(list, rows, seats)
    } else if(list[r-1][s-1] == "B "){
        println("That ticket has already been purchased!")
        seatChoise(list,rows,seats)
    }  else {
        if (rows * seats <= 60) {
            println("Ticket price: $$expSeatCoast")
            ifCount++
        } else if (rows * seats > 60) {
            if (r <= rows / 2) {
                println("Ticket price: $$expSeatCoast")
                ifCount++
            } else if (r > rows / 2) {
                println("Ticket price: $$cheapSeatCoast")
                elseCount++
            }
        }
        list[r - 1][s - 1] = "B "
    }
}

fun statistics(rows:Int,seats:Int){
    val allTicets = ifCount + elseCount
    val allSeats = rows*seats
    val percentage:Double = allTicets.toDouble()/allSeats.toDouble()*100
    val formatPercentage = "%.2f".format(percentage)
    val currentIncome =  (ifCount * expSeatCoast) + (elseCount * cheapSeatCoast)
    var totalIncome = 0
    if(rows*seats <= 60) {
        totalIncome = rows*seats*expSeatCoast
    } else if(rows*seats > 60){
        totalIncome = rows/2*expSeatCoast*seats + (rows - rows/2)*cheapSeatCoast*seats
    }

    println("Number of purchased tickets: $allTicets")
    println("Percentage: $formatPercentage%")
    println("Current income: $$currentIncome")
    println("Total income: $$totalIncome")
}

fun multipleChoise(list:MutableList<MutableList<String>>,rows:Int,seats:Int){
    println("1. Show the seats")
    println("2. Buy a ticket")
    println("3. Statistics")
    println("0. Exit")
    val num = readln().toInt()
    when(num){
        1 -> {
            boardPrint(list, rows, seats)
            multipleChoise(list, rows, seats)
        }
        2 -> {
            seatChoise(list, rows, seats)
            boardPrint(list, rows, seats)
            multipleChoise(list, rows, seats)
        }
        3-> {
            statistics(rows, seats)
            multipleChoise(list, rows, seats)
        }
    }
}

Compiled from "cinema_manager.kt"
public final class Cinema_managerKt {
  private static int ifCount;

  private static int elseCount;

  public static final int cheapSeatCoast;

  public static final int expSeatCoast;

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

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

  public static final int getElseCount();
    Code:
       0: getstatic     #17                 // Field elseCount:I
       3: ireturn

  public static final void setElseCount(int);
    Code:
       0: iload_0
       1: putstatic     #17                 // Field elseCount:I
       4: return

  public static final void main();
    Code:
       0: invokestatic  #24                 // Method greeting:()Lkotlin/Pair;
       3: astore_0
       4: aload_0
       5: invokevirtual #30                 // Method kotlin/Pair.component1:()Ljava/lang/Object;
       8: checkcast     #32                 // class java/lang/Number
      11: invokevirtual #35                 // Method java/lang/Number.intValue:()I
      14: istore_1
      15: aload_0
      16: invokevirtual #38                 // Method kotlin/Pair.component2:()Ljava/lang/Object;
      19: checkcast     #32                 // class java/lang/Number
      22: invokevirtual #35                 // Method java/lang/Number.intValue:()I
      25: istore_2
      26: iload_1
      27: invokestatic  #42                 // Method mutListCreator:(I)Ljava/util/List;
      30: astore_3
      31: aload_3
      32: iload_1
      33: iload_2
      34: invokestatic  #46                 // Method boardFiller:(Ljava/util/List;II)V
      37: aload_3
      38: iload_1
      39: iload_2
      40: invokestatic  #49                 // Method multipleChoise:(Ljava/util/List;II)V
      43: return

  public static final kotlin.Pair<java.lang.Integer, java.lang.Integer> greeting();
    Code:
       0: ldc           #57                 // String Enter the number of rows:
       2: getstatic     #63                 // Field java/lang/System.out:Ljava/io/PrintStream;
       5: swap
       6: invokevirtual #69                 // Method java/io/PrintStream.println:(Ljava/lang/Object;)V
       9: invokestatic  #75                 // Method kotlin/io/ConsoleKt.readln:()Ljava/lang/String;
      12: invokestatic  #81                 // Method java/lang/Integer.parseInt:(Ljava/lang/String;)I
      15: istore_0
      16: ldc           #83                 // String Enter the number of seats in each row:
      18: getstatic     #63                 // Field java/lang/System.out:Ljava/io/PrintStream;
      21: swap
      22: invokevirtual #69                 // Method java/io/PrintStream.println:(Ljava/lang/Object;)V
      25: invokestatic  #75                 // Method kotlin/io/ConsoleKt.readln:()Ljava/lang/String;
      28: invokestatic  #81                 // Method java/lang/Integer.parseInt:(Ljava/lang/String;)I
      31: istore_1
      32: new           #26                 // class kotlin/Pair
      35: dup
      36: iload_0
      37: invokestatic  #87                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
      40: iload_1
      41: invokestatic  #87                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
      44: invokespecial #91                 // Method kotlin/Pair."<init>":(Ljava/lang/Object;Ljava/lang/Object;)V
      47: areturn

  public static final java.util.List<java.util.List<java.lang.String>> mutListCreator(int);
    Code:
       0: new           #94                 // class java/util/ArrayList
       3: dup
       4: invokespecial #96                 // Method java/util/ArrayList."<init>":()V
       7: checkcast     #98                 // class java/util/List
      10: astore_1
      11: iconst_0
      12: istore_2
      13: iload_2
      14: iload_0
      15: if_icmpge     43
      18: new           #94                 // class java/util/ArrayList
      21: dup
      22: invokespecial #96                 // Method java/util/ArrayList."<init>":()V
      25: checkcast     #98                 // class java/util/List
      28: astore_3
      29: aload_1
      30: aload_3
      31: invokeinterface #102,  2          // InterfaceMethod java/util/List.add:(Ljava/lang/Object;)Z
      36: pop
      37: iinc          2, 1
      40: goto          13
      43: aload_1
      44: areturn

  public static final void boardFiller(java.util.List<java.util.List<java.lang.String>>, int, int);
    Code:
       0: aload_0
       1: ldc           #108                // String list
       3: invokestatic  #114                // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: iconst_0
       7: istore_3
       8: iload_3
       9: iload_2
      10: if_icmpge     53
      13: iconst_0
      14: istore        4
      16: iload         4
      18: iload_1
      19: if_icmpge     47
      22: aload_0
      23: iload         4
      25: invokeinterface #118,  2          // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
      30: checkcast     #98                 // class java/util/List
      33: ldc           #120                // String S
      35: invokeinterface #102,  2          // InterfaceMethod java/util/List.add:(Ljava/lang/Object;)Z
      40: pop
      41: iinc          4, 1
      44: goto          16
      47: iinc          3, 1
      50: goto          8
      53: return

  public static final void boardPrint(java.util.List<java.util.List<java.lang.String>>, int, int);
    Code:
       0: aload_0
       1: ldc           #108                // String list
       3: invokestatic  #114                // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: ldc           #125                // String Cinema:
       8: getstatic     #63                 // Field java/lang/System.out:Ljava/io/PrintStream;
      11: swap
      12: invokevirtual #69                 // Method java/io/PrintStream.println:(Ljava/lang/Object;)V
      15: ldc           #127                // String
      17: getstatic     #63                 // Field java/lang/System.out:Ljava/io/PrintStream;
      20: swap
      21: invokevirtual #130                // Method java/io/PrintStream.print:(Ljava/lang/Object;)V
      24: iconst_1
      25: istore_3
      26: iload_2
      27: iconst_1
      28: iadd
      29: istore        4
      31: iload_3
      32: iload         4
      34: if_icmpge     69
      37: new           #132                // class java/lang/StringBuilder
      40: dup
      41: invokespecial #133                // Method java/lang/StringBuilder."<init>":()V
      44: iload_3
      45: invokevirtual #137                // Method java/lang/StringBuilder.append:(I)Ljava/lang/StringBuilder;
      48: bipush        32
      50: invokevirtual #140                // Method java/lang/StringBuilder.append:(C)Ljava/lang/StringBuilder;
      53: invokevirtual #143                // Method java/lang/StringBuilder.toString:()Ljava/lang/String;
      56: getstatic     #63                 // Field java/lang/System.out:Ljava/io/PrintStream;
      59: swap
      60: invokevirtual #130                // Method java/io/PrintStream.print:(Ljava/lang/Object;)V
      63: iinc          3, 1
      66: goto          31
      69: getstatic     #63                 // Field java/lang/System.out:Ljava/io/PrintStream;
      72: invokevirtual #145                // Method java/io/PrintStream.println:()V
      75: iconst_0
      76: istore_3
      77: iload_3
      78: iload_1
      79: if_icmpge     145
      82: new           #132                // class java/lang/StringBuilder
      85: dup
      86: invokespecial #133                // Method java/lang/StringBuilder."<init>":()V
      89: iload_3
      90: iconst_1
      91: iadd
      92: invokevirtual #137                // Method java/lang/StringBuilder.append:(I)Ljava/lang/StringBuilder;
      95: bipush        32
      97: invokevirtual #140                // Method java/lang/StringBuilder.append:(C)Ljava/lang/StringBuilder;
     100: aload_0
     101: iload_3
     102: invokeinterface #118,  2          // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     107: checkcast     #147                // class java/lang/Iterable
     110: ldc           #149                // String
     112: checkcast     #151                // class java/lang/CharSequence
     115: aconst_null
     116: aconst_null
     117: iconst_0
     118: aconst_null
     119: aconst_null
     120: bipush        62
     122: aconst_null
     123: invokestatic  #157                // 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;
     126: invokevirtual #160                // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
     129: invokevirtual #143                // Method java/lang/StringBuilder.toString:()Ljava/lang/String;
     132: getstatic     #63                 // Field java/lang/System.out:Ljava/io/PrintStream;
     135: swap
     136: invokevirtual #69                 // Method java/io/PrintStream.println:(Ljava/lang/Object;)V
     139: iinc          3, 1
     142: goto          77
     145: return

  public static final void seatChoise(java.util.List<java.util.List<java.lang.String>>, int, int);
    Code:
       0: aload_0
       1: ldc           #108                // String list
       3: invokestatic  #114                // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: ldc           #163                // String Enter a row number:
       8: getstatic     #63                 // Field java/lang/System.out:Ljava/io/PrintStream;
      11: swap
      12: invokevirtual #69                 // Method java/io/PrintStream.println:(Ljava/lang/Object;)V
      15: invokestatic  #75                 // Method kotlin/io/ConsoleKt.readln:()Ljava/lang/String;
      18: invokestatic  #81                 // Method java/lang/Integer.parseInt:(Ljava/lang/String;)I
      21: istore_3
      22: ldc           #165                // String Enter a seat number in that row:
      24: getstatic     #63                 // Field java/lang/System.out:Ljava/io/PrintStream;
      27: swap
      28: invokevirtual #69                 // Method java/io/PrintStream.println:(Ljava/lang/Object;)V
      31: invokestatic  #75                 // Method kotlin/io/ConsoleKt.readln:()Ljava/lang/String;
      34: invokestatic  #81                 // Method java/lang/Integer.parseInt:(Ljava/lang/String;)I
      37: istore        4
      39: iload_3
      40: iload_1
      41: if_icmpgt     50
      44: iload         4
      46: iload_2
      47: if_icmple     68
      50: ldc           #167                // String Wrong input!
      52: getstatic     #63                 // Field java/lang/System.out:Ljava/io/PrintStream;
      55: swap
      56: invokevirtual #69                 // Method java/io/PrintStream.println:(Ljava/lang/Object;)V
      59: aload_0
      60: iload_1
      61: iload_2
      62: invokestatic  #169                // Method seatChoise:(Ljava/util/List;II)V
      65: goto          238
      68: aload_0
      69: iload_3
      70: iconst_1
      71: isub
      72: invokeinterface #118,  2          // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
      77: checkcast     #98                 // class java/util/List
      80: iload         4
      82: iconst_1
      83: isub
      84: invokeinterface #118,  2          // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
      89: ldc           #171                // String B
      91: invokestatic  #175                // Method kotlin/jvm/internal/Intrinsics.areEqual:(Ljava/lang/Object;Ljava/lang/Object;)Z
      94: ifeq          115
      97: ldc           #177                // String That ticket has already been purchased!
      99: getstatic     #63                 // Field java/lang/System.out:Ljava/io/PrintStream;
     102: swap
     103: invokevirtual #69                 // Method java/io/PrintStream.println:(Ljava/lang/Object;)V
     106: aload_0
     107: iload_1
     108: iload_2
     109: invokestatic  #169                // Method seatChoise:(Ljava/util/List;II)V
     112: goto          238
     115: iload_1
     116: iload_2
     117: imul
     118: bipush        60
     120: if_icmpgt     147
     123: ldc           #179                // String Ticket price: $10
     125: getstatic     #63                 // Field java/lang/System.out:Ljava/io/PrintStream;
     128: swap
     129: invokevirtual #69                 // Method java/io/PrintStream.println:(Ljava/lang/Object;)V
     132: getstatic     #10                 // Field ifCount:I
     135: istore        5
     137: iload         5
     139: iconst_1
     140: iadd
     141: putstatic     #10                 // Field ifCount:I
     144: goto          214
     147: iload_1
     148: iload_2
     149: imul
     150: bipush        60
     152: if_icmple     214
     155: iload_3
     156: iload_1
     157: iconst_2
     158: idiv
     159: if_icmpgt     186
     162: ldc           #179                // String Ticket price: $10
     164: getstatic     #63                 // Field java/lang/System.out:Ljava/io/PrintStream;
     167: swap
     168: invokevirtual #69                 // Method java/io/PrintStream.println:(Ljava/lang/Object;)V
     171: getstatic     #10                 // Field ifCount:I
     174: istore        5
     176: iload         5
     178: iconst_1
     179: iadd
     180: putstatic     #10                 // Field ifCount:I
     183: goto          214
     186: iload_3
     187: iload_1
     188: iconst_2
     189: idiv
     190: if_icmple     214
     193: ldc           #181                // String Ticket price: $8
     195: getstatic     #63                 // Field java/lang/System.out:Ljava/io/PrintStream;
     198: swap
     199: invokevirtual #69                 // Method java/io/PrintStream.println:(Ljava/lang/Object;)V
     202: getstatic     #17                 // Field elseCount:I
     205: istore        5
     207: iload         5
     209: iconst_1
     210: iadd
     211: putstatic     #17                 // Field elseCount:I
     214: aload_0
     215: iload_3
     216: iconst_1
     217: isub
     218: invokeinterface #118,  2          // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     223: checkcast     #98                 // class java/util/List
     226: iload         4
     228: iconst_1
     229: isub
     230: ldc           #171                // String B
     232: invokeinterface #185,  3          // InterfaceMethod java/util/List.set:(ILjava/lang/Object;)Ljava/lang/Object;
     237: pop
     238: return

  public static final void statistics(int, int);
    Code:
       0: getstatic     #10                 // Field ifCount:I
       3: getstatic     #17                 // Field elseCount:I
       6: iadd
       7: istore_2
       8: iload_0
       9: iload_1
      10: imul
      11: istore_3
      12: iload_2
      13: i2d
      14: iload_3
      15: i2d
      16: ddiv
      17: bipush        100
      19: i2d
      20: dmul
      21: dstore        4
      23: ldc           #191                // String %.2f
      25: astore        7
      27: iconst_1
      28: anewarray     #4                  // class java/lang/Object
      31: astore        8
      33: aload         8
      35: iconst_0
      36: dload         4
      38: invokestatic  #196                // Method java/lang/Double.valueOf:(D)Ljava/lang/Double;
      41: aastore
      42: aload         8
      44: astore        8
      46: aload         7
      48: aload         8
      50: aload         8
      52: arraylength
      53: invokestatic  #202                // Method java/util/Arrays.copyOf:([Ljava/lang/Object;I)[Ljava/lang/Object;
      56: invokestatic  #208                // Method java/lang/String.format:(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
      59: dup
      60: ldc           #210                // String format(...)
      62: invokestatic  #213                // Method kotlin/jvm/internal/Intrinsics.checkNotNullExpressionValue:(Ljava/lang/Object;Ljava/lang/String;)V
      65: astore        6
      67: getstatic     #10                 // Field ifCount:I
      70: bipush        10
      72: imul
      73: getstatic     #17                 // Field elseCount:I
      76: bipush        8
      78: imul
      79: iadd
      80: istore        7
      82: iconst_0
      83: istore        8
      85: iload_0
      86: iload_1
      87: imul
      88: bipush        60
      90: if_icmpgt     104
      93: iload_0
      94: iload_1
      95: imul
      96: bipush        10
      98: imul
      99: istore        8
     101: goto          133
     104: iload_0
     105: iload_1
     106: imul
     107: bipush        60
     109: if_icmple     133
     112: iload_0
     113: iconst_2
     114: idiv
     115: bipush        10
     117: imul
     118: iload_1
     119: imul
     120: iload_0
     121: iload_0
     122: iconst_2
     123: idiv
     124: isub
     125: bipush        8
     127: imul
     128: iload_1
     129: imul
     130: iadd
     131: istore        8
     133: new           #132                // class java/lang/StringBuilder
     136: dup
     137: invokespecial #133                // Method java/lang/StringBuilder."<init>":()V
     140: ldc           #215                // String Number of purchased tickets:
     142: invokevirtual #160                // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
     145: iload_2
     146: invokevirtual #137                // Method java/lang/StringBuilder.append:(I)Ljava/lang/StringBuilder;
     149: invokevirtual #143                // Method java/lang/StringBuilder.toString:()Ljava/lang/String;
     152: getstatic     #63                 // Field java/lang/System.out:Ljava/io/PrintStream;
     155: swap
     156: invokevirtual #69                 // Method java/io/PrintStream.println:(Ljava/lang/Object;)V
     159: new           #132                // class java/lang/StringBuilder
     162: dup
     163: invokespecial #133                // Method java/lang/StringBuilder."<init>":()V
     166: ldc           #217                // String Percentage:
     168: invokevirtual #160                // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
     171: aload         6
     173: invokevirtual #160                // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
     176: bipush        37
     178: invokevirtual #140                // Method java/lang/StringBuilder.append:(C)Ljava/lang/StringBuilder;
     181: invokevirtual #143                // Method java/lang/StringBuilder.toString:()Ljava/lang/String;
     184: getstatic     #63                 // Field java/lang/System.out:Ljava/io/PrintStream;
     187: swap
     188: invokevirtual #69                 // Method java/io/PrintStream.println:(Ljava/lang/Object;)V
     191: new           #132                // class java/lang/StringBuilder
     194: dup
     195: invokespecial #133                // Method java/lang/StringBuilder."<init>":()V
     198: ldc           #219                // String Current income: $
     200: invokevirtual #160                // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
     203: iload         7
     205: invokevirtual #137                // Method java/lang/StringBuilder.append:(I)Ljava/lang/StringBuilder;
     208: invokevirtual #143                // Method java/lang/StringBuilder.toString:()Ljava/lang/String;
     211: getstatic     #63                 // Field java/lang/System.out:Ljava/io/PrintStream;
     214: swap
     215: invokevirtual #69                 // Method java/io/PrintStream.println:(Ljava/lang/Object;)V
     218: new           #132                // class java/lang/StringBuilder
     221: dup
     222: invokespecial #133                // Method java/lang/StringBuilder."<init>":()V
     225: ldc           #221                // String Total income: $
     227: invokevirtual #160                // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
     230: iload         8
     232: invokevirtual #137                // Method java/lang/StringBuilder.append:(I)Ljava/lang/StringBuilder;
     235: invokevirtual #143                // Method java/lang/StringBuilder.toString:()Ljava/lang/String;
     238: getstatic     #63                 // Field java/lang/System.out:Ljava/io/PrintStream;
     241: swap
     242: invokevirtual #69                 // Method java/io/PrintStream.println:(Ljava/lang/Object;)V
     245: return

  public static final void multipleChoise(java.util.List<java.util.List<java.lang.String>>, int, int);
    Code:
       0: aload_0
       1: ldc           #108                // String list
       3: invokestatic  #114                // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: ldc           #231                // String 1. Show the seats
       8: getstatic     #63                 // Field java/lang/System.out:Ljava/io/PrintStream;
      11: swap
      12: invokevirtual #69                 // Method java/io/PrintStream.println:(Ljava/lang/Object;)V
      15: ldc           #233                // String 2. Buy a ticket
      17: getstatic     #63                 // Field java/lang/System.out:Ljava/io/PrintStream;
      20: swap
      21: invokevirtual #69                 // Method java/io/PrintStream.println:(Ljava/lang/Object;)V
      24: ldc           #235                // String 3. Statistics
      26: getstatic     #63                 // Field java/lang/System.out:Ljava/io/PrintStream;
      29: swap
      30: invokevirtual #69                 // Method java/io/PrintStream.println:(Ljava/lang/Object;)V
      33: ldc           #237                // String 0. Exit
      35: getstatic     #63                 // Field java/lang/System.out:Ljava/io/PrintStream;
      38: swap
      39: invokevirtual #69                 // Method java/io/PrintStream.println:(Ljava/lang/Object;)V
      42: invokestatic  #75                 // Method kotlin/io/ConsoleKt.readln:()Ljava/lang/String;
      45: invokestatic  #81                 // Method java/lang/Integer.parseInt:(Ljava/lang/String;)I
      48: istore_3
      49: iload_3
      50: tableswitch   { // 1 to 3
                     1: 76
                     2: 91
                     3: 112
               default: 123
          }
      76: aload_0
      77: iload_1
      78: iload_2
      79: invokestatic  #239                // Method boardPrint:(Ljava/util/List;II)V
      82: aload_0
      83: iload_1
      84: iload_2
      85: invokestatic  #49                 // Method multipleChoise:(Ljava/util/List;II)V
      88: goto          123
      91: aload_0
      92: iload_1
      93: iload_2
      94: invokestatic  #169                // Method seatChoise:(Ljava/util/List;II)V
      97: aload_0
      98: iload_1
      99: iload_2
     100: invokestatic  #239                // Method boardPrint:(Ljava/util/List;II)V
     103: aload_0
     104: iload_1
     105: iload_2
     106: invokestatic  #49                 // Method multipleChoise:(Ljava/util/List;II)V
     109: goto          123
     112: iload_1
     113: iload_2
     114: invokestatic  #241                // Method statistics:(II)V
     117: aload_0
     118: iload_1
     119: iload_2
     120: invokestatic  #49                 // Method multipleChoise:(Ljava/util/List;II)V
     123: return

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

  static {};
    Code:
       0: return
}


fun main() {
    val li = listOf<Int>(1,2,3,4)
    println(li.filter({i:Int -> i%2 ==0}))

    //Map operation
    println (li.map { it * 2  })

    val lstNumbers = listOf<Number>(Number("one",1),Number("two",2),Number("three",3))

    println("Numbers:"+lstNumbers.map { it.name })

    //Find and groupBy

    val list = listOf(1,2,3,4)
    //The function find returns the first element of the collection that satisfies the condition set in the lambda.
    // It is the same function as firstOrNull, which is a longer but also clearer name
    println("Finding the first match as per the lambda condition: "+list.find { it % 2 ==0 })
    println("Finding the last match as per the lambda condition: "+list.findLast { it % 2 == 0 })

    val animal_collection = listOf(Animal("Lion","carnivore"),Animal("Tiger","carnivore"),
        Animal("Elephant","herbivore"),Animal("Rabbit","herbivore"))

    val animal_groups = animal_collection.groupBy { it.type }

    println("Group of Herbivores and Carnivores:"+animal_groups)

    //Fold Operation
    //In the previous example, the first time we start with 0 and added all elements until the end.
    // In the second case, with start with 15 and subtracted alle elements.
    // Basically, the provided value is used as argument for start in the first cycle, then start becomes the value returned by the previous cycle.

    var items_list = listOf<Int>(5,10,25)
    println("Folding the collection:"+items_list.fold(0, {start,element -> element+start}))
    println("Folding the collection by Subtracting the items: "+items_list.fold(25,{start,element -> start-element}))

    //So, in the first case the function behaves like this:
    //
    //start = 0, element = 5 -> result 5
    //start = 5, element = 10 -> result 15
    //start = 15, element = 25 -> result 40

    //flatten operation  : The function flatten creates one collection from a supplied list of collections.
    var lists = listOf<List<Int>>(listOf(1,2), listOf(4,5))

    var flattened_list = lists.flatten()

    println("Flattened List: "+flattened_list)

    //Flatmap operation : flatMap use the provided lambda to map each element of the initial collection to a new collection,
    // then it merges all the collections into one collection.

    val lists_numbers = listOf<Number>(Number("one",1),Number("two",2),Number("three",3))

    println(lists_numbers.flatMap { listOf(it.value) })

    //In this example, we create one list with all the values of the property value of each element of type Number. These are the steps to arrive to this result:
    //
    //each element is mapped to a new collection, with these three new lists
    //listOf(1)
    //listOf(2)
    //listOf(3)
    //then the these three lists are merged in one list, listOf(3,3,5)
    //Notice that the initial collection does not affect the kind of collection that is returned. That is to say, even if you start with a set you end up with a generic collection
}

data class Number(val name: String, val value : Int)

data class Animal(val name: String, val type: String)

Compiled from "LambdasCollections.kt"
public final class LambdasCollectionsKt {
  public static final void main();
    Code:
       0: iconst_4
       1: anewarray     #8                  // class java/lang/Integer
       4: astore_1
       5: aload_1
       6: iconst_0
       7: iconst_1
       8: invokestatic  #12                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
      11: aastore
      12: aload_1
      13: iconst_1
      14: iconst_2
      15: invokestatic  #12                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
      18: aastore
      19: aload_1
      20: iconst_2
      21: iconst_3
      22: invokestatic  #12                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
      25: aastore
      26: aload_1
      27: iconst_3
      28: iconst_4
      29: invokestatic  #12                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
      32: aastore
      33: aload_1
      34: invokestatic  #18                 // Method kotlin/collections/CollectionsKt.listOf:([Ljava/lang/Object;)Ljava/util/List;
      37: astore_0
      38: aload_0
      39: checkcast     #20                 // class java/lang/Iterable
      42: astore_1
      43: iconst_0
      44: istore_2
      45: aload_1
      46: astore_3
      47: new           #22                 // class java/util/ArrayList
      50: dup
      51: invokespecial #25                 // Method java/util/ArrayList."<init>":()V
      54: checkcast     #27                 // class java/util/Collection
      57: astore        4
      59: iconst_0
      60: istore        5
      62: aload_3
      63: invokeinterface #31,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
      68: astore        6
      70: aload         6
      72: invokeinterface #37,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
      77: ifeq          130
      80: aload         6
      82: invokeinterface #41,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
      87: astore        7
      89: aload         7
      91: checkcast     #43                 // class java/lang/Number
      94: invokevirtual #47                 // Method java/lang/Number.intValue:()I
      97: istore        8
      99: iconst_0
     100: istore        9
     102: iload         8
     104: iconst_2
     105: irem
     106: ifne          113
     109: iconst_1
     110: goto          114
     113: iconst_0
     114: ifeq          70
     117: aload         4
     119: aload         7
     121: invokeinterface #51,  2           // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     126: pop
     127: goto          70
     130: aload         4
     132: checkcast     #53                 // class java/util/List
     135: nop
     136: astore_1
     137: getstatic     #59                 // Field java/lang/System.out:Ljava/io/PrintStream;
     140: aload_1
     141: invokevirtual #65                 // Method java/io/PrintStream.println:(Ljava/lang/Object;)V
     144: aload_0
     145: checkcast     #20                 // class java/lang/Iterable
     148: astore_1
     149: iconst_0
     150: istore_2
     151: aload_1
     152: astore_3
     153: new           #22                 // class java/util/ArrayList
     156: dup
     157: aload_1
     158: bipush        10
     160: invokestatic  #69                 // Method kotlin/collections/CollectionsKt.collectionSizeOrDefault:(Ljava/lang/Iterable;I)I
     163: invokespecial #72                 // Method java/util/ArrayList."<init>":(I)V
     166: checkcast     #27                 // class java/util/Collection
     169: astore        4
     171: iconst_0
     172: istore        5
     174: aload_3
     175: invokeinterface #31,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     180: astore        6
     182: aload         6
     184: invokeinterface #37,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     189: ifeq          237
     192: aload         6
     194: invokeinterface #41,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     199: astore        7
     201: aload         4
     203: aload         7
     205: checkcast     #43                 // class java/lang/Number
     208: invokevirtual #47                 // Method java/lang/Number.intValue:()I
     211: istore        8
     213: astore        19
     215: iconst_0
     216: istore        9
     218: iload         8
     220: iconst_2
     221: imul
     222: invokestatic  #12                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     225: aload         19
     227: swap
     228: invokeinterface #51,  2           // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     233: pop
     234: goto          182
     237: aload         4
     239: checkcast     #53                 // class java/util/List
     242: nop
     243: astore_1
     244: getstatic     #59                 // Field java/lang/System.out:Ljava/io/PrintStream;
     247: aload_1
     248: invokevirtual #65                 // Method java/io/PrintStream.println:(Ljava/lang/Object;)V
     251: iconst_3
     252: anewarray     #74                 // class Number
     255: astore_2
     256: aload_2
     257: iconst_0
     258: new           #74                 // class Number
     261: dup
     262: ldc           #76                 // String one
     264: iconst_1
     265: invokespecial #79                 // Method Number."<init>":(Ljava/lang/String;I)V
     268: aastore
     269: aload_2
     270: iconst_1
     271: new           #74                 // class Number
     274: dup
     275: ldc           #81                 // String two
     277: iconst_2
     278: invokespecial #79                 // Method Number."<init>":(Ljava/lang/String;I)V
     281: aastore
     282: aload_2
     283: iconst_2
     284: new           #74                 // class Number
     287: dup
     288: ldc           #83                 // String three
     290: iconst_3
     291: invokespecial #79                 // Method Number."<init>":(Ljava/lang/String;I)V
     294: aastore
     295: aload_2
     296: invokestatic  #18                 // Method kotlin/collections/CollectionsKt.listOf:([Ljava/lang/Object;)Ljava/util/List;
     299: astore_1
     300: new           #85                 // class java/lang/StringBuilder
     303: dup
     304: invokespecial #86                 // Method java/lang/StringBuilder."<init>":()V
     307: ldc           #88                 // String Numbers:
     309: invokevirtual #92                 // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
     312: aload_1
     313: checkcast     #20                 // class java/lang/Iterable
     316: astore_2
     317: astore        19
     319: iconst_0
     320: istore_3
     321: aload_2
     322: astore        4
     324: new           #22                 // class java/util/ArrayList
     327: dup
     328: aload_2
     329: bipush        10
     331: invokestatic  #69                 // Method kotlin/collections/CollectionsKt.collectionSizeOrDefault:(Ljava/lang/Iterable;I)I
     334: invokespecial #72                 // Method java/util/ArrayList."<init>":(I)V
     337: checkcast     #27                 // class java/util/Collection
     340: astore        5
     342: iconst_0
     343: istore        6
     345: aload         4
     347: invokeinterface #31,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     352: astore        7
     354: aload         7
     356: invokeinterface #37,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     361: ifeq          404
     364: aload         7
     366: invokeinterface #41,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     371: astore        8
     373: aload         5
     375: aload         8
     377: checkcast     #74                 // class Number
     380: astore        9
     382: astore        20
     384: iconst_0
     385: istore        10
     387: aload         9
     389: invokevirtual #96                 // Method Number.getName:()Ljava/lang/String;
     392: aload         20
     394: swap
     395: invokeinterface #51,  2           // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     400: pop
     401: goto          354
     404: aload         5
     406: checkcast     #53                 // class java/util/List
     409: nop
     410: aload         19
     412: swap
     413: invokevirtual #99                 // Method java/lang/StringBuilder.append:(Ljava/lang/Object;)Ljava/lang/StringBuilder;
     416: invokevirtual #102                // Method java/lang/StringBuilder.toString:()Ljava/lang/String;
     419: getstatic     #59                 // Field java/lang/System.out:Ljava/io/PrintStream;
     422: swap
     423: invokevirtual #65                 // Method java/io/PrintStream.println:(Ljava/lang/Object;)V
     426: iconst_4
     427: anewarray     #8                  // class java/lang/Integer
     430: astore_3
     431: aload_3
     432: iconst_0
     433: iconst_1
     434: invokestatic  #12                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     437: aastore
     438: aload_3
     439: iconst_1
     440: iconst_2
     441: invokestatic  #12                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     444: aastore
     445: aload_3
     446: iconst_2
     447: iconst_3
     448: invokestatic  #12                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     451: aastore
     452: aload_3
     453: iconst_3
     454: iconst_4
     455: invokestatic  #12                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     458: aastore
     459: aload_3
     460: invokestatic  #18                 // Method kotlin/collections/CollectionsKt.listOf:([Ljava/lang/Object;)Ljava/util/List;
     463: astore_2
     464: new           #85                 // class java/lang/StringBuilder
     467: dup
     468: invokespecial #86                 // Method java/lang/StringBuilder."<init>":()V
     471: ldc           #104                // String Finding the first match as per the lambda condition:
     473: invokevirtual #92                 // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
     476: aload_2
     477: checkcast     #20                 // class java/lang/Iterable
     480: astore_3
     481: astore        19
     483: aload_3
     484: astore        4
     486: aload         4
     488: invokeinterface #31,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     493: astore        5
     495: aload         5
     497: invokeinterface #37,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     502: ifeq          547
     505: aload         5
     507: invokeinterface #41,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     512: astore        6
     514: aload         6
     516: checkcast     #43                 // class java/lang/Number
     519: invokevirtual #47                 // Method java/lang/Number.intValue:()I
     522: istore        7
     524: iconst_0
     525: istore        8
     527: iload         7
     529: iconst_2
     530: irem
     531: ifne          538
     534: iconst_1
     535: goto          539
     538: iconst_0
     539: ifeq          495
     542: aload         6
     544: goto          548
     547: aconst_null
     548: aload         19
     550: swap
     551: invokevirtual #99                 // Method java/lang/StringBuilder.append:(Ljava/lang/Object;)Ljava/lang/StringBuilder;
     554: invokevirtual #102                // Method java/lang/StringBuilder.toString:()Ljava/lang/String;
     557: getstatic     #59                 // Field java/lang/System.out:Ljava/io/PrintStream;
     560: swap
     561: invokevirtual #65                 // Method java/io/PrintStream.println:(Ljava/lang/Object;)V
     564: new           #85                 // class java/lang/StringBuilder
     567: dup
     568: invokespecial #86                 // Method java/lang/StringBuilder."<init>":()V
     571: ldc           #106                // String Finding the last match as per the lambda condition:
     573: invokevirtual #92                 // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
     576: aload_2
     577: astore_3
     578: astore        19
     580: aload_3
     581: astore        4
     583: aload         4
     585: aload         4
     587: invokeinterface #109,  1          // InterfaceMethod java/util/List.size:()I
     592: invokeinterface #113,  2          // InterfaceMethod java/util/List.listIterator:(I)Ljava/util/ListIterator;
     597: astore        5
     599: aload         5
     601: invokeinterface #118,  1          // InterfaceMethod java/util/ListIterator.hasPrevious:()Z
     606: ifeq          651
     609: aload         5
     611: invokeinterface #121,  1          // InterfaceMethod java/util/ListIterator.previous:()Ljava/lang/Object;
     616: astore        6
     618: aload         6
     620: checkcast     #43                 // class java/lang/Number
     623: invokevirtual #47                 // Method java/lang/Number.intValue:()I
     626: istore        7
     628: iconst_0
     629: istore        8
     631: iload         7
     633: iconst_2
     634: irem
     635: ifne          642
     638: iconst_1
     639: goto          643
     642: iconst_0
     643: ifeq          599
     646: aload         6
     648: goto          652
     651: aconst_null
     652: aload         19
     654: swap
     655: invokevirtual #99                 // Method java/lang/StringBuilder.append:(Ljava/lang/Object;)Ljava/lang/StringBuilder;
     658: invokevirtual #102                // Method java/lang/StringBuilder.toString:()Ljava/lang/String;
     661: getstatic     #59                 // Field java/lang/System.out:Ljava/io/PrintStream;
     664: swap
     665: invokevirtual #65                 // Method java/io/PrintStream.println:(Ljava/lang/Object;)V
     668: iconst_4
     669: anewarray     #123                // class Animal
     672: astore        4
     674: aload         4
     676: iconst_0
     677: new           #123                // class Animal
     680: dup
     681: ldc           #125                // String Lion
     683: ldc           #127                // String carnivore
     685: invokespecial #130                // Method Animal."<init>":(Ljava/lang/String;Ljava/lang/String;)V
     688: aastore
     689: aload         4
     691: iconst_1
     692: new           #123                // class Animal
     695: dup
     696: ldc           #132                // String Tiger
     698: ldc           #127                // String carnivore
     700: invokespecial #130                // Method Animal."<init>":(Ljava/lang/String;Ljava/lang/String;)V
     703: aastore
     704: aload         4
     706: iconst_2
     707: new           #123                // class Animal
     710: dup
     711: ldc           #134                // String Elephant
     713: ldc           #136                // String herbivore
     715: invokespecial #130                // Method Animal."<init>":(Ljava/lang/String;Ljava/lang/String;)V
     718: aastore
     719: aload         4
     721: iconst_3
     722: new           #123                // class Animal
     725: dup
     726: ldc           #138                // String Rabbit
     728: ldc           #136                // String herbivore
     730: invokespecial #130                // Method Animal."<init>":(Ljava/lang/String;Ljava/lang/String;)V
     733: aastore
     734: aload         4
     736: invokestatic  #18                 // Method kotlin/collections/CollectionsKt.listOf:([Ljava/lang/Object;)Ljava/util/List;
     739: astore_3
     740: aload_3
     741: checkcast     #20                 // class java/lang/Iterable
     744: astore        5
     746: iconst_0
     747: istore        6
     749: aload         5
     751: astore        7
     753: new           #140                // class java/util/LinkedHashMap
     756: dup
     757: invokespecial #141                // Method java/util/LinkedHashMap."<init>":()V
     760: checkcast     #143                // class java/util/Map
     763: astore        8
     765: iconst_0
     766: istore        9
     768: aload         7
     770: invokeinterface #31,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     775: astore        10
     777: aload         10
     779: invokeinterface #37,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     784: ifeq          889
     787: aload         10
     789: invokeinterface #41,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     794: astore        11
     796: aload         11
     798: checkcast     #123                // class Animal
     801: astore        12
     803: iconst_0
     804: istore        13
     806: aload         12
     808: invokevirtual #146                // Method Animal.getType:()Ljava/lang/String;
     811: astore        14
     813: aload         8
     815: astore        15
     817: iconst_0
     818: istore        16
     820: aload         15
     822: aload         14
     824: invokeinterface #150,  2          // InterfaceMethod java/util/Map.get:(Ljava/lang/Object;)Ljava/lang/Object;
     829: astore        17
     831: aload         17
     833: ifnonnull     868
     836: iconst_0
     837: istore        18
     839: new           #22                 // class java/util/ArrayList
     842: dup
     843: invokespecial #25                 // Method java/util/ArrayList."<init>":()V
     846: checkcast     #53                 // class java/util/List
     849: astore        18
     851: aload         15
     853: aload         14
     855: aload         18
     857: invokeinterface #154,  3          // InterfaceMethod java/util/Map.put:(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
     862: pop
     863: aload         18
     865: goto          870
     868: aload         17
     870: nop
     871: checkcast     #53                 // class java/util/List
     874: astore        12
     876: aload         12
     878: aload         11
     880: invokeinterface #155,  2          // InterfaceMethod java/util/List.add:(Ljava/lang/Object;)Z
     885: pop
     886: goto          777
     889: aload         8
     891: nop
     892: astore        4
     894: new           #85                 // class java/lang/StringBuilder
     897: dup
     898: invokespecial #86                 // Method java/lang/StringBuilder."<init>":()V
     901: ldc           #157                // String Group of Herbivores and Carnivores:
     903: invokevirtual #92                 // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
     906: aload         4
     908: invokevirtual #99                 // Method java/lang/StringBuilder.append:(Ljava/lang/Object;)Ljava/lang/StringBuilder;
     911: invokevirtual #102                // Method java/lang/StringBuilder.toString:()Ljava/lang/String;
     914: getstatic     #59                 // Field java/lang/System.out:Ljava/io/PrintStream;
     917: swap
     918: invokevirtual #65                 // Method java/io/PrintStream.println:(Ljava/lang/Object;)V
     921: iconst_3
     922: anewarray     #8                  // class java/lang/Integer
     925: astore        6
     927: aload         6
     929: iconst_0
     930: iconst_5
     931: invokestatic  #12                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     934: aastore
     935: aload         6
     937: iconst_1
     938: bipush        10
     940: invokestatic  #12                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     943: aastore
     944: aload         6
     946: iconst_2
     947: bipush        25
     949: invokestatic  #12                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     952: aastore
     953: aload         6
     955: invokestatic  #18                 // Method kotlin/collections/CollectionsKt.listOf:([Ljava/lang/Object;)Ljava/util/List;
     958: astore        5
     960: new           #85                 // class java/lang/StringBuilder
     963: dup
     964: invokespecial #86                 // Method java/lang/StringBuilder."<init>":()V
     967: ldc           #159                // String Folding the collection:
     969: invokevirtual #92                 // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
     972: aload         5
     974: checkcast     #20                 // class java/lang/Iterable
     977: astore        6
     979: iconst_0
     980: istore        7
     982: astore        19
     984: iconst_0
     985: istore        8
     987: iload         7
     989: istore        9
     991: aload         6
     993: invokeinterface #31,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     998: astore        10
    1000: aload         10
    1002: invokeinterface #37,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
    1007: ifeq          1046
    1010: aload         10
    1012: invokeinterface #41,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
    1017: astore        11
    1019: iload         9
    1021: aload         11
    1023: checkcast     #43                 // class java/lang/Number
    1026: invokevirtual #47                 // Method java/lang/Number.intValue:()I
    1029: istore        12
    1031: istore        13
    1033: iconst_0
    1034: istore        14
    1036: iload         12
    1038: iload         13
    1040: iadd
    1041: istore        9
    1043: goto          1000
    1046: iload         9
    1048: istore        20
    1050: aload         19
    1052: iload         20
    1054: invokevirtual #162                // Method java/lang/StringBuilder.append:(I)Ljava/lang/StringBuilder;
    1057: invokevirtual #102                // Method java/lang/StringBuilder.toString:()Ljava/lang/String;
    1060: getstatic     #59                 // Field java/lang/System.out:Ljava/io/PrintStream;
    1063: swap
    1064: invokevirtual #65                 // Method java/io/PrintStream.println:(Ljava/lang/Object;)V
    1067: new           #85                 // class java/lang/StringBuilder
    1070: dup
    1071: invokespecial #86                 // Method java/lang/StringBuilder."<init>":()V
    1074: ldc           #164                // String Folding the collection by Subtracting the items:
    1076: invokevirtual #92                 // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
    1079: aload         5
    1081: checkcast     #20                 // class java/lang/Iterable
    1084: astore        6
    1086: bipush        25
    1088: istore        7
    1090: astore        19
    1092: iconst_0
    1093: istore        8
    1095: iload         7
    1097: istore        9
    1099: aload         6
    1101: invokeinterface #31,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
    1106: astore        10
    1108: aload         10
    1110: invokeinterface #37,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
    1115: ifeq          1154
    1118: aload         10
    1120: invokeinterface #41,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
    1125: astore        11
    1127: iload         9
    1129: aload         11
    1131: checkcast     #43                 // class java/lang/Number
    1134: invokevirtual #47                 // Method java/lang/Number.intValue:()I
    1137: istore        12
    1139: istore        13
    1141: iconst_0
    1142: istore        14
    1144: iload         13
    1146: iload         12
    1148: isub
    1149: istore        9
    1151: goto          1108
    1154: iload         9
    1156: istore        20
    1158: aload         19
    1160: iload         20
    1162: invokevirtual #162                // Method java/lang/StringBuilder.append:(I)Ljava/lang/StringBuilder;
    1165: invokevirtual #102                // Method java/lang/StringBuilder.toString:()Ljava/lang/String;
    1168: getstatic     #59                 // Field java/lang/System.out:Ljava/io/PrintStream;
    1171: swap
    1172: invokevirtual #65                 // Method java/io/PrintStream.println:(Ljava/lang/Object;)V
    1175: iconst_2
    1176: anewarray     #53                 // class java/util/List
    1179: astore        7
    1181: aload         7
    1183: iconst_0
    1184: iconst_2
    1185: anewarray     #8                  // class java/lang/Integer
    1188: astore        8
    1190: aload         8
    1192: iconst_0
    1193: iconst_1
    1194: invokestatic  #12                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
    1197: aastore
    1198: aload         8
    1200: iconst_1
    1201: iconst_2
    1202: invokestatic  #12                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
    1205: aastore
    1206: aload         8
    1208: invokestatic  #18                 // Method kotlin/collections/CollectionsKt.listOf:([Ljava/lang/Object;)Ljava/util/List;
    1211: aastore
    1212: aload         7
    1214: iconst_1
    1215: iconst_2
    1216: anewarray     #8                  // class java/lang/Integer
    1219: astore        8
    1221: aload         8
    1223: iconst_0
    1224: iconst_4
    1225: invokestatic  #12                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
    1228: aastore
    1229: aload         8
    1231: iconst_1
    1232: iconst_5
    1233: invokestatic  #12                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
    1236: aastore
    1237: aload         8
    1239: invokestatic  #18                 // Method kotlin/collections/CollectionsKt.listOf:([Ljava/lang/Object;)Ljava/util/List;
    1242: aastore
    1243: aload         7
    1245: invokestatic  #18                 // Method kotlin/collections/CollectionsKt.listOf:([Ljava/lang/Object;)Ljava/util/List;
    1248: astore        6
    1250: aload         6
    1252: checkcast     #20                 // class java/lang/Iterable
    1255: invokestatic  #168                // Method kotlin/collections/CollectionsKt.flatten:(Ljava/lang/Iterable;)Ljava/util/List;
    1258: astore        7
    1260: new           #85                 // class java/lang/StringBuilder
    1263: dup
    1264: invokespecial #86                 // Method java/lang/StringBuilder."<init>":()V
    1267: ldc           #170                // String Flattened List:
    1269: invokevirtual #92                 // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
    1272: aload         7
    1274: invokevirtual #99                 // Method java/lang/StringBuilder.append:(Ljava/lang/Object;)Ljava/lang/StringBuilder;
    1277: invokevirtual #102                // Method java/lang/StringBuilder.toString:()Ljava/lang/String;
    1280: getstatic     #59                 // Field java/lang/System.out:Ljava/io/PrintStream;
    1283: swap
    1284: invokevirtual #65                 // Method java/io/PrintStream.println:(Ljava/lang/Object;)V
    1287: iconst_3
    1288: anewarray     #74                 // class Number
    1291: astore        9
    1293: aload         9
    1295: iconst_0
    1296: new           #74                 // class Number
    1299: dup
    1300: ldc           #76                 // String one
    1302: iconst_1
    1303: invokespecial #79                 // Method Number."<init>":(Ljava/lang/String;I)V
    1306: aastore
    1307: aload         9
    1309: iconst_1
    1310: new           #74                 // class Number
    1313: dup
    1314: ldc           #81                 // String two
    1316: iconst_2
    1317: invokespecial #79                 // Method Number."<init>":(Ljava/lang/String;I)V
    1320: aastore
    1321: aload         9
    1323: iconst_2
    1324: new           #74                 // class Number
    1327: dup
    1328: ldc           #83                 // String three
    1330: iconst_3
    1331: invokespecial #79                 // Method Number."<init>":(Ljava/lang/String;I)V
    1334: aastore
    1335: aload         9
    1337: invokestatic  #18                 // Method kotlin/collections/CollectionsKt.listOf:([Ljava/lang/Object;)Ljava/util/List;
    1340: astore        8
    1342: aload         8
    1344: checkcast     #20                 // class java/lang/Iterable
    1347: astore        9
    1349: iconst_0
    1350: istore        10
    1352: aload         9
    1354: astore        11
    1356: new           #22                 // class java/util/ArrayList
    1359: dup
    1360: invokespecial #25                 // Method java/util/ArrayList."<init>":()V
    1363: checkcast     #27                 // class java/util/Collection
    1366: astore        12
    1368: iconst_0
    1369: istore        13
    1371: aload         11
    1373: invokeinterface #31,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
    1378: astore        14
    1380: aload         14
    1382: invokeinterface #37,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
    1387: ifeq          1436
    1390: aload         14
    1392: invokeinterface #41,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
    1397: astore        15
    1399: aload         15
    1401: checkcast     #74                 // class Number
    1404: astore        16
    1406: iconst_0
    1407: istore        17
    1409: aload         16
    1411: invokevirtual #173                // Method Number.getValue:()I
    1414: invokestatic  #12                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
    1417: invokestatic  #176                // Method kotlin/collections/CollectionsKt.listOf:(Ljava/lang/Object;)Ljava/util/List;
    1420: checkcast     #20                 // class java/lang/Iterable
    1423: astore        16
    1425: aload         12
    1427: aload         16
    1429: invokestatic  #180                // Method kotlin/collections/CollectionsKt.addAll:(Ljava/util/Collection;Ljava/lang/Iterable;)Z
    1432: pop
    1433: goto          1380
    1436: aload         12
    1438: checkcast     #53                 // class java/util/List
    1441: nop
    1442: astore        9
    1444: getstatic     #59                 // Field java/lang/System.out:Ljava/io/PrintStream;
    1447: aload         9
    1449: invokevirtual #65                 // Method java/io/PrintStream.println:(Ljava/lang/Object;)V
    1452: return

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