# cost = 18
# n_nodes = 18303448
# version = 1.0
# time = ???

# n=12, i=4, cost=18: no comparisons done
find_1(a,b,c,d,e,f,g,h,i,j,k,l) =
  if a > b
  then find_2(a,b,c,d,e,f,g,h,i,j,k,l)
  else find_2(b,a,c,d,e,f,g,h,i,j,k,l)
# n=12, i=4, cost=17: a>b
find_2(a,b,c,d,e,f,g,h,i,j,k,l) =
  if c > d
  then find_3(a,c,b,d,e,f,g,h,i,j,k,l)
  else find_3(a,d,b,c,e,f,g,h,i,j,k,l)
# n=12, i=4, cost=16: a>c,b>d
find_3(a,b,c,d,e,f,g,h,i,j,k,l) =
  if a > b
  then find_4(a,b,d,c,e,f,g,h,i,j,k,l)
  else find_4(b,a,c,d,e,f,g,h,i,j,k,l)
# n=12, i=4, cost=15: a>b,a>c,a>d,b>c
find_4(a,b,c,d,e,f,g,h,i,j,k,l) =
  if e > f
  then find_5(a,b,e,c,d,f,g,h,i,j,k,l)
  else find_5(a,b,f,c,d,e,g,h,i,j,k,l)
# n=12, i=4, cost=14: a>b,a>d,a>e,b>d,c>f
find_5(a,b,c,d,e,f,g,h,i,j,k,l) =
  if g > h
  then find_6(a,b,c,g,d,e,f,h,i,j,k,l)
  else find_6(a,b,c,h,d,e,f,g,i,j,k,l)
# n=12, i=4, cost=13: a>b,a>e,a>f,b>e,c>g,d>h
find_6(a,b,c,d,e,f,g,h,i,j,k,l) =
  if c > d
  then find_7(a,c,b,d,e,h,f,g,i,j,k,l)
  else find_7(a,d,b,c,e,g,f,h,i,j,k,l)
# n=12, i=4, cost=12: a>c,a>e,a>g,b>d,b>f,b>h,c>e,d>f
find_7(a,b,c,d,e,f,g,h,i,j,k,l) =
  if a > b
  then find_8(a,b,d,c,f,h,e,g,i,j,k,l)
  else find_8(b,a,c,d,e,g,f,h,i,j,k,l)
# n=12, i=4, cost=11: a>b,a>c,a>d,a>e,a>f,a>g,a>h,b>c,b>e,b>f,c>e,d>g
find_8(a,b,c,d,e,f,g,h,i,j,k,l) =
  if h > i
  then find_9(a,b,c,d,h,e,f,g,i,j,k,l)
  else find_10(a,b,c,d,i,e,f,g,h,j,k,l)
# n=12, i=4, cost=10: a>b,a>c,a>d,a>f,a>g,a>h,a>i,b>c,b>f,b>g,c>f,d>h,e>i
find_10(a,b,c,d,e,f,g,h,i,j,k,l) =
  if j > k
  then find_11(a,b,c,d,e,j,f,g,h,i,k,l)
  else find_11(a,b,c,d,e,k,f,g,h,i,j,l)
# n=12, i=4, cost=9: a>b,a>c,a>d,a>g,a>h,a>i,a>j,b>c,b>g,b>h,c>g,d>i,e>j,f>k
find_11(a,b,c,d,e,f,g,h,i,j,k,l) =
  if e > f
  then find_12(a,b,e,c,d,f,g,h,j,i,k,l)
  else find_13(a,b,f,c,d,e,g,j,h,i,k,l)
# n=12, i=4, cost=8: a>b,a>d,a>e,a>g,a>h,a>i,a>j,b>d,b>g,b>i,c>f,c>h,c>k,d>g,e>j,f>h
find_13(a,b,c,d,e,f,g,h,i,j,k,l) =
  if b > c
  then find_14(b,c,f,d,e,k,g,i,j,l)
  else find_15(a,c,b,d,f,e,i,h,j,k,l)
