#include <cstddef>
#include <cstdint>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <functional>
void *operator new(std::size_t sz) { static char *b, *e; if (b + sz > e) { b = (char *) std::malloc(sz > (1 << 20) ? sz : (1 << 20)); e = b + (sz > (1 << 20) ? sz : (1 << 20)); } return e -= sz; }
struct $t_bsl_Bool { enum { $e_bsl_False, $e_bsl_True } T; void* ptr; };
struct $d_bsl_False { };
struct $d_bsl_True { };
struct $t_bsl_IO { enum { $e_bsl_Pure, $e_bsl_Free } T; void* ptr; };
struct $d_bsl_Pure { void* d0; };
struct $d_bsl_Free { void* d0; };
struct $t_bsl_IOImpl { enum { $e_bsl_Read, $e_bsl_Write } T; void* ptr; };
struct $d_bsl_Read { void* d0; };
struct $d_bsl_Write { void* d0; void* d1; };
typedef  void  $t_bsl_Int;
struct $t_bsl_List { enum { $e_bsl_Nil, $e_bsl_Cons } T; void* ptr; };
struct $d_bsl_Nil { };
struct $d_bsl_Cons { void* d0; void* d1; };
struct $t_bsl_Maybe { enum { $e_bsl_Just, $e_bsl_Nothing } T; void* ptr; };
struct $d_bsl_Just { void* d0; };
struct $d_bsl_Nothing { };
struct $t_bsl_Pair { enum { $e_bsl_Pair } T; void* ptr; };
struct $d_bsl_Pair { void* d0; void* d1; };
struct $t_bsl_Unit { enum { $e_bsl_Unit } T; void* ptr; };
struct $d_bsl_Unit { };
int main() { [=]() -> void* { void* $tmp_bsl_tmp = new $t_bsl_Unit { $t_bsl_Unit::$e_bsl_Unit, new $d_bsl_Unit{ } };  void* $v_bsl_Unit = $tmp_bsl_tmp; return [=]() -> void* { void* $tmp_bsl_tmp = new std::function<void*(void*)>([=](void* $v_bsl_arg0) -> void* { return new std::function<void*(void*)>([=](void* $v_bsl_arg1) -> void* { return new $t_bsl_Pair { $t_bsl_Pair::$e_bsl_Pair, new $d_bsl_Pair{ $v_bsl_arg0, $v_bsl_arg1 } }; }); });  void* $v_bsl_Pair = $tmp_bsl_tmp; return [=]() -> void* { void* $tmp_bsl_tmp = new $t_bsl_Maybe { $t_bsl_Maybe::$e_bsl_Nothing, new $d_bsl_Nothing{ } };  void* $v_bsl_Nothing = $tmp_bsl_tmp; return [=]() -> void* { void* $tmp_bsl_tmp = new std::function<void*(void*)>([=](void* $v_bsl_arg0) -> void* { return new $t_bsl_Maybe { $t_bsl_Maybe::$e_bsl_Just, new $d_bsl_Just{ $v_bsl_arg0 } }; });  void* $v_bsl_Just = $tmp_bsl_tmp; return [=]() -> void* { void* $tmp_bsl_tmp = new std::function<void*(void*)>([=](void* $v_bsl_arg0) -> void* { return new std::function<void*(void*)>([=](void* $v_bsl_arg1) -> void* { return new $t_bsl_List { $t_bsl_List::$e_bsl_Cons, new $d_bsl_Cons{ $v_bsl_arg0, $v_bsl_arg1 } }; }); });  void* $v_bsl_Cons = $tmp_bsl_tmp; return [=]() -> void* { void* $tmp_bsl_tmp = new $t_bsl_List { $t_bsl_List::$e_bsl_Nil, new $d_bsl_Nil{ } };  void* $v_bsl_Nil = $tmp_bsl_tmp; return [=]() -> void* { void* $tmp_bsl_tmp = new std::function<void*(void*)>([=](void* $v_bsl_arg0) -> void* { return new std::function<void*(void*)>([=](void* $v_bsl_arg1) -> void* { return new $t_bsl_IOImpl { $t_bsl_IOImpl::$e_bsl_Write, new $d_bsl_Write{ $v_bsl_arg0, $v_bsl_arg1 } }; }); });  void* $v_bsl_Write = $tmp_bsl_tmp; return [=]() -> void* { void* $tmp_bsl_tmp = new std::function<void*(void*)>([=](void* $v_bsl_arg0) -> void* { return new $t_bsl_IOImpl { $t_bsl_IOImpl::$e_bsl_Read, new $d_bsl_Read{ $v_bsl_arg0 } }; });  void* $v_bsl_Read = $tmp_bsl_tmp; return [=]() -> void* { void* $tmp_bsl_tmp = new std::function<void*(void*)>([=](void* $v_bsl_arg0) -> void* { return new $t_bsl_IO { $t_bsl_IO::$e_bsl_Free, new $d_bsl_Free{ $v_bsl_arg0 } }; });  void* $v_bsl_Free = $tmp_bsl_tmp; return [=]() -> void* { void* $tmp_bsl_tmp = new std::function<void*(void*)>([=](void* $v_bsl_arg0) -> void* { return new $t_bsl_IO { $t_bsl_IO::$e_bsl_Pure, new $d_bsl_Pure{ $v_bsl_arg0 } }; });  void* $v_bsl_Pure = $tmp_bsl_tmp; return [=]() -> void* { void* $tmp_bsl_tmp = new $t_bsl_Bool { $t_bsl_Bool::$e_bsl_True, new $d_bsl_True{ } };  void* $v_bsl_True = $tmp_bsl_tmp; return [=]() -> void* { void* $tmp_bsl_tmp = new $t_bsl_Bool { $t_bsl_Bool::$e_bsl_False, new $d_bsl_False{ } };  void* $v_bsl_False = $tmp_bsl_tmp; return [=]() -> void* { void* $tmp_bsl_tmp = new std::function<void*(void*)>([=](void* $v_bsl_f) -> void* { return new std::function<void*(void*)>([=](void* $v_bsl_x) -> void* { return [=]() -> void* { void* $tmp_bsl_tmp = $v_bsl_x; switch ((($t_bsl_IOImpl*)($tmp_bsl_tmp))->T) { case $t_bsl_IOImpl::$e_bsl_Write: {void* $v_bsl_s = (($d_bsl_Write*)((($t_bsl_IOImpl*)($tmp_bsl_tmp))->ptr))->d0;void* $v_bsl_k = (($d_bsl_Write*)((($t_bsl_IOImpl*)($tmp_bsl_tmp))->ptr))->d1; return (*((std::function<void*(void*)>*)((*((std::function<void*(void*)>*)($v_bsl_Write)))($v_bsl_s))))((*((std::function<void*(void*)>*)($v_bsl_f)))($v_bsl_k)); } case $t_bsl_IOImpl::$e_bsl_Read: {void* $v_bsl_k = (($d_bsl_Read*)((($t_bsl_IOImpl*)($tmp_bsl_tmp))->ptr))->d0; return (*((std::function<void*(void*)>*)($v_bsl_Read)))(new std::function<void*(void*)>([=](void* $v_bsl_s) -> void* { return (*((std::function<void*(void*)>*)($v_bsl_f)))((*((std::function<void*(void*)>*)($v_bsl_k)))($v_bsl_s)); })); } } }(); }); });  void* $v_bsl_fmap = $tmp_bsl_tmp; return [=]() -> void* { void* $tmp_bsl_tmp = $v_bsl_Pure;  void* $v_bsl_return = $tmp_bsl_tmp; return [=]() -> void* { void *$v_bsl_bind = new std::function<void*(void*)>(); { void* $tmp_bsl_tmp = new std::function<void*(void*)>([=](void* $v_bsl_x) -> void* { return new std::function<void*(void*)>([=](void* $v_bsl_f) -> void* { return [=]() -> void* { void* $tmp_bsl_tmp = $v_bsl_x; switch ((($t_bsl_IO*)($tmp_bsl_tmp))->T) { case $t_bsl_IO::$e_bsl_Pure: {void* $v_bsl_x = (($d_bsl_Pure*)((($t_bsl_IO*)($tmp_bsl_tmp))->ptr))->d0; return (*((std::function<void*(void*)>*)($v_bsl_f)))($v_bsl_x); } case $t_bsl_IO::$e_bsl_Free: {void* $v_bsl_x = (($d_bsl_Free*)((($t_bsl_IO*)($tmp_bsl_tmp))->ptr))->d0; return (*((std::function<void*(void*)>*)($v_bsl_Free)))((*((std::function<void*(void*)>*)((*((std::function<void*(void*)>*)($v_bsl_fmap)))(new std::function<void*(void*)>([=](void* $v_bsl_y) -> void* { return (*((std::function<void*(void*)>*)((*((std::function<void*(void*)>*)($v_bsl_bind)))($v_bsl_y))))($v_bsl_f); })))))($v_bsl_x)); } } }(); }); }); std::memcpy($v_bsl_bind, $tmp_bsl_tmp, sizeof (std::function<void*(void*)>)); } return [=]() -> void* { void* $tmp_bsl_tmp = (*((std::function<void*(void*)>*)($v_bsl_Free)))((*((std::function<void*(void*)>*)($v_bsl_Read)))(new std::function<void*(void*)>([=](void* $v_bsl_x) -> void* { return (*((std::function<void*(void*)>*)($v_bsl_return)))($v_bsl_x); })));  void* $v_bsl_getInt = $tmp_bsl_tmp; return [=]() -> void* { void* $tmp_bsl_tmp = new std::function<void*(void*)>([=](void* $v_bsl_x) -> void* { return (*((std::function<void*(void*)>*)($v_bsl_Free)))((*((std::function<void*(void*)>*)((*((std::function<void*(void*)>*)($v_bsl_Write)))($v_bsl_x))))((*((std::function<void*(void*)>*)($v_bsl_return)))($v_bsl_Unit))); });  void* $v_bsl_putInt = $tmp_bsl_tmp; return [=]() -> void* { void *$v_bsl_runIO = new std::function<void*(void*)>(); { void* $tmp_bsl_tmp = new std::function<void*(void*)>([=](void* $v_bsl_x) -> void* { return [=]() -> void* { void* $tmp_bsl_tmp = $v_bsl_x; switch ((($t_bsl_IO*)($tmp_bsl_tmp))->T) { case $t_bsl_IO::$e_bsl_Pure: {void* $v_bsl_x = (($d_bsl_Pure*)((($t_bsl_IO*)($tmp_bsl_tmp))->ptr))->d0; return $v_bsl_x; } case $t_bsl_IO::$e_bsl_Free: {void* $v_bsl_x = (($d_bsl_Free*)((($t_bsl_IO*)($tmp_bsl_tmp))->ptr))->d0; return [=]() -> void* { void* $tmp_bsl_tmp = $v_bsl_x; switch ((($t_bsl_IOImpl*)($tmp_bsl_tmp))->T) { case $t_bsl_IOImpl::$e_bsl_Write: {void* $v_bsl_c = (($d_bsl_Write*)((($t_bsl_IOImpl*)($tmp_bsl_tmp))->ptr))->d0;void* $v_bsl_x = (($d_bsl_Write*)((($t_bsl_IOImpl*)($tmp_bsl_tmp))->ptr))->d1; return [=]() -> void* { void* $tmp_bsl_tmp =  (std::printf("%d\n", (std::intptr_t) $v_bsl_c), nullptr) ;  void* $v_bsl__ = $tmp_bsl_tmp; return (*((std::function<void*(void*)>*)($v_bsl_runIO)))($v_bsl_x); } (); } case $t_bsl_IOImpl::$e_bsl_Read: {void* $v_bsl_g = (($d_bsl_Read*)((($t_bsl_IOImpl*)($tmp_bsl_tmp))->ptr))->d0; return [=]() -> void* { void* $tmp_bsl_tmp =  [=]() -> void* {
        int x;
        if (std::scanf("%d", &x) == 1)
          return (*((std::function<void*(void*)>*)$v_bsl_Just))((void*) (std::intptr_t) x);
        else
          return $v_bsl_Nothing;
      }() ;  void* $v_bsl_x = $tmp_bsl_tmp; return (*((std::function<void*(void*)>*)($v_bsl_runIO)))((*((std::function<void*(void*)>*)($v_bsl_g)))($v_bsl_x)); } (); } } }(); } } }(); }); std::memcpy($v_bsl_runIO, $tmp_bsl_tmp, sizeof (std::function<void*(void*)>)); } return [=]() -> void* { void* $tmp_bsl_tmp = new std::function<void*(void*)>([=](void* $v_bsl_x) -> void* { return [=]() -> void* { void* $tmp_bsl_tmp = $v_bsl_x; switch ((($t_bsl_Bool*)($tmp_bsl_tmp))->T) { case $t_bsl_Bool::$e_bsl_True: { return $v_bsl_False; } case $t_bsl_Bool::$e_bsl_False: { return $v_bsl_True; } } }(); });  void* $v_bsl_bnot = $tmp_bsl_tmp; return [=]() -> void* { void* $tmp_bsl_tmp = new std::function<void*(void*)>([=](void* $v_bsl_x) -> void* { return [=]() -> void* { void* $tmp_bsl_tmp = $v_bsl_x; switch ((($t_bsl_Bool*)($tmp_bsl_tmp))->T) { case $t_bsl_Bool::$e_bsl_True: { return new std::function<void*(void*)>([=](void* $v_bsl_x) -> void* { return $v_bsl_x; }); } case $t_bsl_Bool::$e_bsl_False: { return new std::function<void*(void*)>([=](void* $v_bsl_x) -> void* { return $v_bsl_False; }); } } }(); });  void* $v_bsl_band = $tmp_bsl_tmp; return [=]() -> void* { void* $tmp_bsl_tmp = new std::function<void*(void*)>([=](void* $v_bsl_a) -> void* { return new std::function<void*(void*)>([=](void* $v_bsl_b) -> void* { return  (void*) (((std::intptr_t) $v_bsl_a) + ((std::intptr_t) $v_bsl_b)) ; }); });  void* $v_bsl_add = $tmp_bsl_tmp; return [=]() -> void* { void* $tmp_bsl_tmp = new std::function<void*(void*)>([=](void* $v_bsl_a) -> void* { return  (void*) -((std::intptr_t) $v_bsl_a) ; });  void* $v_bsl_neg = $tmp_bsl_tmp; return [=]() -> void* { void* $tmp_bsl_tmp = new std::function<void*(void*)>([=](void* $v_bsl_a) -> void* { return new std::function<void*(void*)>([=](void* $v_bsl_b) -> void* { return  (void*) (((std::intptr_t) $v_bsl_a) - ((std::intptr_t) $v_bsl_b)) ; }); });  void* $v_bsl_sub = $tmp_bsl_tmp; return [=]() -> void* { void* $tmp_bsl_tmp = new std::function<void*(void*)>([=](void* $v_bsl_a) -> void* { return new std::function<void*(void*)>([=](void* $v_bsl_b) -> void* { return  (void*) (((std::intptr_t) $v_bsl_a) * ((std::intptr_t) $v_bsl_b)) ; }); });  void* $v_bsl_mul = $tmp_bsl_tmp; return [=]() -> void* { void* $tmp_bsl_tmp = new std::function<void*(void*)>([=](void* $v_bsl_a) -> void* { return new std::function<void*(void*)>([=](void* $v_bsl_b) -> void* { return  (void*) (((std::intptr_t) $v_bsl_a) / ((std::intptr_t) $v_bsl_b)) ; }); });  void* $v_bsl_div = $tmp_bsl_tmp; return [=]() -> void* { void* $tmp_bsl_tmp = new std::function<void*(void*)>([=](void* $v_bsl_a) -> void* { return new std::function<void*(void*)>([=](void* $v_bsl_b) -> void* { return  (void*) (((std::intptr_t) $v_bsl_a) % ((std::intptr_t) $v_bsl_b)) ; }); });  void* $v_bsl_mod = $tmp_bsl_tmp; return [=]() -> void* { void* $tmp_bsl_tmp = new std::function<void*(void*)>([=](void* $v_bsl_a) -> void* { return new std::function<void*(void*)>([=](void* $v_bsl_b) -> void* { return  (((std::intptr_t) $v_bsl_a) < ((std::intptr_t) $v_bsl_b))?$v_bsl_True:$v_bsl_False ; }); });  void* $v_bsl_less = $tmp_bsl_tmp; return [=]() -> void* { void* $tmp_bsl_tmp = new std::function<void*(void*)>([=](void* $v_bsl_a) -> void* { return  ((std::intptr_t) $v_bsl_a) == 0?$v_bsl_True:$v_bsl_False ; });  void* $v_bsl_eq0 = $tmp_bsl_tmp; return [=]() -> void* { void *$v_bsl_gcd = new std::function<void*(void*)>(); { void* $tmp_bsl_tmp = new std::function<void*(void*)>([=](void* $v_bsl_a) -> void* { return new std::function<void*(void*)>([=](void* $v_bsl_b) -> void* { return [=]() -> void* { void* $tmp_bsl_tmp = (*((std::function<void*(void*)>*)($v_bsl_eq0)))($v_bsl_a); switch ((($t_bsl_Bool*)($tmp_bsl_tmp))->T) { case $t_bsl_Bool::$e_bsl_True: { return $v_bsl_b; } case $t_bsl_Bool::$e_bsl_False: { return (*((std::function<void*(void*)>*)((*((std::function<void*(void*)>*)($v_bsl_gcd)))((*((std::function<void*(void*)>*)((*((std::function<void*(void*)>*)($v_bsl_mod)))($v_bsl_b))))($v_bsl_a)))))($v_bsl_a); } } }(); }); }); std::memcpy($v_bsl_gcd, $tmp_bsl_tmp, sizeof (std::function<void*(void*)>)); } return [=]() -> void* { void* $tmp_bsl_tmp = new std::function<void*(void*)>([=](void* $v_bsl_x) -> void* { return new std::function<void*(void*)>([=](void* $v_bsl_y) -> void* { return [=]() -> void* { void* $tmp_bsl_tmp = (*((std::function<void*(void*)>*)((*((std::function<void*(void*)>*)($v_bsl_less)))($v_bsl_x))))($v_bsl_y); switch ((($t_bsl_Bool*)($tmp_bsl_tmp))->T) { case $t_bsl_Bool::$e_bsl_True: { return $v_bsl_y; } case $t_bsl_Bool::$e_bsl_False: { return $v_bsl_x; } } }(); }); });  void* $v_bsl_max = $tmp_bsl_tmp; return [=]() -> void* { void *$v_bsl_concat = new std::function<void*(void*)>(); { void* $tmp_bsl_tmp = new std::function<void*(void*)>([=](void* $v_bsl_a) -> void* { return new std::function<void*(void*)>([=](void* $v_bsl_b) -> void* { return [=]() -> void* { void* $tmp_bsl_tmp = $v_bsl_a; switch ((($t_bsl_List*)($tmp_bsl_tmp))->T) { case $t_bsl_List::$e_bsl_Nil: { return $v_bsl_b; } case $t_bsl_List::$e_bsl_Cons: {void* $v_bsl_x = (($d_bsl_Cons*)((($t_bsl_List*)($tmp_bsl_tmp))->ptr))->d0;void* $v_bsl_xs = (($d_bsl_Cons*)((($t_bsl_List*)($tmp_bsl_tmp))->ptr))->d1; return (*((std::function<void*(void*)>*)((*((std::function<void*(void*)>*)($v_bsl_Cons)))($v_bsl_x))))((*((std::function<void*(void*)>*)((*((std::function<void*(void*)>*)($v_bsl_concat)))($v_bsl_xs))))($v_bsl_b)); } } }(); }); }); std::memcpy($v_bsl_concat, $tmp_bsl_tmp, sizeof (std::function<void*(void*)>)); } return [=]() -> void* { void *$v_bsl_filter = new std::function<void*(void*)>(); { void* $tmp_bsl_tmp = new std::function<void*(void*)>([=](void* $v_bsl_list) -> void* { return new std::function<void*(void*)>([=](void* $v_bsl_f) -> void* { return [=]() -> void* { void* $tmp_bsl_tmp = $v_bsl_list; switch ((($t_bsl_List*)($tmp_bsl_tmp))->T) { case $t_bsl_List::$e_bsl_Nil: { return $v_bsl_Nil; } case $t_bsl_List::$e_bsl_Cons: {void* $v_bsl_x = (($d_bsl_Cons*)((($t_bsl_List*)($tmp_bsl_tmp))->ptr))->d0;void* $v_bsl_xs = (($d_bsl_Cons*)((($t_bsl_List*)($tmp_bsl_tmp))->ptr))->d1; return [=]() -> void* { void* $tmp_bsl_tmp = (*((std::function<void*(void*)>*)($v_bsl_f)))($v_bsl_x); switch ((($t_bsl_Bool*)($tmp_bsl_tmp))->T) { case $t_bsl_Bool::$e_bsl_True: { return (*((std::function<void*(void*)>*)((*((std::function<void*(void*)>*)($v_bsl_Cons)))($v_bsl_x))))((*((std::function<void*(void*)>*)((*((std::function<void*(void*)>*)($v_bsl_filter)))($v_bsl_xs))))($v_bsl_f)); } case $t_bsl_Bool::$e_bsl_False: { return (*((std::function<void*(void*)>*)((*((std::function<void*(void*)>*)($v_bsl_filter)))($v_bsl_xs))))($v_bsl_f); } } }(); } } }(); }); }); std::memcpy($v_bsl_filter, $tmp_bsl_tmp, sizeof (std::function<void*(void*)>)); } return [=]() -> void* { void* $tmp_bsl_tmp = new std::function<void*(void*)>([=](void* $v_bsl_less) -> void* { return [=]() -> void* { void *$v_bsl_sortLess = new std::function<void*(void*)>(); { void* $tmp_bsl_tmp = new std::function<void*(void*)>([=](void* $v_bsl_list) -> void* { return [=]() -> void* { void* $tmp_bsl_tmp = $v_bsl_list; switch ((($t_bsl_List*)($tmp_bsl_tmp))->T) { case $t_bsl_List::$e_bsl_Nil: { return $v_bsl_Nil; } case $t_bsl_List::$e_bsl_Cons: {void* $v_bsl_x = (($d_bsl_Cons*)((($t_bsl_List*)($tmp_bsl_tmp))->ptr))->d0;void* $v_bsl_xs = (($d_bsl_Cons*)((($t_bsl_List*)($tmp_bsl_tmp))->ptr))->d1; return (*((std::function<void*(void*)>*)((*((std::function<void*(void*)>*)($v_bsl_concat)))((*((std::function<void*(void*)>*)($v_bsl_sortLess)))((*((std::function<void*(void*)>*)((*((std::function<void*(void*)>*)($v_bsl_filter)))($v_bsl_xs))))(new std::function<void*(void*)>([=](void* $v_bsl_y) -> void* { return (*((std::function<void*(void*)>*)($v_bsl_bnot)))((*((std::function<void*(void*)>*)((*((std::function<void*(void*)>*)($v_bsl_less)))($v_bsl_x))))($v_bsl_y)); })))))))((*((std::function<void*(void*)>*)((*((std::function<void*(void*)>*)($v_bsl_Cons)))($v_bsl_x))))((*((std::function<void*(void*)>*)($v_bsl_sortLess)))((*((std::function<void*(void*)>*)((*((std::function<void*(void*)>*)($v_bsl_filter)))($v_bsl_xs))))((*((std::function<void*(void*)>*)($v_bsl_less)))($v_bsl_x))))); } } }(); }); std::memcpy($v_bsl_sortLess, $tmp_bsl_tmp, sizeof (std::function<void*(void*)>)); } return $v_bsl_sortLess; } (); });  void* $v_bsl_sort = $tmp_bsl_tmp; return [=]() -> void* { void *$v_bsl_getList = new $t_bsl_IO(); { void* $tmp_bsl_tmp = (*((std::function<void*(void*)>*)((*((std::function<void*(void*)>*)($v_bsl_bind)))($v_bsl_getInt))))(new std::function<void*(void*)>([=](void* $v_bsl_x) -> void* { return [=]() -> void* { void* $tmp_bsl_tmp = $v_bsl_x; switch ((($t_bsl_Maybe*)($tmp_bsl_tmp))->T) { case $t_bsl_Maybe::$e_bsl_Just: {void* $v_bsl_x = (($d_bsl_Just*)((($t_bsl_Maybe*)($tmp_bsl_tmp))->ptr))->d0; return (*((std::function<void*(void*)>*)((*((std::function<void*(void*)>*)($v_bsl_bind)))($v_bsl_getList))))(new std::function<void*(void*)>([=](void* $v_bsl_xs) -> void* { return (*((std::function<void*(void*)>*)($v_bsl_return)))((*((std::function<void*(void*)>*)((*((std::function<void*(void*)>*)($v_bsl_Cons)))($v_bsl_x))))($v_bsl_xs)); })); } case $t_bsl_Maybe::$e_bsl_Nothing: { return (*((std::function<void*(void*)>*)($v_bsl_return)))($v_bsl_Nil); } } }(); })); std::memcpy($v_bsl_getList, $tmp_bsl_tmp, sizeof ($t_bsl_IO)); } return [=]() -> void* { void *$v_bsl_putList = new std::function<void*(void*)>(); { void* $tmp_bsl_tmp = new std::function<void*(void*)>([=](void* $v_bsl_list) -> void* { return [=]() -> void* { void* $tmp_bsl_tmp = $v_bsl_list; switch ((($t_bsl_List*)($tmp_bsl_tmp))->T) { case $t_bsl_List::$e_bsl_Nil: { return (*((std::function<void*(void*)>*)($v_bsl_return)))($v_bsl_Unit); } case $t_bsl_List::$e_bsl_Cons: {void* $v_bsl_x = (($d_bsl_Cons*)((($t_bsl_List*)($tmp_bsl_tmp))->ptr))->d0;void* $v_bsl_xs = (($d_bsl_Cons*)((($t_bsl_List*)($tmp_bsl_tmp))->ptr))->d1; return (*((std::function<void*(void*)>*)((*((std::function<void*(void*)>*)($v_bsl_bind)))((*((std::function<void*(void*)>*)($v_bsl_putInt)))($v_bsl_x)))))(new std::function<void*(void*)>([=](void* $v_bsl__) -> void* { return (*((std::function<void*(void*)>*)($v_bsl_putList)))($v_bsl_xs); })); } } }(); }); std::memcpy($v_bsl_putList, $tmp_bsl_tmp, sizeof (std::function<void*(void*)>)); } return [=]() -> void* { void *$v_bsl_toList = new std::function<void*(void*)>(); { void* $tmp_bsl_tmp = new std::function<void*(void*)>([=](void* $v_bsl_x) -> void* { return [=]() -> void* { void* $tmp_bsl_tmp = $v_bsl_x; switch ((($t_bsl_List*)($tmp_bsl_tmp))->T) { case $t_bsl_List::$e_bsl_Nil: { return $v_bsl_Nil; } case $t_bsl_List::$e_bsl_Cons: {void* $v_bsl_h = (($d_bsl_Cons*)((($t_bsl_List*)($tmp_bsl_tmp))->ptr))->d0;void* $v_bsl_t = (($d_bsl_Cons*)((($t_bsl_List*)($tmp_bsl_tmp))->ptr))->d1; return [=]() -> void* { void* $tmp_bsl_tmp = $v_bsl_t; switch ((($t_bsl_List*)($tmp_bsl_tmp))->T) { case $t_bsl_List::$e_bsl_Cons: {void* $v_bsl_h_ = (($d_bsl_Cons*)((($t_bsl_List*)($tmp_bsl_tmp))->ptr))->d0;void* $v_bsl_t_ = (($d_bsl_Cons*)((($t_bsl_List*)($tmp_bsl_tmp))->ptr))->d1; return (*((std::function<void*(void*)>*)((*((std::function<void*(void*)>*)($v_bsl_Cons)))((*((std::function<void*(void*)>*)((*((std::function<void*(void*)>*)($v_bsl_Pair)))($v_bsl_h))))($v_bsl_h_)))))((*((std::function<void*(void*)>*)($v_bsl_toList)))($v_bsl_t_)); } } }(); } } }(); }); std::memcpy($v_bsl_toList, $tmp_bsl_tmp, sizeof (std::function<void*(void*)>)); } return [=]() -> void* { void* $tmp_bsl_tmp =  (void*)0 ;  void* $v_bsl_zero = $tmp_bsl_tmp; return [=]() -> void* { void* $tmp_bsl_tmp = new std::function<void*(void*)>([=](void* $v_bsl_lst) -> void* { return [=]() -> void* { void *$v_bsl_getAns_ = new std::function<void*(void*)>(); { void* $tmp_bsl_tmp = new std::function<void*(void*)>([=](void* $v_bsl_l) -> void* { return new std::function<void*(void*)>([=](void* $v_bsl_unfinishedTask) -> void* { return new std::function<void*(void*)>([=](void* $v_bsl_currentTime) -> void* { return new std::function<void*(void*)>([=](void* $v_bsl_maxTask) -> void* { return [=]() -> void* { void* $tmp_bsl_tmp = $v_bsl_l; switch ((($t_bsl_List*)($tmp_bsl_tmp))->T) { case $t_bsl_List::$e_bsl_Nil: { return (*((std::function<void*(void*)>*)((*((std::function<void*(void*)>*)($v_bsl_Pair)))((*((std::function<void*(void*)>*)((*((std::function<void*(void*)>*)($v_bsl_add)))($v_bsl_currentTime))))($v_bsl_unfinishedTask)))))($v_bsl_maxTask); } case $t_bsl_List::$e_bsl_Cons: {void* $v_bsl_h = (($d_bsl_Cons*)((($t_bsl_List*)($tmp_bsl_tmp))->ptr))->d0;void* $v_bsl_xs = (($d_bsl_Cons*)((($t_bsl_List*)($tmp_bsl_tmp))->ptr))->d1; return [=]() -> void* { void* $tmp_bsl_tmp = $v_bsl_h; switch ((($t_bsl_Pair*)($tmp_bsl_tmp))->T) { case $t_bsl_Pair::$e_bsl_Pair: {void* $v_bsl_t = (($d_bsl_Pair*)((($t_bsl_Pair*)($tmp_bsl_tmp))->ptr))->d0;void* $v_bsl_c = (($d_bsl_Pair*)((($t_bsl_Pair*)($tmp_bsl_tmp))->ptr))->d1; return [=]() -> void* { void* $tmp_bsl_tmp = (*((std::function<void*(void*)>*)($v_bsl_eq0)))((*((std::function<void*(void*)>*)((*((std::function<void*(void*)>*)($v_bsl_sub)))($v_bsl_t))))($v_bsl_currentTime)); switch ((($t_bsl_Bool*)($tmp_bsl_tmp))->T) { case $t_bsl_Bool::$e_bsl_True: { return (*((std::function<void*(void*)>*)((*((std::function<void*(void*)>*)((*((std::function<void*(void*)>*)((*((std::function<void*(void*)>*)($v_bsl_getAns_)))($v_bsl_xs))))((*((std::function<void*(void*)>*)((*((std::function<void*(void*)>*)($v_bsl_add)))($v_bsl_unfinishedTask))))($v_bsl_c)))))($v_bsl_currentTime))))((*((std::function<void*(void*)>*)((*((std::function<void*(void*)>*)($v_bsl_max)))($v_bsl_maxTask))))((*((std::function<void*(void*)>*)((*((std::function<void*(void*)>*)($v_bsl_add)))($v_bsl_unfinishedTask))))($v_bsl_c))); } case $t_bsl_Bool::$e_bsl_False: { return (*((std::function<void*(void*)>*)((*((std::function<void*(void*)>*)((*((std::function<void*(void*)>*)((*((std::function<void*(void*)>*)($v_bsl_getAns_)))((*((std::function<void*(void*)>*)((*((std::function<void*(void*)>*)($v_bsl_Cons)))((*((std::function<void*(void*)>*)((*((std::function<void*(void*)>*)($v_bsl_Pair)))($v_bsl_t))))($v_bsl_c)))))($v_bsl_xs)))))((*((std::function<void*(void*)>*)((*((std::function<void*(void*)>*)($v_bsl_max)))((*((std::function<void*(void*)>*)((*((std::function<void*(void*)>*)($v_bsl_add)))((*((std::function<void*(void*)>*)((*((std::function<void*(void*)>*)($v_bsl_sub)))($v_bsl_unfinishedTask))))($v_bsl_t)))))($v_bsl_currentTime)))))($v_bsl_zero)))))($v_bsl_t))))($v_bsl_maxTask); } } }(); } } }(); } } }(); }); }); }); }); std::memcpy($v_bsl_getAns_, $tmp_bsl_tmp, sizeof (std::function<void*(void*)>)); } return (*((std::function<void*(void*)>*)((*((std::function<void*(void*)>*)((*((std::function<void*(void*)>*)((*((std::function<void*(void*)>*)($v_bsl_getAns_)))($v_bsl_lst))))($v_bsl_zero))))($v_bsl_zero))))($v_bsl_zero); } (); });  void* $v_bsl_getAns = $tmp_bsl_tmp; return [=]() -> void* { void* $tmp_bsl_tmp = new std::function<void*(void*)>([=](void* $v_bsl_x) -> void* { return [=]() -> void* { void* $tmp_bsl_tmp = $v_bsl_x; switch ((($t_bsl_Pair*)($tmp_bsl_tmp))->T) { case $t_bsl_Pair::$e_bsl_Pair: {void* $v_bsl_f = (($d_bsl_Pair*)((($t_bsl_Pair*)($tmp_bsl_tmp))->ptr))->d0;void* $v_bsl__ = (($d_bsl_Pair*)((($t_bsl_Pair*)($tmp_bsl_tmp))->ptr))->d1; return $v_bsl_f; } } }(); });  void* $v_bsl_fst = $tmp_bsl_tmp; return [=]() -> void* { void* $tmp_bsl_tmp = new std::function<void*(void*)>([=](void* $v_bsl_x) -> void* { return [=]() -> void* { void* $tmp_bsl_tmp = $v_bsl_x; switch ((($t_bsl_Pair*)($tmp_bsl_tmp))->T) { case $t_bsl_Pair::$e_bsl_Pair: {void* $v_bsl__ = (($d_bsl_Pair*)((($t_bsl_Pair*)($tmp_bsl_tmp))->ptr))->d0;void* $v_bsl_s = (($d_bsl_Pair*)((($t_bsl_Pair*)($tmp_bsl_tmp))->ptr))->d1; return $v_bsl_s; } } }(); });  void* $v_bsl_snd = $tmp_bsl_tmp; return [=]() -> void* { void* $tmp_bsl_tmp = new std::function<void*(void*)>([=](void* $v_bsl_x) -> void* { return [=]() -> void* { void* $tmp_bsl_tmp = $v_bsl_x; switch ((($t_bsl_List*)($tmp_bsl_tmp))->T) { case $t_bsl_List::$e_bsl_Cons: {void* $v_bsl__ = (($d_bsl_Cons*)((($t_bsl_List*)($tmp_bsl_tmp))->ptr))->d0;void* $v_bsl_t = (($d_bsl_Cons*)((($t_bsl_List*)($tmp_bsl_tmp))->ptr))->d1; return $v_bsl_t; } } }(); });  void* $v_bsl_tail = $tmp_bsl_tmp; return [=]() -> void* { void* $tmp_bsl_tmp = (*((std::function<void*(void*)>*)((*((std::function<void*(void*)>*)($v_bsl_bind)))($v_bsl_getList))))(new std::function<void*(void*)>([=](void* $v_bsl_numbers) -> void* { return [=]() -> void* { void* $tmp_bsl_tmp = (*((std::function<void*(void*)>*)($v_bsl_getAns)))((*((std::function<void*(void*)>*)($v_bsl_toList)))((*((std::function<void*(void*)>*)($v_bsl_tail)))($v_bsl_numbers)));  void* $v_bsl_ans = $tmp_bsl_tmp; return (*((std::function<void*(void*)>*)((*((std::function<void*(void*)>*)($v_bsl_bind)))((*((std::function<void*(void*)>*)($v_bsl_putInt)))((*((std::function<void*(void*)>*)($v_bsl_fst)))($v_bsl_ans))))))(new std::function<void*(void*)>([=](void* $v_bsl__) -> void* { return (*((std::function<void*(void*)>*)($v_bsl_putInt)))((*((std::function<void*(void*)>*)($v_bsl_snd)))($v_bsl_ans)); })); } (); }));  void* $v_bsl_main = $tmp_bsl_tmp; return (*((std::function<void*(void*)>*)($v_bsl_runIO)))($v_bsl_main); } (); } (); } (); } (); } (); } (); } (); } (); } (); } (); } (); } (); } (); } (); } (); } (); } (); } (); } (); } (); } (); } (); } (); } (); } (); } (); } (); } (); } (); } (); } (); } (); } (); } (); } (); } (); } (); } (); } (); } (); } (); } (); }