# n=11, i=4, cost=7: a>c,a>d,a>f,a>g,a>h,a>i,b>c,b>d,b>e,b>g,b>h,b>j,c>d,c>g,e>h,f>i
find_15(a,b,c,d,e,f,g,h,i,j,k) =
  if e > f
  then find_16(a,e,c,f,h,g,d,j,k)
  else find_17(a,b,f,c,e,d,g,i,j,k)
# n=10, i=4, cost=6: a>c,a>d,a>e,a>f,a>g,a>h,b>d,b>e,b>f,b>g,b>i,c>e,c>h,d>f,d>g
find_17(a,b,c,d,e,f,g,h,i,j) =
  if i > j
  then find_18(a,b,d,c,i,g,f,e,h,j)
  else find_19(a,b,d,c,j,g,f,e,h,i)
# n=10, i=4, cost=5: a>c,a>d,a>f,a>g,a>h,a>i,b>c,b>f,b>g,b>h,b>j,c>f,c>g,d>h,d>i,e>j
find_19(a,b,c,d,e,f,g,h,i,j) =
  if c > e
  then find_20(b,c,d,e,f,g,h,i)
  else find_21(a,b,e,c,d,h,j,i)
# n=8, i=4, cost=4: a>d,a>e,a>f,a>h,b>d,b>f,b>g,c>d,c>g,e>f,e>h
find_21(a,b,c,d,e,f,g,h) =
  if c > e
  then find_22(a,b,e,d,h,g)
  else find_23(b,c,f,h)
# n=4, i=2, cost=3: a>c
find_23(a,b,c,d) =
  if b > d
  then find_24(a,b,c,d)
  else find_24(a,d,c,b)
# n=4, i=2, cost=2: a>c,b>d
find_24(a,b,c,d) =
  if a > b
  then find_25(b,c)
  else find_25(a,d)
# n=2, i=1, cost=1: no comparisons done
find_25(a,b) =
  if a > b
  then a
  else b
# n=6, i=3, cost=3: a>c,a>d,a>e,b>d,b>f,c>e
find_22(a,b,c,d,e,f) =
  if c > f
  then find_24(c,b,e,d)
  else find_26(a,f,d)
# n=3, i=2, cost=2: a>c
find_26(a,b,c) =
  if a > b
  then find_25(b,c)
  else a
# n=8, i=3, cost=4: a>b,a>d,a>e,a>f,a>g,b>d,b>e,b>f,c>g,c>h
find_20(a,b,c,d,e,f,g,h) =
  if b > c
  then find_27(c,d,e,f)
  else find_28(a,b,g,h)
# n=4, i=2, cost=3: a>b,a>c
find_28(a,b,c,d) =
  if a > d
  then find_29(b,c,d)
  else a
# n=3, i=1, cost=2: no comparisons done
find_29(a,b,c) =
  if a > b
  then find_25(a,c)
  else find_25(b,c)
# n=4, i=1, cost=3: no comparisons done
find_27(a,b,c,d) =
  if a > b
  then find_29(a,c,d)
  else find_29(b,c,d)
# n=10, i=4, cost=5: a>c,a>d,a>f,a>g,a>h,a>i,b>c,b>e,b>f,b>g,b>h,b>j,c>f,c>g,d>h,d>i,e>j
find_18(a,b,c,d,e,f,g,h,i,j) =
  if c > d
  then find_30(a,c,d,e,f,g,j)
  else find_31(a,b,d,c,e,h,i,j)
# n=8, i=4, cost=4: a>c,a>d,a>f,a>g,b>d,b>e,b>f,b>h,c>d,c>f,c>g,e>h
find_31(a,b,c,d,e,f,g,h) =
  if e > g
  then find_32(a,c,e,d,f,h)
  else find_33(b,g,f,d)
# n=4, i=2, cost=3: a>c,a>d
find_33(a,b,c,d) =
  if a > b
  then find_29(b,c,d)
  else a
# n=6, i=3, cost=3: a>b,a>d,a>e,b>d,b>e,c>f
find_32(a,b,c,d,e,f) =
  if b > c
  then find_29(c,d,e)
  else find_34(a,b,f)
# n=3, i=2, cost=2: a>b
find_34(a,b,c) =
  if a > c
  then find_25(b,c)
  else a
# n=7, i=3, cost=4: a>b,a>c,a>e,a>f,b>c,b>e,b>f,d>g
find_30(a,b,c,d,e,f,g) =
  if b > d
  then find_27(d,c,e,f)
  else find_34(a,b,g)
# n=9, i=3, cost=6: a>c,a>d,a>e,a>f,a>g,b>d,b>e,c>f,c>g
find_16(a,b,c,d,e,f,g,h,i) =
  if h > i
  then find_35(a,c,b,h,g,f,e,d,i)
  else find_35(a,c,b,i,g,f,e,d,h)
# n=9, i=3, cost=5: a>b,a>e,a>f,a>g,a>h,b>e,b>f,c>g,c>h,d>i
find_35(a,b,c,d,e,f,g,h,i) =
  if b > d
  then find_36(b,c,d,e,f,g,h)
  else find_37(a,d,b,c,g,h,i)
# n=7, i=3, cost=4: a>c,a>e,a>f,b>c,b>g,d>e,d>f
find_37(a,b,c,d,e,f,g) =
  if a > b
  then find_38(b,d,c,g,f,e)
  else find_23(a,d,c,g)
# n=6, i=2, cost=3: a>c,a>d,b>e,b>f
find_38(a,b,c,d,e,f) =
  if a > b
  then find_29(b,c,d)
  else find_29(a,e,f)
# n=7, i=2, cost=4: a>c,a>d,a>e,b>f,b>g
find_36(a,b,c,d,e,f,g) =
  if a > b
  then find_27(b,c,d,e)
  else find_29(a,f,g)
# n=10, i=3, cost=7: a>b,a>c,a>d,a>f,a>g,a>h,b>c,b>f,d>g,e>i
find_14(a,b,c,d,e,f,g,h,i,j) =
  if b > d
  then find_39(a,b,d,e,c,f,h,i,j)
  else find_40(a,d,b,e,g,h,i,j)
# n=8, i=3, cost=6: a>b,a>c,a>e,a>f,b>c,b>e,d>g
find_40(a,b,c,d,e,f,g,h) =
  if a > d
  then find_41(b,d,c,e,g,f,h)
  else find_42(a,b,f,g,h)
# n=5, i=2, cost=4: a>b,a>c
find_42(a,b,c,d,e) =
  if b > c
  then find_43(a,b,d,e)
  else find_43(a,c,d,e)
# n=4, i=2, cost=3: a>b
find_43(a,b,c,d) =
  if c > d
  then find_24(a,c,b,d)
  else find_24(a,d,b,c)
# n=7, i=2, cost=5: a>c,a>d,b>e
find_41(a,b,c,d,e,f,g) =
  if f > g
  then find_44(a,b,f,d,c,e,g)
  else find_44(a,b,g,d,c,e,f)
# n=7, i=2, cost=4: a>d,a>e,b>f,c>g
find_44(a,b,c,d,e,f,g) =
  if b > c
  then find_38(b,a,c,f,e,d)
  else find_38(c,a,b,g,e,d)
# n=9, i=3, cost=6: a>b,a>c,a>e,a>f,a>g,b>c,b>e,b>f,d>h
find_39(a,b,c,d,e,f,g,h,i) =
  if g > i
  then find_45(a,b,g,d,e,f,c,i,h)
  else find_46(a,b,i,d,e,f,c,g,h)
# n=9, i=3, cost=5: a>b,a>e,a>f,a>g,a>h,b>e,b>f,b>g,c>h,d>i
find_46(a,b,c,d,e,f,g,h,i) =
  if c > d
  then find_47(a,b,c,d,e,f,g,h,i)
  else find_48(a,b,d,c,e,f,g,i)
# n=8, i=3, cost=4: a>b,a>e,a>f,a>g,b>e,b>f,b>g,c>d,c>h
find_48(a,b,c,d,e,f,g,h) =
  if b > c
  then find_27(c,e,f,g)
  else find_43(a,b,d,h)