#include <cstddef>
#include <cstdint>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <functional>
void *operator new(std::size_t sz) { static char *b, *e; if (b + sz > e) { b = (char *) std::malloc(sz > (1 << 23) ? sz : (1 << 23)); e = b + (sz > (1 << 23) ? sz : (1 << 23)); } return e -= sz; }
struct $t_bsl_Bool { enum { $e_bsl_False, $e_bsl_True } T; void* ptr; };
struct $d_bsl_False { };
struct $d_bsl_True { };
struct $t_bsl_IO { enum { $e_bsl_Pure, $e_bsl_Free } T; void* ptr; };
struct $d_bsl_Pure { void* d0; };
struct $d_bsl_Free { void* d0; };
struct $t_bsl_IOImpl { enum { $e_bsl_Read, $e_bsl_Write } T; void* ptr; };
struct $d_bsl_Read { void* d0; };
struct $d_bsl_Write { void* d0; void* d1; };
typedef  void  $t_bsl_Int;
struct $t_bsl_List { enum { $e_bsl_Nil, $e_bsl_Cons } T; void* ptr; };
struct $d_bsl_Nil { };
struct $d_bsl_Cons { void* d0; void* d1; };
struct $t_bsl_Maybe { enum { $e_bsl_Just, $e_bsl_Nothing } T; void* ptr; };
struct $d_bsl_Just { void* d0; };
struct $d_bsl_Nothing { };
struct $t_bsl_Pair { enum { $e_bsl_Pair } T; void* ptr; };
struct $d_bsl_Pair { void* d0; void* d1; };
struct $t_bsl_Unit { enum { $e_bsl_Unit } T; void* ptr; };
struct $d_bsl_Unit { };
int main() { [=]() -> void* { void* $tmp_bsl_tmp = new $t_bsl_Unit { $t_bsl_Unit::$e_bsl_Unit, new $d_bsl_Unit{ } };  void* $v_bsl_Unit = $tmp_bsl_tmp; return [=]() -> void* { void* $tmp_bsl_tmp = new std::function<void*(void*)>([=](void* $v_bsl_arg0) -> void* { return new std::function<void*(void*)>([=](void* $v_bsl_arg1) -> void* { return new $t_bsl_Pair { $t_bsl_Pair::$e_bsl_Pair, new $d_bsl_Pair{ $v_bsl_arg0, $v_bsl_arg1 } }; }); });  void* $v_bsl_Pair = $tmp_bsl_tmp; return [=]() -> void* { void* $tmp_bsl_tmp = new $t_bsl_Maybe { $t_bsl_Maybe::$e_bsl_Nothing, new $d_bsl_Nothing{ } };  void* $v_bsl_Nothing = $tmp_bsl_tmp; return [=]() -> void* { void* $tmp_bsl_tmp = new std::function<void*(void*)>([=](void* $v_bsl_arg0) -> void* { return new $t_bsl_Maybe { $t_bsl_Maybe::$e_bsl_Just, new $d_bsl_Just{ $v_bsl_arg0 } }; });  void* $v_bsl_Just = $tmp_bsl_tmp; return [=]() -> void* { void* $tmp_bsl_tmp = new std::function<void*(void*)>([=](void* $v_bsl_arg0) -> void* { return new std::function<void*(void*)>([=](void* $v_bsl_arg1) -> void* { return new $t_bsl_List { $t_bsl_List::$e_bsl_Cons, new $d_bsl_Cons{ $v_bsl_arg0, $v_bsl_arg1 } }; }); });  void* $v_bsl_Cons = $tmp_bsl_tmp; return [=]() -> void* { void* $tmp_bsl_tmp = new $t_bsl_List { $t_bsl_List::$e_bsl_Nil, new $d_bsl_Nil{ } };  void* $v_bsl_Nil = $tmp_bsl_tmp; return [=]() -> void* { void* $tmp_bsl_tmp = new std::function<void*(void*)>([=](void* $v_bsl_arg0) -> void* { return new std::function<void*(void*)>([=](void* $v_bsl_arg1) -> void* { return new $t_bsl_IOImpl { $t_bsl_IOImpl::$e_bsl_Write, new $d_bsl_Write{ $v_bsl_arg0, $v_bsl_arg1 } }; }); });  void* $v_bsl_Write = $tmp_bsl_tmp; return [=]() -> void* { void* $tmp_bsl_tmp = new std::function<void*(void*)>([=](void* $v_bsl_arg0) -> void* { return new $t_bsl_IOImpl { $t_bsl_IOImpl::$e_bsl_Read, new $d_bsl_Read{ $v_bsl_arg0 } }; });  void* $v_bsl_Read = $tmp_bsl_tmp; return [=]() -> void* { void* $tmp_bsl_tmp = new std::function<void*(void*)>([=](void* $v_bsl_arg0) -> void* { return new $t_bsl_IO { $t_bsl_IO::$e_bsl_Free, new $d_bsl_Free{ $v_bsl_arg0 } }; });  void* $v_bsl_Free = $tmp_bsl_tmp; return [=]() -> void* { void* $tmp_bsl_tmp = new std::function<void*(void*)>([=](void* $v_bsl_arg0) -> void* { return new $t_bsl_IO { $t_bsl_IO::$e_bsl_Pure, new $d_bsl_Pure{ $v_bsl_arg0 } }; });  void* $v_bsl_Pure = $tmp_bsl_tmp; return [=]() -> void* { void* $tmp_bsl_tmp = new $t_bsl_Bool { $t_bsl_Bool::$e_bsl_True, new $d_bsl_True{ } };  void* $v_bsl_True = $tmp_bsl_tmp; return [=]() -> void* { void* $tmp_bsl_tmp = new $t_bsl_Bool { $t_bsl_Bool::$e_bsl_False, new $d_bsl_False{ } };  void* $v_bsl_False = $tmp_bsl_tmp; return [=]() -> void* { void* $tmp_bsl_tmp = new std::function<void*(void*)>([=](void* $v_bsl_f) -> void* { return new std::function<void*(void*)>([=](void* $v_bsl_x) -> void* { return [=]() -> void* { void* $tmp_bsl_tmp = $v_bsl_x; switch ((($t_bsl_IOImpl*)($tmp_bsl_tmp))->T) { case $t_bsl_IOImpl::$e_bsl_Write: {void* $v_bsl_s = (($d_bsl_Write*)((($t_bsl_IOImpl*)($tmp_bsl_tmp))->ptr))->d0;void* $v_bsl_k = (($d_bsl_Write*)((($t_bsl_IOImpl*)($tmp_bsl_tmp))->ptr))->d1; return (*((std::function<void*(void*)>*)((*((std::function<void*(void*)>*)($v_bsl_Write)))($v_bsl_s))))((*((std::function<void*(void*)>*)($v_bsl_f)))($v_bsl_k)); } case $t_bsl_IOImpl::$e_bsl_Read: {void* $v_bsl_k = (($d_bsl_Read*)((($t_bsl_IOImpl*)($tmp_bsl_tmp))->ptr))->d0; return (*((std::function<void*(void*)>*)($v_bsl_Read)))(new std::function<void*(void*)>([=](void* $v_bsl_s) -> void* { return (*((std::function<void*(void*)>*)($v_bsl_f)))((*((std::function<void*(void*)>*)($v_bsl_k)))($v_bsl_s)); })); } } }(); }); });  void* $v_bsl_fmap = $tmp_bsl_tmp; return [=]() -> void* { void* $tmp_bsl_tmp = $v_bsl_Pure;  void* $v_bsl_return = $tmp_bsl_tmp; return [=]() -> void* { void *$v_bsl_bind = new std::function<void*(void*)>(); { void* $tmp_bsl_tmp = new std::function<void*(void*)>([=](void* $v_bsl_x) -> void* { return new std::function<void*(void*)>([=](void* $v_bsl_f) -> void* { return [=]() -> void* { void* $tmp_bsl_tmp = $v_bsl_x; switch ((($t_bsl_IO*)($tmp_bsl_tmp))->T) { case $t_bsl_IO::$e_bsl_Pure: {void* $v_bsl_x = (($d_bsl_Pure*)((($t_bsl_IO*)($tmp_bsl_tmp))->ptr))->d0; return (*((std::function<void*(void*)>*)($v_bsl_f)))($v_bsl_x); } case $t_bsl_IO::$e_bsl_Free: {void* $v_bsl_x = (($d_bsl_Free*)((($t_bsl_IO*)($tmp_bsl_tmp))->ptr))->d0; return (*((std::function<void*(void*)>*)($v_bsl_Free)))((*((std::function<void*(void*)>*)((*((std::function<void*(void*)>*)($v_bsl_fmap)))(new std::function<void*(void*)>([=](void* $v_bsl_y) -> void* { return (*((std::function<void*(void*)>*)((*((std::function<void*(void*)>*)($v_bsl_bind)))($v_bsl_y))))($v_bsl_f); })))))($v_bsl_x)); } } }(); }); }); std::memcpy($v_bsl_bind, $tmp_bsl_tmp, sizeof (std::function<void*(void*)>)); } return [=]() -> void* { void* $tmp_bsl_tmp = (*((std::function<void*(void*)>*)($v_bsl_Free)))((*((std::function<void*(void*)>*)($v_bsl_Read)))(new std::function<void*(void*)>([=](void* $v_bsl_x) -> void* { return (*((std::function<void*(void*)>*)($v_bsl_return)))($v_bsl_x); })));  void* $v_bsl_getInt = $tmp_bsl_tmp; return [=]() -> void* { void* $tmp_bsl_tmp = new std::function<void*(void*)>([=](void* $v_bsl_x) -> void* { return (*((std::function<void*(void*)>*)($v_bsl_Free)))((*((std::function<void*(void*)>*)((*((std::function<void*(void*)>*)($v_bsl_Write)))($v_bsl_x))))((*((std::function<void*(void*)>*)($v_bsl_return)))($v_bsl_Unit))); });  void* $v_bsl_putInt = $tmp_bsl_tmp; return [=]() -> void* { void *$v_bsl_runIO = new std::function<void*(void*)>(); { void* $tmp_bsl_tmp = new std::function<void*(void*)>([=](void* $v_bsl_x) -> void* { return [=]() -> void* { void* $tmp_bsl_tmp = $v_bsl_x; switch ((($t_bsl_IO*)($tmp_bsl_tmp))->T) { case $t_bsl_IO::$e_bsl_Pure: {void* $v_bsl_x = (($d_bsl_Pure*)((($t_bsl_IO*)($tmp_bsl_tmp))->ptr))->d0; return $v_bsl_x; } case $t_bsl_IO::$e_bsl_Free: {void* $v_bsl_x = (($d_bsl_Free*)((($t_bsl_IO*)($tmp_bsl_tmp))->ptr))->d0; return [=]() -> void* { void* $tmp_bsl_tmp = $v_bsl_x; switch ((($t_bsl_IOImpl*)($tmp_bsl_tmp))->T) { case $t_bsl_IOImpl::$e_bsl_Write: {void* $v_bsl_c = (($d_bsl_Write*)((($t_bsl_IOImpl*)($tmp_bsl_tmp))->ptr))->d0;void* $v_bsl_x = (($d_bsl_Write*)((($t_bsl_IOImpl*)($tmp_bsl_tmp))->ptr))->d1; return [=]() -> void* { void* $tmp_bsl_tmp =  (std::printf("%d\n", (std::intptr_t) $v_bsl_c), nullptr) ;  void* $v_bsl__ = $tmp_bsl_tmp; return (*((std::function<void*(void*)>*)($v_bsl_runIO)))($v_bsl_x); } (); } case $t_bsl_IOImpl::$e_bsl_Read: {void* $v_bsl_g = (($d_bsl_Read*)((($t_bsl_IOImpl*)($tmp_bsl_tmp))->ptr))->d0; return [=]() -> void* { void* $tmp_bsl_tmp =  [=]() -> void* { int x; if (std::scanf("%d", &x) == 1) return (*((std::function<void*(void*)>*)$v_bsl_Just))((void*) (std::intptr_t) x); else return $v_bsl_Nothing; }() ;  void* $v_bsl_x = $tmp_bsl_tmp; return (*((std::function<void*(void*)>*)($v_bsl_runIO)))((*((std::function<void*(void*)>*)($v_bsl_g)))($v_bsl_x)); } (); } } }(); } } }(); }); std::memcpy($v_bsl_runIO, $tmp_bsl_tmp, sizeof (std::function<void*(void*)>)); } return [=]() -> void* { void* $tmp_bsl_tmp = new std::function<void*(void*)>([=](void* $v_bsl_x) -> void* { return [=]() -> void* { void* $tmp_bsl_tmp = $v_bsl_x; switch ((($t_bsl_Bool*)($tmp_bsl_tmp))->T) { case $t_bsl_Bool::$e_bsl_True: { return $v_bsl_False; } case $t_bsl_Bool::$e_bsl_False: { return $v_bsl_True; } } }(); });  void* $v_bsl_bnot = $tmp_bsl_tmp; return [=]() -> void* { void* $tmp_bsl_tmp = new std::function<void*(void*)>([=](void* $v_bsl_x) -> void* { return [=]() -> void* { void* $tmp_bsl_tmp = $v_bsl_x; switch ((($t_bsl_Bool*)($tmp_bsl_tmp))->T) { case $t_bsl_Bool::$e_bsl_True: { return new std::function<void*(void*)>([=](void* $v_bsl_x) -> void* { return $v_bsl_x; }); } case $t_bsl_Bool::$e_bsl_False: { return new std::function<void*(void*)>([=](void* $v_bsl_x) -> void* { return $v_bsl_False; }); } } }(); });  void* $v_bsl_band = $tmp_bsl_tmp; return [=]() -> void* { void* $tmp_bsl_tmp = new std::function<void*(void*)>([=](void* $v_bsl_a) -> void* { return new std::function<void*(void*)>([=](void* $v_bsl_b) -> void* { return  (void*) (((std::intptr_t) $v_bsl_a) + ((std::intptr_t) $v_bsl_b)) ; }); });  void* $v_bsl_add = $tmp_bsl_tmp; return [=]() -> void* { void* $tmp_bsl_tmp = new std::function<void*(void*)>([=](void* $v_bsl_a) -> void* { return  (void*) -((std::intptr_t) $v_bsl_a) ; });  void* $v_bsl_neg = $tmp_bsl_tmp; return [=]() -> void* { void* $tmp_bsl_tmp = new std::function<void*(void*)>([=](void* $v_bsl_a) -> void* { return new std::function<void*(void*)>([=](void* $v_bsl_b) -> void* { return  (void*) (((std::intptr_t) $v_bsl_a) - ((std::intptr_t) $v_bsl_b)) ; }); });  void* $v_bsl_sub = $tmp_bsl_tmp; return [=]() -> void* { void* $tmp_bsl_tmp = new std::function<void*(void*)>([=](void* $v_bsl_a) -> void* { return new std::function<void*(void*)>([=](void* $v_bsl_b) -> void* { return  (void*) (((std::intptr_t) $v_bsl_a) * ((std::intptr_t) $v_bsl_b)) ; }); });  void* $v_bsl_mul = $tmp_bsl_tmp; return [=]() -> void* { void* $tmp_bsl_tmp = new std::function<void*(void*)>([=](void* $v_bsl_a) -> void* { return new std::function<void*(void*)>([=](void* $v_bsl_b) -> void* { return  (void*) (((std::intptr_t) $v_bsl_a) / ((std::intptr_t) $v_bsl_b)) ; }); });  void* $v_bsl_div = $tmp_bsl_tmp; return [=]() -> void* { void* $tmp_bsl_tmp = new std::function<void*(void*)>([=](void* $v_bsl_a) -> void* { return new std::function<void*(void*)>([=](void* $v_bsl_b) -> void* { return  (void*) (((std::intptr_t) $v_bsl_a) % ((std::intptr_t) $v_bsl_b)) ; }); });  void* $v_bsl_mod = $tmp_bsl_tmp; return [=]() -> void* { void* $tmp_bsl_tmp = new std::function<void*(void*)>([=](void* $v_bsl_a) -> void* { return new std::function<void*(void*)>([=](void* $v_bsl_b) -> void* { return  (((std::intptr_t) $v_bsl_a) < ((std::intptr_t) $v_bsl_b))?$v_bsl_True:$v_bsl_False ; }); });  void* $v_bsl_less = $tmp_bsl_tmp; return [=]() -> void* { void* $tmp_bsl_tmp = new std::function<void*(void*)>([=](void* $v_bsl_a) -> void* { return  ((std::intptr_t) $v_bsl_a) == 0?$v_bsl_True:$v_bsl_False ; });  void* $v_bsl_eq0 = $tmp_bsl_tmp; return [=]() -> void* { void *$v_bsl_gcd = new std::function<void*(void*)>(); { void* $tmp_bsl_tmp = new std::function<void*(void*)>([=](void* $v_bsl_a) -> void* { return new std::function<void*(void*)>([=](void* $v_bsl_b) -> void* { return [=]() -> void* { void* $tmp_bsl_tmp = (*((std::function<void*(void*)>*)($v_bsl_eq0)))($v_bsl_a); switch ((($t_bsl_Bool*)($tmp_bsl_tmp))->T) { case $t_bsl_Bool::$e_bsl_True: { return $v_bsl_b; } case $t_bsl_Bool::$e_bsl_False: { return (*((std::function<void*(void*)>*)((*((std::function<void*(void*)>*)($v_bsl_gcd)))((*((std::function<void*(void*)>*)((*((std::function<void*(void*)>*)($v_bsl_mod)))($v_bsl_b))))($v_bsl_a)))))($v_bsl_a); } } }(); }); }); std::memcpy($v_bsl_gcd, $tmp_bsl_tmp, sizeof (std::function<void*(void*)>)); } return [=]() -> void* { void* $tmp_bsl_tmp = new std::function<void*(void*)>([=](void* $v_bsl_x) -> void* { return new std::function<void*(void*)>([=](void* $v_bsl_y) -> void* { return [=]() -> void* { void* $tmp_bsl_tmp = (*((std::function<void*(void*)>*)((*((std::function<void*(void*)>*)($v_bsl_less)))($v_bsl_x))))($v_bsl_y); switch ((($t_bsl_Bool*)($tmp_bsl_tmp))->T) { case $t_bsl_Bool::$e_bsl_True: { return $v_bsl_y; } case $t_bsl_Bool::$e_bsl_False: { return $v_bsl_x; } } }(); }); });  void* $v_bsl_max = $tmp_bsl_tmp; return [=]() -> void* { void *$v_bsl_concat = new std::function<void*(void*)>(); { void* $tmp_bsl_tmp = new std::function<void*(void*)>([=](void* $v_bsl_a) -> void* { return new std::function<void*(void*)>([=](void* $v_bsl_b) -> void* { return [=]() -> void* { void* $tmp_bsl_tmp = $v_bsl_a; switch ((($t_bsl_List*)($tmp_bsl_tmp))->T) { case $t_bsl_List::$e_bsl_Nil: { return $v_bsl_b; } case $t_bsl_List::$e_bsl_Cons: {void* $v_bsl_x = (($d_bsl_Cons*)((($t_bsl_List*)($tmp_bsl_tmp))->ptr))->d0;void* $v_bsl_xs = (($d_bsl_Cons*)((($t_bsl_List*)($tmp_bsl_tmp))->ptr))->d1; return (*((std::function<void*(void*)>*)((*((std::function<void*(void*)>*)($v_bsl_Cons)))($v_bsl_x))))((*((std::function<void*(void*)>*)((*((std::function<void*(void*)>*)($v_bsl_concat)))($v_bsl_xs))))($v_bsl_b)); } } }(); }); }); std::memcpy($v_bsl_concat, $tmp_bsl_tmp, sizeof (std::function<void*(void*)>)); } return [=]() -> void* { void *$v_bsl_filter = new std::function<void*(void*)>(); { void* $tmp_bsl_tmp = new std::function<void*(void*)>([=](void* $v_bsl_list) -> void* { return new std::function<void*(void*)>([=](void* $v_bsl_f) -> void* { return [=]() -> void* { void* $tmp_bsl_tmp = $v_bsl_list; switch ((($t_bsl_List*)($tmp_bsl_tmp))->T) { case $t_bsl_List::$e_bsl_Nil: { return $v_bsl_Nil; } case $t_bsl_List::$e_bsl_Cons: {void* $v_bsl_x = (($d_bsl_Cons*)((($t_bsl_List*)($tmp_bsl_tmp))->ptr))->d0;void* $v_bsl_xs = (($d_bsl_Cons*)((($t_bsl_List*)($tmp_bsl_tmp))->ptr))->d1; return [=]() -> void* { void* $tmp_bsl_tmp = (*((std::function<void*(void*)>*)($v_bsl_f)))($v_bsl_x); switch ((($t_bsl_Bool*)($tmp_bsl_tmp))->T) { case $t_bsl_Bool::$e_bsl_True: { return (*((std::function<void*(void*)>*)((*((std::function<void*(void*)>*)($v_bsl_Cons)))($v_bsl_x))))((*((std::function<void*(void*)>*)((*((std::function<void*(void*)>*)($v_bsl_filter)))($v_bsl_xs))))($v_bsl_f)); } case $t_bsl_Bool::$e_bsl_False: { return (*((std::function<void*(void*)>*)((*((std::function<void*(void*)>*)($v_bsl_filter)))($v_bsl_xs))))($v_bsl_f); } } }(); } } }(); }); }); std::memcpy($v_bsl_filter, $tmp_bsl_tmp, sizeof (std::function<void*(void*)>)); } return [=]() -> void* { void* $tmp_bsl_tmp = new std::function<void*(void*)>([=](void* $v_bsl_less) -> void* { return [=]() -> void* { void *$v_bsl_sortLess = new std::function<void*(void*)>(); { void* $tmp_bsl_tmp = new std::function<void*(void*)>([=](void* $v_bsl_list) -> void* { return [=]() -> void* { void* $tmp_bsl_tmp = $v_bsl_list; switch ((($t_bsl_List*)($tmp_bsl_tmp))->T) { case $t_bsl_List::$e_bsl_Nil: { return $v_bsl_Nil; } case $t_bsl_List::$e_bsl_Cons: {void* $v_bsl_x = (($d_bsl_Cons*)((($t_bsl_List*)($tmp_bsl_tmp))->ptr))->d0;void* $v_bsl_xs = (($d_bsl_Cons*)((($t_bsl_List*)($tmp_bsl_tmp))->ptr))->d1; return (*((std::function<void*(void*)>*)((*((std::function<void*(void*)>*)($v_bsl_concat)))((*((std::function<void*(void*)>*)($v_bsl_sortLess)))((*((std::function<void*(void*)>*)((*((std::function<void*(void*)>*)($v_bsl_filter)))($v_bsl_xs))))(new std::function<void*(void*)>([=](void* $v_bsl_y) -> void* { return (*((std::function<void*(void*)>*)($v_bsl_bnot)))((*((std::function<void*(void*)>*)((*((std::function<void*(void*)>*)($v_bsl_less)))($v_bsl_x))))($v_bsl_y)); })))))))((*((std::function<void*(void*)>*)((*((std::function<void*(void*)>*)($v_bsl_Cons)))($v_bsl_x))))((*((std::function<void*(void*)>*)($v_bsl_sortLess)))((*((std::function<void*(void*)>*)((*((std::function<void*(void*)>*)($v_bsl_filter)))($v_bsl_xs))))((*((std::function<void*(void*)>*)($v_bsl_less)))($v_bsl_x))))); } } }(); }); std::memcpy($v_bsl_sortLess, $tmp_bsl_tmp, sizeof (std::function<void*(void*)>)); } return $v_bsl_sortLess; } (); });  void* $v_bsl_sort = $tmp_bsl_tmp; return [=]() -> void* { void *$v_bsl_getList = new $t_bsl_IO(); { void* $tmp_bsl_tmp = (*((std::function<void*(void*)>*)((*((std::function<void*(void*)>*)($v_bsl_bind)))($v_bsl_getInt))))(new std::function<void*(void*)>([=](void* $v_bsl_x) -> void* { return [=]() -> void* { void* $tmp_bsl_tmp = $v_bsl_x; switch ((($t_bsl_Maybe*)($tmp_bsl_tmp))->T) { case $t_bsl_Maybe::$e_bsl_Just: {void* $v_bsl_x = (($d_bsl_Just*)((($t_bsl_Maybe*)($tmp_bsl_tmp))->ptr))->d0; return (*((std::function<void*(void*)>*)((*((std::function<void*(void*)>*)($v_bsl_bind)))($v_bsl_getList))))(new std::function<void*(void*)>([=](void* $v_bsl_xs) -> void* { return (*((std::function<void*(void*)>*)($v_bsl_return)))((*((std::function<void*(void*)>*)((*((std::function<void*(void*)>*)($v_bsl_Cons)))($v_bsl_x))))($v_bsl_xs)); })); } case $t_bsl_Maybe::$e_bsl_Nothing: { return (*((std::function<void*(void*)>*)($v_bsl_return)))($v_bsl_Nil); } } }(); })); std::memcpy($v_bsl_getList, $tmp_bsl_tmp, sizeof ($t_bsl_IO)); } return [=]() -> void* { void *$v_bsl_putList = new std::function<void*(void*)>(); { void* $tmp_bsl_tmp = new std::function<void*(void*)>([=](void* $v_bsl_list) -> void* { return [=]() -> void* { void* $tmp_bsl_tmp = $v_bsl_list; switch ((($t_bsl_List*)($tmp_bsl_tmp))->T) { case $t_bsl_List::$e_bsl_Nil: { return (*((std::function<void*(void*)>*)($v_bsl_return)))($v_bsl_Unit); } case $t_bsl_List::$e_bsl_Cons: {void* $v_bsl_x = (($d_bsl_Cons*)((($t_bsl_List*)($tmp_bsl_tmp))->ptr))->d0;void* $v_bsl_xs = (($d_bsl_Cons*)((($t_bsl_List*)($tmp_bsl_tmp))->ptr))->d1; return (*((std::function<void*(void*)>*)((*((std::function<void*(void*)>*)($v_bsl_bind)))((*((std::function<void*(void*)>*)($v_bsl_putInt)))($v_bsl_x)))))(new std::function<void*(void*)>([=](void* $v_bsl__) -> void* { return (*((std::function<void*(void*)>*)($v_bsl_putList)))($v_bsl_xs); })); } } }(); }); std::memcpy($v_bsl_putList, $tmp_bsl_tmp, sizeof (std::function<void*(void*)>)); } return [=]() -> void* { void *$v_bsl_toList = new std::function<void*(void*)>(); { void* $tmp_bsl_tmp = new std::function<void*(void*)>([=](void* $v_bsl_x) -> void* { return [=]() -> void* { void* $tmp_bsl_tmp = $v_bsl_x; switch ((($t_bsl_List*)($tmp_bsl_tmp))->T) { case $t_bsl_List::$e_bsl_Nil: { return $v_bsl_Nil; } case $t_bsl_List::$e_bsl_Cons: {void* $v_bsl_h = (($d_bsl_Cons*)((($t_bsl_List*)($tmp_bsl_tmp))->ptr))->d0;void* $v_bsl_t = (($d_bsl_Cons*)((($t_bsl_List*)($tmp_bsl_tmp))->ptr))->d1; return [=]() -> void* { void* $tmp_bsl_tmp = $v_bsl_t; switch ((($t_bsl_List*)($tmp_bsl_tmp))->T) { case $t_bsl_List::$e_bsl_Cons: {void* $v_bsl_h_ = (($d_bsl_Cons*)((($t_bsl_List*)($tmp_bsl_tmp))->ptr))->d0;void* $v_bsl_t_ = (($d_bsl_Cons*)((($t_bsl_List*)($tmp_bsl_tmp))->ptr))->d1; return (*((std::function<void*(void*)>*)((*((std::function<void*(void*)>*)($v_bsl_Cons)))((*((std::function<void*(void*)>*)((*((std::function<void*(void*)>*)($v_bsl_Pair)))($v_bsl_h))))($v_bsl_h_)))))((*((std::function<void*(void*)>*)($v_bsl_toList)))($v_bsl_t_)); } } }(); } } }(); }); std::memcpy($v_bsl_toList, $tmp_bsl_tmp, sizeof (std::function<void*(void*)>)); } return [=]() -> void* { void* $tmp_bsl_tmp =  (void*)0 ;  void* $v_bsl_zero = $tmp_bsl_tmp; return [=]() -> void* { void* $tmp_bsl_tmp = new std::function<void*(void*)>([=](void* $v_bsl_lst) -> void* { return [=]() -> void* { void *$v_bsl_getAns_ = new std::function<void*(void*)>(); { void* $tmp_bsl_tmp = new std::function<void*(void*)>([=](void* $v_bsl_l) -> void* { return new std::function<void*(void*)>([=](void* $v_bsl_unfinishedTask) -> void* { return new std::function<void*(void*)>([=](void* $v_bsl_currentTime) -> void* { return new std::function<void*(void*)>([=](void* $v_bsl_maxTask) -> void* { return [=]() -> void* { void* $tmp_bsl_tmp = $v_bsl_l; switch ((($t_bsl_List*)($tmp_bsl_tmp))->T) { case $t_bsl_List::$e_bsl_Nil: { return (*((std::function<void*(void*)>*)((*((std::function<void*(void*)>*)($v_bsl_Pair)))((*((std::function<void*(void*)>*)((*((std::function<void*(void*)>*)($v_bsl_add)))($v_bsl_currentTime))))($v_bsl_unfinishedTask)))))($v_bsl_maxTask); } case $t_bsl_List::$e_bsl_Cons: {void* $v_bsl_h = (($d_bsl_Cons*)((($t_bsl_List*)($tmp_bsl_tmp))->ptr))->d0;void* $v_bsl_xs = (($d_bsl_Cons*)((($t_bsl_List*)($tmp_bsl_tmp))->ptr))->d1; return [=]() -> void* { void* $tmp_bsl_tmp = $v_bsl_h; switch ((($t_bsl_Pair*)($tmp_bsl_tmp))->T) { case $t_bsl_Pair::$e_bsl_Pair: {void* $v_bsl_t = (($d_bsl_Pair*)((($t_bsl_Pair*)($tmp_bsl_tmp))->ptr))->d0;void* $v_bsl_c = (($d_bsl_Pair*)((($t_bsl_Pair*)($tmp_bsl_tmp))->ptr))->d1; return [=]() -> void* { void* $tmp_bsl_tmp = (*((std::function<void*(void*)>*)($v_bsl_eq0)))((*((std::function<void*(void*)>*)((*((std::function<void*(void*)>*)($v_bsl_sub)))($v_bsl_t))))($v_bsl_currentTime)); switch ((($t_bsl_Bool*)($tmp_bsl_tmp))->T) { case $t_bsl_Bool::$e_bsl_True: { return (*((std::function<void*(void*)>*)((*((std::function<void*(void*)>*)((*((std::function<void*(void*)>*)((*((std::function<void*(void*)>*)($v_bsl_getAns_)))($v_bsl_xs))))((*((std::function<void*(void*)>*)((*((std::function<void*(void*)>*)($v_bsl_add)))($v_bsl_unfinishedTask))))($v_bsl_c)))))($v_bsl_currentTime))))((*((std::function<void*(void*)>*)((*((std::function<void*(void*)>*)($v_bsl_max)))($v_bsl_maxTask))))((*((std::function<void*(void*)>*)((*((std::function<void*(void*)>*)($v_bsl_add)))($v_bsl_unfinishedTask))))($v_bsl_c))); } case $t_bsl_Bool::$e_bsl_False: { return (*((std::function<void*(void*)>*)((*((std::function<void*(void*)>*)((*((std::function<void*(void*)>*)((*((std::function<void*(void*)>*)($v_bsl_getAns_)))((*((std::function<void*(void*)>*)((*((std::function<void*(void*)>*)($v_bsl_Cons)))((*((std::function<void*(void*)>*)((*((std::function<void*(void*)>*)($v_bsl_Pair)))($v_bsl_t))))($v_bsl_c)))))($v_bsl_xs)))))((*((std::function<void*(void*)>*)((*((std::function<void*(void*)>*)($v_bsl_max)))((*((std::function<void*(void*)>*)((*((std::function<void*(void*)>*)($v_bsl_add)))((*((std::function<void*(void*)>*)((*((std::function<void*(void*)>*)($v_bsl_sub)))($v_bsl_unfinishedTask))))($v_bsl_t)))))($v_bsl_currentTime)))))($v_bsl_zero)))))($v_bsl_t))))($v_bsl_maxTask); } } }(); } } }(); } } }(); }); }); }); }); std::memcpy($v_bsl_getAns_, $tmp_bsl_tmp, sizeof (std::function<void*(void*)>)); } return (*((std::function<void*(void*)>*)((*((std::function<void*(void*)>*)((*((std::function<void*(void*)>*)((*((std::function<void*(void*)>*)($v_bsl_getAns_)))($v_bsl_lst))))($v_bsl_zero))))($v_bsl_zero))))($v_bsl_zero); } (); });  void* $v_bsl_getAns = $tmp_bsl_tmp; return [=]() -> void* { void* $tmp_bsl_tmp = new std::function<void*(void*)>([=](void* $v_bsl_x) -> void* { return [=]() -> void* { void* $tmp_bsl_tmp = $v_bsl_x; switch ((($t_bsl_Pair*)($tmp_bsl_tmp))->T) { case $t_bsl_Pair::$e_bsl_Pair: {void* $v_bsl_f = (($d_bsl_Pair*)((($t_bsl_Pair*)($tmp_bsl_tmp))->ptr))->d0;void* $v_bsl__ = (($d_bsl_Pair*)((($t_bsl_Pair*)($tmp_bsl_tmp))->ptr))->d1; return $v_bsl_f; } } }(); });  void* $v_bsl_fst = $tmp_bsl_tmp; return [=]() -> void* { void* $tmp_bsl_tmp = new std::function<void*(void*)>([=](void* $v_bsl_x) -> void* { return [=]() -> void* { void* $tmp_bsl_tmp = $v_bsl_x; switch ((($t_bsl_Pair*)($tmp_bsl_tmp))->T) { case $t_bsl_Pair::$e_bsl_Pair: {void* $v_bsl__ = (($d_bsl_Pair*)((($t_bsl_Pair*)($tmp_bsl_tmp))->ptr))->d0;void* $v_bsl_s = (($d_bsl_Pair*)((($t_bsl_Pair*)($tmp_bsl_tmp))->ptr))->d1; return $v_bsl_s; } } }(); });  void* $v_bsl_snd = $tmp_bsl_tmp; return [=]() -> void* { void* $tmp_bsl_tmp = new std::function<void*(void*)>([=](void* $v_bsl_x) -> void* { return [=]() -> void* { void* $tmp_bsl_tmp = $v_bsl_x; switch ((($t_bsl_List*)($tmp_bsl_tmp))->T) { case $t_bsl_List::$e_bsl_Cons: {void* $v_bsl__ = (($d_bsl_Cons*)((($t_bsl_List*)($tmp_bsl_tmp))->ptr))->d0;void* $v_bsl_t = (($d_bsl_Cons*)((($t_bsl_List*)($tmp_bsl_tmp))->ptr))->d1; return $v_bsl_t; } } }(); });  void* $v_bsl_tail = $tmp_bsl_tmp; return [=]() -> void* { void* $tmp_bsl_tmp = (*((std::function<void*(void*)>*)((*((std::function<void*(void*)>*)($v_bsl_bind)))($v_bsl_getList))))(new std::function<void*(void*)>([=](void* $v_bsl_numbers) -> void* { return [=]() -> void* { void* $tmp_bsl_tmp = (*((std::function<void*(void*)>*)($v_bsl_getAns)))((*((std::function<void*(void*)>*)($v_bsl_toList)))((*((std::function<void*(void*)>*)($v_bsl_tail)))($v_bsl_numbers)));  void* $v_bsl_ans = $tmp_bsl_tmp; return (*((std::function<void*(void*)>*)((*((std::function<void*(void*)>*)($v_bsl_bind)))((*((std::function<void*(void*)>*)($v_bsl_putInt)))((*((std::function<void*(void*)>*)($v_bsl_fst)))($v_bsl_ans))))))(new std::function<void*(void*)>([=](void* $v_bsl__) -> void* { return (*((std::function<void*(void*)>*)($v_bsl_putInt)))((*((std::function<void*(void*)>*)($v_bsl_snd)))($v_bsl_ans)); })); } (); }));  void* $v_bsl_main = $tmp_bsl_tmp; return (*((std::function<void*(void*)>*)($v_bsl_runIO)))($v_bsl_main); } (); } (); } (); } (); } (); } (); } (); } (); } (); } (); } (); } (); } (); } (); } (); } (); } (); } (); } (); } (); } (); } (); } (); } (); } (); } (); } (); } (); } (); } (); } (); } (); } (); } (); } (); } (); } (); } (); } (); } (); } (); } (); }