# n=9, i=3, cost=4: a>b,a>e,a>f,a>g,a>h,b>e,b>f,b>g,c>d,c>h,c>i,d>i
find_47(a,b,c,d,e,f,g,h,i) =
  if b > c
  then find_27(c,e,f,g)
  else find_49(a,b,d,h,i)
# n=5, i=2, cost=3: a>b,a>d,c>e
find_49(a,b,c,d,e) =
  if a > c
  then find_29(c,b,d)
  else find_25(a,e)
# n=9, i=3, cost=5: a>b,a>c,a>e,a>f,a>g,a>h,b>e,b>f,b>g,c>h,d>i
find_45(a,b,c,d,e,f,g,h,i) =
  if c > d
  then find_50(c,b,d,h,f,g,e)
  else find_51(a,b,d,c,e,f,g,i)
# n=8, i=3, cost=4: a>b,a>d,a>e,a>f,a>g,b>e,b>f,b>g,c>d,c>h
find_51(a,b,c,d,e,f,g,h) =
  if b > c
  then find_27(c,e,f,g)
  else find_28(a,b,d,h)
# n=7, i=2, cost=4: a>c,a>d,b>e,b>f,b>g
find_50(a,b,c,d,e,f,g) =
  if a > b
  then find_29(b,c,d)
  else find_27(a,e,f,g)
# n=12, i=4, cost=8: a>b,a>d,a>e,a>g,a>h,a>i,a>j,b>d,b>g,b>h,c>f,c>i,c>k,d>g,e>j,f>k
find_12(a,b,c,d,e,f,g,h,i,j,k,l) =
  if b > c
  then find_14(b,c,f,d,e,i,g,h,j,l)
  else find_52(a,c,b,d,e,f,h,i,j,k,l)
# n=11, i=4, cost=7: a>c,a>d,a>e,a>g,a>h,a>i,b>c,b>d,b>f,b>g,b>h,b>j,c>d,c>g,e>i,f>j
find_52(a,b,c,d,e,f,g,h,i,j,k) =
  if c > e
  then find_39(a,c,e,f,d,g,h,j,k)
  else find_53(a,b,e,c,f,h,i,j,k)
# n=9, i=4, cost=6: a>c,a>d,a>f,a>g,b>d,b>e,b>f,b>h,c>d,c>g,e>h
find_53(a,b,c,d,e,f,g,h,i) =
  if e > i
  then find_54(b,a,e,c,d,f,h,i,g)
  else find_55(a,b,c,i,e,d,h,f,g)
# n=9, i=4, cost=5: a>c,a>f,a>h,a>i,b>e,b>f,b>g,b>h,c>f,c>i,d>e,d>g,e>g
find_55(a,b,c,d,e,f,g,h,i) =
  if c > d
  then find_56(c,b,d,f,i,h)
  else find_57(d,a,b,c,e,i,g,h)
# n=8, i=4, cost=4: a>d,a>e,a>f,a>g,b>d,b>f,b>h,c>e,c>g,c>h,d>f,e>g
find_57(a,b,c,d,e,f,g,h) =
  if a > b
  then find_58(b,c,d,e,h,f,g)
  else find_59(a,c,e,d,f,h)
# n=6, i=3, cost=3: a>c,a>d,a>e,b>c,b>f,d>e
find_59(a,b,c,d,e,f) =
  if d > f
  then find_24(d,b,e,c)
  else find_26(a,f,c)
# n=7, i=3, cost=3: a>c,a>e,a>f,b>d,b>e,b>g,c>f,d>g
find_58(a,b,c,d,e,f,g) =
  if c > d
  then find_24(c,b,f,e)
  else find_24(d,a,g,e)
# n=6, i=3, cost=4: a>c,a>d,a>e,b>d,b>f
find_56(a,b,c,d,e,f) =
  if c > e
  then find_22(a,b,c,d,e,f)
  else find_22(a,b,e,d,c,f)
# n=9, i=4, cost=5: a>c,a>e,a>f,a>g,a>h,b>d,b>e,b>f,b>i,c>g,c>h,d>e,d>i
find_54(a,b,c,d,e,f,g,h,i) =
  if c > d
  then find_60(c,b,d,g,h,f)
  else find_61(d,a,c,e,i,f)
# n=6, i=3, cost=4: a>c,a>d,a>e,b>c,b>d,b>f
find_61(a,b,c,d,e,f) =
  if c > d
  then find_62(a,b,c,e,f)
  else find_62(a,b,d,e,f)
# n=5, i=3, cost=3: a>c,a>d,b>c,b>e
find_62(a,b,c,d,e) =
  if c > d
  then find_34(a,c,e)
  else find_63(a,b,d,e)
# n=4, i=3, cost=2: a>c,b>d
find_63(a,b,c,d) =
  if c > d
  then find_64(c,b)
  else find_64(d,a)
# n=2, i=2, cost=1: no comparisons done
find_64(a,b) =
  if a > b
  then b
  else a
# n=6, i=3, cost=4: a>c,a>d,a>e,b>c,b>f
find_60(a,b,c,d,e,f) =
  if d > e
  then find_22(a,b,d,c,e,f)
  else find_22(a,b,e,c,d,f)
# n=12, i=4, cost=10: a>b,a>c,a>d,a>e,a>f,a>g,a>h,a>i,b>c,b>f,b>g,c>f,d>h,e>i
find_9(a,b,c,d,e,f,g,h,i,j,k,l) =
  if d > e
  then find_65(a,b,d,c,e,f,i,g,h,j,k,l)
  else find_65(a,b,e,c,d,f,h,g,i,j,k,l)
# n=12, i=4, cost=9: a>b,a>c,a>d,a>e,a>f,a>g,a>h,a>i,b>d,b>f,b>h,c>e,c>g,c>i,d>f,e>g
find_65(a,b,c,d,e,f,g,h,i,j,k,l) =
  if b > c
  then find_66(a,b,c,e,d,i,f,h,j,k,l)
  else find_66(a,c,b,d,e,h,g,i,j,k,l)
# n=11, i=4, cost=8: a>b,a>c,a>d,a>e,a>f,a>g,a>h,b>c,b>d,b>e,b>f,b>g,b>h,c>d,c>f,e>g
find_66(a,b,c,d,e,f,g,h,i,j,k) =
  if c > i
  then find_67(b,c,e,d,f,i,g,h,j,k)
  else find_68(a,b,i,c,e,g,h,j,k)
# n=9, i=4, cost=7: a>b,a>d,a>e,a>f,a>g,b>d,b>e,b>f,b>g,c>d,e>f
find_68(a,b,c,d,e,f,g,h,i) =
  if b > c
  then find_69(b,c,e,d,f,g,h,i)
  else find_70(a,c,b,e,d,g,h,i)
# n=8, i=4, cost=5: a>c,a>d,a>e,a>f,b>c,b>d,b>e,b>f,c>d,c>e,c>f
find_70(a,b,c,d,e,f,g,h) =
  if g > h
  then find_71(a,b,c,g,e,f,d,h)
  else find_71(a,b,c,h,e,f,d,g)
# n=8, i=4, cost=4: a>c,a>e,a>f,a>g,b>c,b>e,b>f,b>g,c>e,c>f,c>g,d>h
find_71(a,b,c,d,e,f,g,h) =
  if c > d
  then find_27(d,e,f,g)
  else find_72(a,b,c,h)
# n=4, i=3, cost=3: a>c,b>c
find_72(a,b,c,d) =
  if a > b
  then find_34(b,c,d)
  else find_34(a,c,d)
# n=8, i=3, cost=6: a>b,a>c,a>d,a>e,a>f,b>d,c>e
find_69(a,b,c,d,e,f,g,h) =
  if b > g
  then find_41(b,c,d,g,e,f,h)
  else find_73(a,g,b,c,e,f,h)