#include <cstddef>
#include <cstdint>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <functional>
void *operator new(std::size_t sz) { static char *b, *e; if (b + sz > e) { b = (char *) std::malloc(sz > (1 << 30) ? sz : (1 << 30)); e = b + (sz > (1 << 30) ? sz : (1 << 30)); } return e -= sz; }
struct $t_bsl_Bool { enum { $e_bsl_False, $e_bsl_True } T; void* ptr; };
struct $d_bsl_False { };
struct $d_bsl_True { };
struct $t_bsl_IO { enum { $e_bsl_Pure, $e_bsl_Free } T; void* ptr; };
struct $d_bsl_Pure { void* d0; };
struct $d_bsl_Free { void* d0; };
struct $t_bsl_IOImpl { enum { $e_bsl_Read, $e_bsl_Write } T; void* ptr; };
struct $d_bsl_Read { void* d0; };
struct $d_bsl_Write { void* d0; void* d1; };
typedef  void  $t_bsl_Int;
struct $t_bsl_List { enum { $e_bsl_Nil, $e_bsl_Cons } T; void* ptr; };
struct $d_bsl_Nil { };
struct $d_bsl_Cons { void* d0; void* d1; };
struct $t_bsl_Maybe { enum { $e_bsl_Just, $e_bsl_Nothing } T; void* ptr; };
struct $d_bsl_Just { void* d0; };
struct $d_bsl_Nothing { };
struct $t_bsl_Pair { enum { $e_bsl_Pair } T; void* ptr; };
struct $d_bsl_Pair { void* d0; void* d1; };
struct $t_bsl_Unit { enum { $e_bsl_Unit } T; void* ptr; };
struct $d_bsl_Unit { };
int main() { [=]() -> void* { void* $tmp_bsl_tmp = new $t_bsl_Unit { $t_bsl_Unit::$e_bsl_Unit, new $d_bsl_Unit{ } };  void* $v_bsl_Unit = $tmp_bsl_tmp; return [=]() -> void* { void* $tmp_bsl_tmp = new std::function<void*(void*)>([=](void* $v_bsl_arg0) -> void* { return new std::function<void*(void*)>([=](void* $v_bsl_arg1) -> void* { return new $t_bsl_Pair { $t_bsl_Pair::$e_bsl_Pair, new $d_bsl_Pair{ $v_bsl_arg0, $v_bsl_arg1 } }; }); });  void* $v_bsl_Pair = $tmp_bsl_tmp; return [=]() -> void* { void* $tmp_bsl_tmp = new $t_bsl_Maybe { $t_bsl_Maybe::$e_bsl_Nothing, new $d_bsl_Nothing{ } };  void* $v_bsl_Nothing = $tmp_bsl_tmp; return [=]() -> void* { void* $tmp_bsl_tmp = new std::function<void*(void*)>([=](void* $v_bsl_arg0) -> void* { return new $t_bsl_Maybe { $t_bsl_Maybe::$e_bsl_Just, new $d_bsl_Just{ $v_bsl_arg0 } }; });  void* $v_bsl_Just = $tmp_bsl_tmp; return [=]() -> void* { void* $tmp_bsl_tmp = new std::function<void*(void*)>([=](void* $v_bsl_arg0) -> void* { return new std::function<void*(void*)>([=](void* $v_bsl_arg1) -> void* { return new $t_bsl_List { $t_bsl_List::$e_bsl_Cons, new $d_bsl_Cons{ $v_bsl_arg0, $v_bsl_arg1 } }; }); });  void* $v_bsl_Cons = $tmp_bsl_tmp; return [=]() -> void* { void* $tmp_bsl_tmp = new $t_bsl_List { $t_bsl_List::$e_bsl_Nil, new $d_bsl_Nil{ } };  void* $v_bsl_Nil = $tmp_bsl_tmp; return [=]() -> void* { void* $tmp_bsl_tmp = new std::function<void*(void*)>([=](void* $v_bsl_arg0) -> void* { return new std::function<void*(void*)>([=](void* $v_bsl_arg1) -> void* { return new $t_bsl_IOImpl { $t_bsl_IOImpl::$e_bsl_Write, new $d_bsl_Write{ $v_bsl_arg0, $v_bsl_arg1 } }; }); });  void* $v_bsl_Write = $tmp_bsl_tmp; return [=]() -> void* { void* $tmp_bsl_tmp = new std::function<void*(void*)>([=](void* $v_bsl_arg0) -> void* { return new $t_bsl_IOImpl { $t_bsl_IOImpl::$e_bsl_Read, new $d_bsl_Read{ $v_bsl_arg0 } }; });  void* $v_bsl_Read = $tmp_bsl_tmp; return [=]() -> void* { void* $tmp_bsl_tmp = new std::function<void*(void*)>([=](void* $v_bsl_arg0) -> void* { return new $t_bsl_IO { $t_bsl_IO::$e_bsl_Free, new $d_bsl_Free{ $v_bsl_arg0 } }; });  void* $v_bsl_Free = $tmp_bsl_tmp; return [=]() -> void* { void* $tmp_bsl_tmp = new std::function<void*(void*)>([=](void* $v_bsl_arg0) -> void* { return new $t_bsl_IO { $t_bsl_IO::$e_bsl_Pure, new $d_bsl_Pure{ $v_bsl_arg0 } }; });  void* $v_bsl_Pure = $tmp_bsl_tmp; return [=]() -> void* { void* $tmp_bsl_tmp = new $t_bsl_Bool { $t_bsl_Bool::$e_bsl_True, new $d_bsl_True{ } };  void* $v_bsl_True = $tmp_bsl_tmp; return [=]() -> void* { void* $tmp_bsl_tmp = new $t_bsl_Bool { $t_bsl_Bool::$e_bsl_False, new $d_bsl_False{ } };  void* $v_bsl_False = $tmp_bsl_tmp; return [=]() -> void* { void* $tmp_bsl_tmp = new std::function<void*(void*)>([=](void* $v_bsl_f) -> void* { return new std::function<void*(void*)>([=](void* $v_bsl_x) -> void* { return [=]() -> void* { void* $tmp_bsl_tmp = $v_bsl_x; switch ((($t_bsl_IOImpl*)($tmp_bsl_tmp))->T) { case $t_bsl_IOImpl::$e_bsl_Write: {void* $v_bsl_s = (($d_bsl_Write*)((($t_bsl_IOImpl*)($tmp_bsl_tmp))->ptr))->d0;void* $v_bsl_k = (($d_bsl_Write*)((($t_bsl_IOImpl*)($tmp_bsl_tmp))->ptr))->d1; return (*((std::function<void*(void*)>*)((*((std::function<void*(void*)>*)($v_bsl_Write)))($v_bsl_s))))((*((std::function<void*(void*)>*)($v_bsl_f)))($v_bsl_k)); } case $t_bsl_IOImpl::$e_bsl_Read: {void* $v_bsl_k = (($d_bsl_Read*)((($t_bsl_IOImpl*)($tmp_bsl_tmp))->ptr))->d0; return (*((std::function<void*(void*)>*)($v_bsl_Read)))(new std::function<void*(void*)>([=](void* $v_bsl_s) -> void* { return (*((std::function<void*(void*)>*)($v_bsl_f)))((*((std::function<void*(void*)>*)($v_bsl_k)))($v_bsl_s)); })); } } }(); }); });  void* $v_bsl_fmap = $tmp_bsl_tmp; return [=]() -> void* { void* $tmp_bsl_tmp = $v_bsl_Pure;  void* $v_bsl_return = $tmp_bsl_tmp; return [=]() -> void* { void *$v_bsl_bind = new std::function<void*(void*)>(); { void* $tmp_bsl_tmp = new std::function<void*(void*)>([=](void* $v_bsl_x) -> void* { return new std::function<void*(void*)>([=](void* $v_bsl_f) -> void* { return [=]() -> void* { void* $tmp_bsl_tmp = $v_bsl_x; switch ((($t_bsl_IO*)($tmp_bsl_tmp))->T) { case $t_bsl_IO::$e_bsl_Pure: {void* $v_bsl_x = (($d_bsl_Pure*)((($t_bsl_IO*)($tmp_bsl_tmp))->ptr))->d0; return (*((std::function<void*(void*)>*)($v_bsl_f)))($v_bsl_x); } case $t_bsl_IO::$e_bsl_Free: {void* $v_bsl_x = (($d_bsl_Free*)((($t_bsl_IO*)($tmp_bsl_tmp))->ptr))->d0; return (*((std::function<void*(void*)>*)($v_bsl_Free)))((*((std::function<void*(void*)>*)((*((std::function<void*(void*)>*)($v_bsl_fmap)))(new std::function<void*(void*)>([=](void* $v_bsl_y) -> void* { return (*((std::function<void*(void*)>*)((*((std::function<void*(void*)>*)($v_bsl_bind)))($v_bsl_y))))($v_bsl_f); })))))($v_bsl_x)); } } }(); }); }); std::memcpy($v_bsl_bind, $tmp_bsl_tmp, sizeof (std::function<void*(void*)>)); } return [=]() -> void* { void* $tmp_bsl_tmp = (*((std::function<void*(void*)>*)($v_bsl_Free)))((*((std::function<void*(void*)>*)($v_bsl_Read)))(new std::function<void*(void*)>([=](void* $v_bsl_x) -> void* { return (*((std::function<void*(void*)>*)($v_bsl_return)))($v_bsl_x); })));  void* $v_bsl_getInt = $tmp_bsl_tmp; return [=]() -> void* { void* $tmp_bsl_tmp = new std::function<void*(void*)>([=](void* $v_bsl_x) -> void* { return (*((std::function<void*(void*)>*)($v_bsl_Free)))((*((std::function<void*(void*)>*)((*((std::function<void*(void*)>*)($v_bsl_Write)))($v_bsl_x))))((*((std::function<void*(void*)>*)($v_bsl_return)))($v_bsl_Unit))); });  void* $v_bsl_putInt = $tmp_bsl_tmp; return [=]() -> void* { void *$v_bsl_runIO = new std::function<void*(void*)>(); { void* $tmp_bsl_tmp = new std::function<void*(void*)>([=](void* $v_bsl_x) -> void* { return [=]() -> void* { void* $tmp_bsl_tmp = $v_bsl_x; switch ((($t_bsl_IO*)($tmp_bsl_tmp))->T) { case $t_bsl_IO::$e_bsl_Pure: {void* $v_bsl_x = (($d_bsl_Pure*)((($t_bsl_IO*)($tmp_bsl_tmp))->ptr))->d0; return $v_bsl_x; } case $t_bsl_IO::$e_bsl_Free: {void* $v_bsl_x = (($d_bsl_Free*)((($t_bsl_IO*)($tmp_bsl_tmp))->ptr))->d0; return [=]() -> void* { void* $tmp_bsl_tmp = $v_bsl_x; switch ((($t_bsl_IOImpl*)($tmp_bsl_tmp))->T) { case $t_bsl_IOImpl::$e_bsl_Write: {void* $v_bsl_c = (($d_bsl_Write*)((($t_bsl_IOImpl*)($tmp_bsl_tmp))->ptr))->d0;void* $v_bsl_x = (($d_bsl_Write*)((($t_bsl_IOImpl*)($tmp_bsl_tmp))->ptr))->d1; return [=]() -> void* { void* $tmp_bsl_tmp =  (std::printf("%d\n", (std::intptr_t) $v_bsl_c), nullptr) ;  void* $v_bsl__ = $tmp_bsl_tmp; return (*((std::function<void*(void*)>*)($v_bsl_runIO)))($v_bsl_x); } (); } case $t_bsl_IOImpl::$e_bsl_Read: {void* $v_bsl_g = (($d_bsl_Read*)((($t_bsl_IOImpl*)($tmp_bsl_tmp))->ptr))->d0; return [=]() -> void* { void* $tmp_bsl_tmp =  [=]() -> void* { int x; if (std::scanf("%d", &x) == 1) return (*((std::function<void*(void*)>*)$v_bsl_Just))((void*) (std::intptr_t) x); else return $v_bsl_Nothing; }() ;  void* $v_bsl_x = $tmp_bsl_tmp; return (*((std::function<void*(void*)>*)($v_bsl_runIO)))((*((std::function<void*(void*)>*)($v_bsl_g)))($v_bsl_x)); } (); } } }(); } } }(); }); std::memcpy($v_bsl_runIO, $tmp_bsl_tmp, sizeof (std::function<void*(void*)>)); } return [=]() -> void* { void* $tmp_bsl_tmp = new std::function<void*(void*)>([=](void* $v_bsl_x) -> void* { return [=]() -> void* { void* $tmp_bsl_tmp = $v_bsl_x; switch ((($t_bsl_Bool*)($tmp_bsl_tmp))->T) { case $t_bsl_Bool::$e_bsl_True: { return $v_bsl_False; } case $t_bsl_Bool::$e_bsl_False: { return $v_bsl_True; } } }(); });  void* $v_bsl_bnot = $tmp_bsl_tmp; return [=]() -> void* { void* $tmp_bsl_tmp = new std::function<void*(void*)>([=](void* $v_bsl_x) -> void* { return [=]() -> void* { void* $tmp_bsl_tmp = $v_bsl_x; switch ((($t_bsl_Bool*)($tmp_bsl_tmp))->T) { case $t_bsl_Bool::$e_bsl_True: { return new std::function<void*(void*)>([=](void* $v_bsl_x) -> void* { return $v_bsl_x; }); } case $t_bsl_Bool::$e_bsl_False: { return new std::function<void*(void*)>([=](void* $v_bsl_x) -> void* { return $v_bsl_False; }); } } }(); });  void* $v_bsl_band = $tmp_bsl_tmp; return [=]() -> void* { void* $tmp_bsl_tmp = new std::function<void*(void*)>([=](void* $v_bsl_a) -> void* { return new std::function<void*(void*)>([=](void* $v_bsl_b) -> void* { return  (void*) (((std::intptr_t) $v_bsl_a) + ((std::intptr_t) $v_bsl_b)) ; }); });  void* $v_bsl_add = $tmp_bsl_tmp; return [=]() -> void* { void* $tmp_bsl_tmp = new std::function<void*(void*)>([=](void* $v_bsl_a) -> void* { return  (void*) -((std::intptr_t) $v_bsl_a) ; });  void* $v_bsl_neg = $tmp_bsl_tmp; return [=]() -> void* { void* $tmp_bsl_tmp = new std::function<void*(void*)>([=](void* $v_bsl_a) -> void* { return new std::function<void*(void*)>([=](void* $v_bsl_b) -> void* { return  (void*) (((std::intptr_t) $v_bsl_a) - ((std::intptr_t) $v_bsl_b)) ; }); });  void* $v_bsl_sub = $tmp_bsl_tmp; return [=]() -> void* { void* $tmp_bsl_tmp = new std::function<void*(void*)>([=](void* $v_bsl_a) -> void* { return new std::function<void*(void*)>([=](void* $v_bsl_b) -> void* { return  (void*) (((std::intptr_t) $v_bsl_a) * ((std::intptr_t) $v_bsl_b)) ; }); });  void* $v_bsl_mul = $tmp_bsl_tmp; return [=]() -> void* { void* $tmp_bsl_tmp = new std::function<void*(void*)>([=](void* $v_bsl_a) -> void* { return new std::function<void*(void*)>([=](void* $v_bsl_b) -> void* { return  (void*) (((std::intptr_t) $v_bsl_a) / ((std::intptr_t) $v_bsl_b)) ; }); });  void* $v_bsl_div = $tmp_bsl_tmp; return [=]() -> void* { void* $tmp_bsl_tmp = new std::function<void*(void*)>([=](void* $v_bsl_a) -> void* { return new std::function<void*(void*)>([=](void* $v_bsl_b) -> void* { return  (void*) (((std::intptr_t) $v_bsl_a) % ((std::intptr_t) $v_bsl_b)) ; }); });  void* $v_bsl_mod = $tmp_bsl_tmp; return [=]() -> void* { void* $tmp_bsl_tmp = new std::function<void*(void*)>([=](void* $v_bsl_a) -> void* { return new std::function<void*(void*)>([=](void* $v_bsl_b) -> void* { return  (((std::intptr_t) $v_bsl_a) < ((std::intptr_t) $v_bsl_b))?$v_bsl_True:$v_bsl_False ; }); });  void* $v_bsl_less = $tmp_bsl_tmp; return [=]() -> void* { void* $tmp_bsl_tmp = new std::function<void*(void*)>([=](void* $v_bsl_a) -> void* { return  ((std::intptr_t) $v_bsl_a) == 0?$v_bsl_True:$v_bsl_False ; });  void* $v_bsl_eq0 = $tmp_bsl_tmp; return [=]() -> void* { void *$v_bsl_gcd = new std::function<void*(void*)>(); { void* $tmp_bsl_tmp = new std::function<void*(void*)>([=](void* $v_bsl_a) -> void* { return new std::function<void*(void*)>([=](void* $v_bsl_b) -> void* { return [=]() -> void* { void* $tmp_bsl_tmp = (*((std::function<void*(void*)>*)($v_bsl_eq0)))($v_bsl_a); switch ((($t_bsl_Bool*)($tmp_bsl_tmp))->T) { case $t_bsl_Bool::$e_bsl_True: { return $v_bsl_b; } case $t_bsl_Bool::$e_bsl_False: { return (*((std::function<void*(void*)>*)((*((std::function<void*(void*)>*)($v_bsl_gcd)))((*((std::function<void*(void*)>*)((*((std::function<void*(void*)>*)($v_bsl_mod)))($v_bsl_b))))($v_bsl_a)))))($v_bsl_a); } } }(); }); }); std::memcpy($v_bsl_gcd, $tmp_bsl_tmp, sizeof (std::function<void*(void*)>)); } return [=]() -> void* { void* $tmp_bsl_tmp = new std::function<void*(void*)>([=](void* $v_bsl_x) -> void* { return new std::function<void*(void*)>([=](void* $v_bsl_y) -> void* { return [=]() -> void* { void* $tmp_bsl_tmp = (*((std::function<void*(void*)>*)((*((std::function<void*(void*)>*)($v_bsl_less)))($v_bsl_x))))($v_bsl_y); switch ((($t_bsl_Bool*)($tmp_bsl_tmp))->T) { case $t_bsl_Bool::$e_bsl_True: { return $v_bsl_y; } case $t_bsl_Bool::$e_bsl_False: { return $v_bsl_x; } } }(); }); });  void* $v_bsl_max = $tmp_bsl_tmp; return [=]() -> void* { void *$v_bsl_concat = new std::function<void*(void*)>(); { void* $tmp_bsl_tmp = new std::function<void*(void*)>([=](void* $v_bsl_a) -> void* { return new std::function<void*(void*)>([=](void* $v_bsl_b) -> void* { return [=]() -> void* { void* $tmp_bsl_tmp = $v_bsl_a; switch ((($t_bsl_List*)($tmp_bsl_tmp))->T) { case $t_bsl_List::$e_bsl_Nil: { return $v_bsl_b; } case $t_bsl_List::$e_bsl_Cons: {void* $v_bsl_x = (($d_bsl_Cons*)((($t_bsl_List*)($tmp_bsl_tmp))->ptr))->d0;void* $v_bsl_xs = (($d_bsl_Cons*)((($t_bsl_List*)($tmp_bsl_tmp))->ptr))->d1; return (*((std::function<void*(void*)>*)((*((std::function<void*(void*)>*)($v_bsl_Cons)))($v_bsl_x))))((*((std::function<void*(void*)>*)((*((std::function<void*(void*)>*)($v_bsl_concat)))($v_bsl_xs))))($v_bsl_b)); } } }(); }); }); std::memcpy($v_bsl_concat, $tmp_bsl_tmp, sizeof (std::function<void*(void*)>)); } return [=]() -> void* { void *$v_bsl_filter = new std::function<void*(void*)>(); { void* $tmp_bsl_tmp = new std::function<void*(void*)>([=](void* $v_bsl_list) -> void* { return new std::function<void*(void*)>([=](void* $v_bsl_f) -> void* { return [=]() -> void* { void* $tmp_bsl_tmp = $v_bsl_list; switch ((($t_bsl_List*)($tmp_bsl_tmp))->T) { case $t_bsl_List::$e_bsl_Nil: { return $v_bsl_Nil; } case $t_bsl_List::$e_bsl_Cons: {void* $v_bsl_x = (($d_bsl_Cons*)((($t_bsl_List*)($tmp_bsl_tmp))->ptr))->d0;void* $v_bsl_xs = (($d_bsl_Cons*)((($t_bsl_List*)($tmp_bsl_tmp))->ptr))->d1; return [=]() -> void* { void* $tmp_bsl_tmp = (*((std::function<void*(void*)>*)($v_bsl_f)))($v_bsl_x); switch ((($t_bsl_Bool*)($tmp_bsl_tmp))->T) { case $t_bsl_Bool::$e_bsl_True: { return (*((std::function<void*(void*)>*)((*((std::function<void*(void*)>*)($v_bsl_Cons)))($v_bsl_x))))((*((std::function<void*(void*)>*)((*((std::function<void*(void*)>*)($v_bsl_filter)))($v_bsl_xs))))($v_bsl_f)); } case $t_bsl_Bool::$e_bsl_False: { return (*((std::function<void*(void*)>*)((*((std::function<void*(void*)>*)($v_bsl_filter)))($v_bsl_xs))))($v_bsl_f); } } }(); } } }(); }); }); std::memcpy($v_bsl_filter, $tmp_bsl_tmp, sizeof (std::function<void*(void*)>)); } return [=]() -> void* { void* $tmp_bsl_tmp = new std::function<void*(void*)>([=](void* $v_bsl_less) -> void* { return [=]() -> void* { void *$v_bsl_sortLess = new std::function<void*(void*)>(); { void* $tmp_bsl_tmp = new std::function<void*(void*)>([=](void* $v_bsl_list) -> void* { return [=]() -> void* { void* $tmp_bsl_tmp = $v_bsl_list; switch ((($t_bsl_List*)($tmp_bsl_tmp))->T) { case $t_bsl_List::$e_bsl_Nil: { return $v_bsl_Nil; } case $t_bsl_List::$e_bsl_Cons: {void* $v_bsl_x = (($d_bsl_Cons*)((($t_bsl_List*)($tmp_bsl_tmp))->ptr))->d0;void* $v_bsl_xs = (($d_bsl_Cons*)((($t_bsl_List*)($tmp_bsl_tmp))->ptr))->d1; return (*((std::function<void*(void*)>*)((*((std::function<void*(void*)>*)($v_bsl_concat)))((*((std::function<void*(void*)>*)($v_bsl_sortLess)))((*((std::function<void*(void*)>*)((*((std::function<void*(void*)>*)($v_bsl_filter)))($v_bsl_xs))))(new std::function<void*(void*)>([=](void* $v_bsl_y) -> void* { return (*((std::function<void*(void*)>*)($v_bsl_bnot)))((*((std::function<void*(void*)>*)((*((std::function<void*(void*)>*)($v_bsl_less)))($v_bsl_x))))($v_bsl_y)); })))))))((*((std::function<void*(void*)>*)((*((std::function<void*(void*)>*)($v_bsl_Cons)))($v_bsl_x))))((*((std::function<void*(void*)>*)($v_bsl_sortLess)))((*((std::function<void*(void*)>*)((*((std::function<void*(void*)>*)($v_bsl_filter)))($v_bsl_xs))))((*((std::function<void*(void*)>*)($v_bsl_less)))($v_bsl_x))))); } } }(); }); std::memcpy($v_bsl_sortLess, $tmp_bsl_tmp, sizeof (std::function<void*(void*)>)); } return $v_bsl_sortLess; } (); });  void* $v_bsl_sort = $tmp_bsl_tmp; return [=]() -> void* { void *$v_bsl_getList = new $t_bsl_IO(); { void* $tmp_bsl_tmp = (*((std::function<void*(void*)>*)((*((std::function<void*(void*)>*)($v_bsl_bind)))($v_bsl_getInt))))(new std::function<void*(void*)>([=](void* $v_bsl_x) -> void* { return [=]() -> void* { void* $tmp_bsl_tmp = $v_bsl_x; switch ((($t_bsl_Maybe*)($tmp_bsl_tmp))->T) { case $t_bsl_Maybe::$e_bsl_Just: {void* $v_bsl_x = (($d_bsl_Just*)((($t_bsl_Maybe*)($tmp_bsl_tmp))->ptr))->d0; return (*((std::function<void*(void*)>*)((*((std::function<void*(void*)>*)($v_bsl_bind)))($v_bsl_getList))))(new std::function<void*(void*)>([=](void* $v_bsl_xs) -> void* { return (*((std::function<void*(void*)>*)($v_bsl_return)))((*((std::function<void*(void*)>*)((*((std::function<void*(void*)>*)($v_bsl_Cons)))($v_bsl_x))))($v_bsl_xs)); })); } case $t_bsl_Maybe::$e_bsl_Nothing: { return (*((std::function<void*(void*)>*)($v_bsl_return)))($v_bsl_Nil); } } }(); })); std::memcpy($v_bsl_getList, $tmp_bsl_tmp, sizeof ($t_bsl_IO)); } return [=]() -> void* { void *$v_bsl_putList = new std::function<void*(void*)>(); { void* $tmp_bsl_tmp = new std::function<void*(void*)>([=](void* $v_bsl_list) -> void* { return [=]() -> void* { void* $tmp_bsl_tmp = $v_bsl_list; switch ((($t_bsl_List*)($tmp_bsl_tmp))->T) { case $t_bsl_List::$e_bsl_Nil: { return (*((std::function<void*(void*)>*)($v_bsl_return)))($v_bsl_Unit); } case $t_bsl_List::$e_bsl_Cons: {void* $v_bsl_x = (($d_bsl_Cons*)((($t_bsl_List*)($tmp_bsl_tmp))->ptr))->d0;void* $v_bsl_xs = (($d_bsl_Cons*)((($t_bsl_List*)($tmp_bsl_tmp))->ptr))->d1; return (*((std::function<void*(void*)>*)((*((std::function<void*(void*)>*)($v_bsl_bind)))((*((std::function<void*(void*)>*)($v_bsl_putInt)))($v_bsl_x)))))(new std::function<void*(void*)>([=](void* $v_bsl__) -> void* { return (*((std::function<void*(void*)>*)($v_bsl_putList)))($v_bsl_xs); })); } } }(); }); std::memcpy($v_bsl_putList, $tmp_bsl_tmp, sizeof (std::function<void*(void*)>)); } return [=]() -> void* { void *$v_bsl_toList = new std::function<void*(void*)>(); { void* $tmp_bsl_tmp = new std::function<void*(void*)>([=](void* $v_bsl_x) -> void* { return [=]() -> void* { void* $tmp_bsl_tmp = $v_bsl_x; switch ((($t_bsl_List*)($tmp_bsl_tmp))->T) { case $t_bsl_List::$e_bsl_Nil: { return $v_bsl_Nil; } case $t_bsl_List::$e_bsl_Cons: {void* $v_bsl_h = (($d_bsl_Cons*)((($t_bsl_List*)($tmp_bsl_tmp))->ptr))->d0;void* $v_bsl_t = (($d_bsl_Cons*)((($t_bsl_List*)($tmp_bsl_tmp))->ptr))->d1; return [=]() -> void* { void* $tmp_bsl_tmp = $v_bsl_t; switch ((($t_bsl_List*)($tmp_bsl_tmp))->T) { case $t_bsl_List::$e_bsl_Cons: {void* $v_bsl_h_ = (($d_bsl_Cons*)((($t_bsl_List*)($tmp_bsl_tmp))->ptr))->d0;void* $v_bsl_t_ = (($d_bsl_Cons*)((($t_bsl_List*)($tmp_bsl_tmp))->ptr))->d1; return (*((std::function<void*(void*)>*)((*((std::function<void*(void*)>*)($v_bsl_Cons)))((*((std::function<void*(void*)>*)((*((std::function<void*(void*)>*)($v_bsl_Pair)))($v_bsl_h))))($v_bsl_h_)))))((*((std::function<void*(void*)>*)($v_bsl_toList)))($v_bsl_t_)); } } }(); } } }(); }); std::memcpy($v_bsl_toList, $tmp_bsl_tmp, sizeof (std::function<void*(void*)>)); } return [=]() -> void* { void* $tmp_bsl_tmp =  (void*)0 ;  void* $v_bsl_zero = $tmp_bsl_tmp; return [=]() -> void* { void* $tmp_bsl_tmp = new std::function<void*(void*)>([=](void* $v_bsl_lst) -> void* { return [=]() -> void* { void *$v_bsl_getAns_ = new std::function<void*(void*)>(); { void* $tmp_bsl_tmp = new std::function<void*(void*)>([=](void* $v_bsl_l) -> void* { return new std::function<void*(void*)>([=](void* $v_bsl_unfinishedTask) -> void* { return new std::function<void*(void*)>([=](void* $v_bsl_currentTime) -> void* { return new std::function<void*(void*)>([=](void* $v_bsl_maxTask) -> void* { return [=]() -> void* { void* $tmp_bsl_tmp = $v_bsl_l; switch ((($t_bsl_List*)($tmp_bsl_tmp))->T) { case $t_bsl_List::$e_bsl_Nil: { return (*((std::function<void*(void*)>*)((*((std::function<void*(void*)>*)($v_bsl_Pair)))((*((std::function<void*(void*)>*)((*((std::function<void*(void*)>*)($v_bsl_add)))($v_bsl_currentTime))))($v_bsl_unfinishedTask)))))($v_bsl_maxTask); } case $t_bsl_List::$e_bsl_Cons: {void* $v_bsl_h = (($d_bsl_Cons*)((($t_bsl_List*)($tmp_bsl_tmp))->ptr))->d0;void* $v_bsl_xs = (($d_bsl_Cons*)((($t_bsl_List*)($tmp_bsl_tmp))->ptr))->d1; return [=]() -> void* { void* $tmp_bsl_tmp = $v_bsl_h; switch ((($t_bsl_Pair*)($tmp_bsl_tmp))->T) { case $t_bsl_Pair::$e_bsl_Pair: {void* $v_bsl_t = (($d_bsl_Pair*)((($t_bsl_Pair*)($tmp_bsl_tmp))->ptr))->d0;void* $v_bsl_c = (($d_bsl_Pair*)((($t_bsl_Pair*)($tmp_bsl_tmp))->ptr))->d1; return [=]() -> void* { void* $tmp_bsl_tmp = (*((std::function<void*(void*)>*)($v_bsl_eq0)))((*((std::function<void*(void*)>*)((*((std::function<void*(void*)>*)($v_bsl_sub)))($v_bsl_t))))($v_bsl_currentTime)); switch ((($t_bsl_Bool*)($tmp_bsl_tmp))->T) { case $t_bsl_Bool::$e_bsl_True: { return (*((std::function<void*(void*)>*)((*((std::function<void*(void*)>*)((*((std::function<void*(void*)>*)((*((std::function<void*(void*)>*)($v_bsl_getAns_)))($v_bsl_xs))))((*((std::function<void*(void*)>*)((*((std::function<void*(void*)>*)($v_bsl_add)))($v_bsl_unfinishedTask))))($v_bsl_c)))))($v_bsl_currentTime))))((*((std::function<void*(void*)>*)((*((std::function<void*(void*)>*)($v_bsl_max)))($v_bsl_maxTask))))((*((std::function<void*(void*)>*)((*((std::function<void*(void*)>*)($v_bsl_add)))($v_bsl_unfinishedTask))))($v_bsl_c))); } case $t_bsl_Bool::$e_bsl_False: { return (*((std::function<void*(void*)>*)((*((std::function<void*(void*)>*)((*((std::function<void*(void*)>*)((*((std::function<void*(void*)>*)($v_bsl_getAns_)))((*((std::function<void*(void*)>*)((*((std::function<void*(void*)>*)($v_bsl_Cons)))((*((std::function<void*(void*)>*)((*((std::function<void*(void*)>*)($v_bsl_Pair)))($v_bsl_t))))($v_bsl_c)))))($v_bsl_xs)))))((*((std::function<void*(void*)>*)((*((std::function<void*(void*)>*)($v_bsl_max)))((*((std::function<void*(void*)>*)((*((std::function<void*(void*)>*)($v_bsl_add)))((*((std::function<void*(void*)>*)((*((std::function<void*(void*)>*)($v_bsl_sub)))($v_bsl_unfinishedTask))))($v_bsl_t)))))($v_bsl_currentTime)))))($v_bsl_zero)))))($v_bsl_t))))($v_bsl_maxTask); } } }(); } } }(); } } }(); }); }); }); }); std::memcpy($v_bsl_getAns_, $tmp_bsl_tmp, sizeof (std::function<void*(void*)>)); } return (*((std::function<void*(void*)>*)((*((std::function<void*(void*)>*)((*((std::function<void*(void*)>*)((*((std::function<void*(void*)>*)($v_bsl_getAns_)))($v_bsl_lst))))($v_bsl_zero))))($v_bsl_zero))))($v_bsl_zero); } (); });  void* $v_bsl_getAns = $tmp_bsl_tmp; return [=]() -> void* { void* $tmp_bsl_tmp = new std::function<void*(void*)>([=](void* $v_bsl_x) -> void* { return [=]() -> void* { void* $tmp_bsl_tmp = $v_bsl_x; switch ((($t_bsl_Pair*)($tmp_bsl_tmp))->T) { case $t_bsl_Pair::$e_bsl_Pair: {void* $v_bsl_f = (($d_bsl_Pair*)((($t_bsl_Pair*)($tmp_bsl_tmp))->ptr))->d0;void* $v_bsl__ = (($d_bsl_Pair*)((($t_bsl_Pair*)($tmp_bsl_tmp))->ptr))->d1; return $v_bsl_f; } } }(); });  void* $v_bsl_fst = $tmp_bsl_tmp; return [=]() -> void* { void* $tmp_bsl_tmp = new std::function<void*(void*)>([=](void* $v_bsl_x) -> void* { return [=]() -> void* { void* $tmp_bsl_tmp = $v_bsl_x; switch ((($t_bsl_Pair*)($tmp_bsl_tmp))->T) { case $t_bsl_Pair::$e_bsl_Pair: {void* $v_bsl__ = (($d_bsl_Pair*)((($t_bsl_Pair*)($tmp_bsl_tmp))->ptr))->d0;void* $v_bsl_s = (($d_bsl_Pair*)((($t_bsl_Pair*)($tmp_bsl_tmp))->ptr))->d1; return $v_bsl_s; } } }(); });  void* $v_bsl_snd = $tmp_bsl_tmp; return [=]() -> void* { void* $tmp_bsl_tmp = new std::function<void*(void*)>([=](void* $v_bsl_x) -> void* { return [=]() -> void* { void* $tmp_bsl_tmp = $v_bsl_x; switch ((($t_bsl_List*)($tmp_bsl_tmp))->T) { case $t_bsl_List::$e_bsl_Cons: {void* $v_bsl__ = (($d_bsl_Cons*)((($t_bsl_List*)($tmp_bsl_tmp))->ptr))->d0;void* $v_bsl_t = (($d_bsl_Cons*)((($t_bsl_List*)($tmp_bsl_tmp))->ptr))->d1; return $v_bsl_t; } } }(); });  void* $v_bsl_tail = $tmp_bsl_tmp; return [=]() -> void* { void* $tmp_bsl_tmp = (*((std::function<void*(void*)>*)((*((std::function<void*(void*)>*)($v_bsl_bind)))($v_bsl_getList))))(new std::function<void*(void*)>([=](void* $v_bsl_numbers) -> void* { return [=]() -> void* { void* $tmp_bsl_tmp = (*((std::function<void*(void*)>*)($v_bsl_getAns)))((*((std::function<void*(void*)>*)($v_bsl_toList)))((*((std::function<void*(void*)>*)($v_bsl_tail)))($v_bsl_numbers)));  void* $v_bsl_ans = $tmp_bsl_tmp; return (*((std::function<void*(void*)>*)((*((std::function<void*(void*)>*)($v_bsl_bind)))((*((std::function<void*(void*)>*)($v_bsl_putInt)))((*((std::function<void*(void*)>*)($v_bsl_fst)))($v_bsl_ans))))))(new std::function<void*(void*)>([=](void* $v_bsl__) -> void* { return (*((std::function<void*(void*)>*)($v_bsl_putInt)))((*((std::function<void*(void*)>*)($v_bsl_snd)))($v_bsl_ans)); })); } (); }));  void* $v_bsl_main = $tmp_bsl_tmp; return (*((std::function<void*(void*)>*)($v_bsl_runIO)))($v_bsl_main); } (); } (); } (); } (); } (); } (); } (); } (); } (); } (); } (); } (); } (); } (); } (); } (); } (); } (); } (); } (); } (); } (); } (); } (); } (); } (); } (); } (); } (); } (); } (); } (); } (); } (); } (); } (); } (); } (); } (); } (); } (); } (); }