# n=7, i=3, cost=5: a>c,a>d,a>e,a>f,b>c,d>e
find_73(a,b,c,d,e,f,g) =
  if d > g
  then find_74(d,b,e,g,c,f)
  else find_75(a,g,d,b,c,f)
# n=6, i=3, cost=4: a>c,a>e,a>f,b>c,d>e
find_75(a,b,c,d,e,f) =
  if b > d
  then find_76(b,a,d,c,f)
  else find_76(d,a,b,e,f)
# n=5, i=3, cost=3: a>c,a>d,b>d,b>e
find_76(a,b,c,d,e) =
  if c > d
  then find_63(a,b,c,e)
  else find_34(a,d,e)
# n=6, i=2, cost=4: a>c,a>d,b>e
find_74(a,b,c,d,e,f) =
  if b > f
  then find_38(a,b,c,d,e,f)
  else find_77(f,a,b,d,c)
# n=5, i=2, cost=3: a>c,b>d,b>e
find_77(a,b,c,d,e) =
  if a > b
  then find_25(b,c)
  else find_29(a,d,e)
# n=10, i=3, cost=7: a>b,a>c,a>d,a>e,a>f,a>g,a>h,b>d,b>e,b>f,c>g
find_67(a,b,c,d,e,f,g,h,i,j) =
  if c > h
  then find_78(a,b,c,d,e,f,g,h,i,j)
  else find_79(a,b,h,c,e,f,d,i,j)
# n=9, i=3, cost=6: a>b,a>c,a>d,a>e,a>f,a>g,b>e,b>f,b>g,c>d
find_79(a,b,c,d,e,f,g,h,i) =
  if c > h
  then find_80(b,c,e,f,g,d,h,i)
  else find_81(a,b,h,c,f,g,e,i)
# n=8, i=3, cost=5: a>b,a>d,a>e,a>f,a>g,b>e,b>f,b>g,c>d
find_81(a,b,c,d,e,f,g,h) =
  if c > h
  then find_20(a,b,c,e,f,g,d,h)
  else find_82(a,b,h,c,f,g,e)
# n=7, i=3, cost=4: a>b,a>e,a>f,a>g,b>e,b>f,b>g,c>d
find_82(a,b,c,d,e,f,g) =
  if b > c
  then find_27(c,e,f,g)
  else find_34(a,b,d)
# n=8, i=2, cost=5: a>c,a>d,a>e,b>f,b>g
find_80(a,b,c,d,e,f,g,h) =
  if b > h
  then find_83(a,b,c,d,e,f,g,h)
  else find_84(h,a,b,d,e,c)
# n=6, i=2, cost=4: a>c,b>d,b>e,b>f
find_84(a,b,c,d,e,f) =
  if a > b
  then find_25(b,c)
  else find_27(a,d,e,f)
# n=8, i=2, cost=4: a>c,a>d,a>e,b>f,b>g,b>h
find_83(a,b,c,d,e,f,g,h) =
  if a > b
  then find_27(b,c,d,e)
  else find_27(a,f,g,h)
# n=10, i=3, cost=6: a>b,a>c,a>d,a>e,a>f,a>g,a>h,b>d,b>e,b>f,c>g,c>h
find_78(a,b,c,d,e,f,g,h,i,j) =
  if i > j
  then find_85(a,b,c,i,e,f,d,h,g,j)
  else find_85(a,b,c,j,e,f,d,h,g,i)
# n=10, i=3, cost=5: a>b,a>c,a>e,a>f,a>g,a>h,a>i,b>e,b>f,b>g,c>h,c>i,d>j
find_85(a,b,c,d,e,f,g,h,i,j) =
  if c > d
  then find_83(c,b,d,h,i,g,e,f)
  else find_86(a,d,b,c,e,f,g,j)
# n=8, i=3, cost=4: a>c,a>d,a>e,a>f,a>g,b>d,b>h,c>e,c>f,c>g
find_86(a,b,c,d,e,f,g,h) =
  if b > c
  then find_28(a,c,d,h)
  else find_27(b,e,f,g)
