

After edit 926, Remove(Left), expected Max to be [994], but found [995].
thread 'ensure_consistency_randomly_1k_x_20' panicked at '[Insert(Left, 297), Insert(Right, 499), Insert(Right, 766), Goto(Right), Remove(Left), Goto(Right), Insert(Right, 255), Insert(Right, 335), Insert(Right, 549), Insert(Left, 905), Insert(Right, 473), Insert(Right, 960), Insert(Right, 493), Insert(Left, 293), Insert(Right, 343), Insert(Left, 372), Goto(Right), Insert(Left, 325), Goto(Left), Insert(Left, 112), Insert(Right, 692), Insert(Left, 448), Goto(Right), Insert(Left, 885), Insert(Left, 695), Insert(Right, 183), Goto(Right), Insert(Left, 487), Insert(Right, 96), Insert(Right, 285), Replace(Left, 474), Insert(Right, 469), Insert(Left, 883), Insert(Left, 405), Insert(Left, 600), Insert(Right, 643), Goto(Right), Insert(Left, 741), Remove(Right), Insert(Right, 36), Goto(Right), Goto(Right), Insert(Left, 66), Goto(Right), Insert(Left, 193), Insert(Left, 489), Insert(Right, 864), Goto(Right), Goto(Right), Goto(Left), Insert(Right, 990), Insert(Right, 959), Insert(Left, 814), Insert(Left, 895), Insert(Right, 883), Insert(Left, 23), Goto(Right), Insert(Left, 926), Replace(Right, 408), Insert(Left, 888), Insert(Left, 617), Goto(Right), Insert(Left, 944), Goto(Right), Goto(Right), Goto(Right), Remove(Left), Insert(Right, 73), Insert(Right, 192), Replace(Left, 208), Goto(Right), Insert(Left, 215), Insert(Right, 756), Insert(Left, 52), Insert(Right, 948), Goto(Right), Goto(Left), Insert(Left, 174), Goto(Right), Goto(Right), Insert(Left, 441), Insert(Right, 973), Remove(Right), Insert(Right, 231), Remove(Left), Insert(Left, 758), Insert(Left, 940), Insert(Left, 748), Insert(Right, 829), Goto(Right), Goto(Left), Goto(Right), Insert(Left, 907), Goto(Right), Insert(Right, 877), Insert(Right, 572), Replace(Left, 380), Goto(Left), Goto(Right), Insert(Right, 673), Goto(Right), Goto(Right), Goto(Right), Insert(Right, 85), Remove(Left), Goto(Right), Goto(Right), Insert(Right, 469), Insert(Right, 113), Insert(Left, 466), Insert(Right, 952), Insert(Right, 274), Insert(Right, 68), Replace(Left, 114), Insert(Left, 508), Goto(Right), Goto(Right), Insert(Right, 716), Insert(Left, 915), Remove(Right), Goto(Right), Goto(Right), Insert(Right, 780), Replace(Right, 209), Goto(Left), Insert(Right, 423), Goto(Right), Replace(Left, 77), Insert(Left, 421), Goto(Left), Insert(Right, 378), Insert(Left, 990), Remove(Left), Goto(Left), Insert(Right, 186), Insert(Right, 51), Insert(Left, 645), Insert(Left, 34), Goto(Right), Replace(Right, 774), Goto(Right), Insert(Left, 808), Insert(Left, 664), Insert(Left, 421), Insert(Right, 98), Insert(Left, 992), Insert(Left, 583), Remove(Left), Goto(Right), Insert(Right, 926), Insert(Left, 942), Insert(Right, 425), Goto(Right), Goto(Right), Insert(Left, 625), Goto(Right), Goto(Right), Insert(Left, 386), Replace(Left, 307), Insert(Right, 98), Insert(Left, 169), Insert(Left, 147), Goto(Left), Insert(Right, 993), Insert(Left, 16), Goto(Left), Insert(Left, 207), Insert(Left, 939), Insert(Left, 938), Insert(Left, 56), Replace(Right, 108), Insert(Right, 208), Insert(Left, 97), Goto(Right), Insert(Left, 526), Insert(Right, 221), Goto(Right), Replace(Left, 27), Insert(Left, 619), Replace(Right, 839), Remove(Right), Goto(Right), Replace(Right, 409), Goto(Right), Insert(Left, 979), Insert(Right, 552), Insert(Left, 360), Insert(Left, 893), Insert(Left, 15), Insert(Left, 769), Goto(Right), Insert(Left, 769), Insert(Left, 840), Remove(Left), Goto(Right), Remove(Right), Goto(Right), Remove(Left), Insert(Right, 564), Replace(Left, 832), Insert(Right, 721), Insert(Left, 21), Insert(Right, 191), Replace(Right, 837), Remove(Left), Insert(Right, 563), Goto(Right), Insert(Right, 281), Goto(Right), Insert(Left, 344), Replace(Left, 30), Insert(Left, 950), Insert(Right, 605), Insert(Left, 624), Insert(Left, 29), Insert(Left, 950), Insert(Left, 840), Insert(Left, 298), Replace(Left, 210), Insert(Left, 564), Insert(Right, 268), Insert(Left, 706), Insert(Left, 905), Insert(Left, 635), Goto(Right), Insert(Left, 819), Insert(Right, 429), Insert(Right, 101), Insert(Right, 716), Goto(Right), Remove(Left), Insert(Right, 631), Goto(Right), Goto(Right), Insert(Right, 743), Replace(Right, 840), Insert(Left, 368), Replace(Right, 529), Replace(Left, 888), Replace(Right, 217), Insert(Right, 689), Insert(Right, 777), Insert(Left, 936), Remove(Right), Insert(Left, 378), Insert(Left, 961), Goto(Right), Goto(Right), Insert(Left, 396), Insert(Right, 93), Insert(Right, 879), Insert(Right, 192), Insert(Right, 431), Insert(Right, 959), Insert(Right, 446), Goto(Right), Insert(Left, 345), Insert(Left, 767), Goto(Right), Insert(Right, 296), Goto(Right), Insert(Right, 668), Insert(Left, 471), Insert(Right, 510), Goto(Right), Goto(Right), Insert(Right, 699), Goto(Right), Insert(Left, 167), Insert(Left, 976), Goto(Right), Goto(Left), Insert(Left, 230), Insert(Left, 285), Goto(Left), Goto(Right), Remove(Right), Insert(Left, 287), Goto(Right), Insert(Left, 38), Insert(Left, 394), Replace(Right, 486), Goto(Right), Replace(Left, 180), Insert(Right, 619), Goto(Right), Remove(Right), Insert(Left, 573), Insert(Left, 749), Goto(Right), Insert(Left, 499), Goto(Right), Replace(Left, 828), Remove(Left), Insert(Left, 108), Insert(Left, 783), Remove(Right), Goto(Right), Remove(Left), Insert(Right, 526), Goto(Right), Insert(Left, 712), Insert(Right, 705), Goto(Right), Insert(Right, 65), Insert(Left, 742), Goto(Right), Insert(Right, 368), Goto(Left), Remove(Left), Replace(Right, 769), Goto(Right), Insert(Right, 543), Replace(Left, 994), Insert(Left, 890), Insert(Right, 896), Insert(Right, 570), Goto(Right), Goto(Right), Replace(Left, 174), Replace(Left, 61), Goto(Right), Insert(Right, 714), Replace(Left, 32), Goto(Left), Replace(Right, 635), Insert(Right, 289), Insert(Right, 237), Insert(Right, 714), Insert(Left, 725), Goto(Left), Goto(Right), Goto(Left), Remove(Right), Insert(Left, 995), Remove(Left), Insert(Left, 686), Insert(Right, 844), Goto(Left), Goto(Right), Goto(Right), Goto(Right), Insert(Left, 434), Goto(Right), Remove(Left), Insert(Left, 764), Insert(Left, 975), Goto(Right), Insert(Right, 605), Remove(Right), Goto(Right), Insert(Right, 928), Replace(Right, 800), Replace(Left, 172), Insert(Right, 884), Insert(Right, 648), Insert(Left, 784), Insert(Right, 632), Insert(Right, 577), Goto(Right), Insert(Right, 567), Goto(Left), Insert(Left, 812), Insert(Right, 315), Insert(Left, 665), Insert(Right, 1), Replace(Right, 943), Remove(Right), Insert(Right, 986), Insert(Right, 707), Insert(Right, 520), Goto(Right), Goto(Right), Replace(Left, 163), Insert(Right, 229), Insert(Left, 578), Insert(Left, 582), Insert(Right, 223), Replace(Right, 553), Insert(Right, 919), Insert(Left, 720), Goto(Right), Replace(Left, 311), Goto(Right), Insert(Left, 247), Insert(Right, 57), Insert(Right, 905), Insert(Left, 456), Insert(Right, 37), Goto(Right), Replace(Right, 760), Goto(Right), Insert(Right, 711), Insert(Left, 499), Insert(Right, 142), Insert(Right, 68), Goto(Right), Insert(Right, 42), Insert(Left, 48), Insert(Left, 27), Goto(Right), Replace(Right, 773), Insert(Left, 624), Insert(Right, 425), Goto(Right), Goto(Left), Replace(Left, 467), Insert(Right, 665), Goto(Right), Insert(Right, 394), Insert(Left, 65), Replace(Left, 645), Replace(Right, 683), Insert(Right, 677), Insert(Left, 175), Insert(Right, 136), Insert(Right, 838), Insert(Left, 597), Insert(Left, 632), Insert(Left, 691), Goto(Right), Insert(Left, 357), Insert(Left, 77), Insert(Left, 116), Goto(Right), Insert(Left, 219), Goto(Left), Insert(Left, 671), Goto(Right), Insert(Left, 285), Insert(Left, 905), Insert(Left, 741), Insert(Left, 70), Insert(Right, 874), Replace(Right, 873), Insert(Right, 91), Goto(Left), Insert(Right, 125), Replace(Right, 564), Insert(Left, 505), Insert(Right, 300), Remove(Left), Insert(Left, 829), Goto(Right), Goto(Right), Replace(Left, 563), Goto(Right), Remove(Right), Goto(Right), Goto(Right), Insert(Left, 485), Remove(Right), Goto(Right), Goto(Right), Insert(Right, 784), Goto(Right), Remove(Left), Insert(Left, 580), Insert(Left, 655), Goto(Right), Insert(Right, 918), Insert(Left, 427), Remove(Left), Insert(Right, 442), Insert(Left, 308), Insert(Right, 313), Goto(Right), Goto(Right), Goto(Right), Goto(Right), Insert(Left, 101), Insert(Left, 890), Goto(Right), Insert(Left, 585), Goto(Left), Goto(Right), Insert(Right, 984), Remove(Left), Replace(Left, 17), Insert(Right, 401), Remove(Left), Insert(Right, 90), Insert(Left, 921), Insert(Right, 91), Insert(Right, 601), Insert(Left, 570), Insert(Right, 870), Insert(Left, 168), Insert(Right, 162), Insert(Right, 537), Remove(Left), Insert(Left, 338), Replace(Left, 880), Goto(Right), Insert(Right, 632), Replace(Left, 899), Insert(Right, 186), Goto(Left), Goto(Right), Insert(Right, 995), Insert(Right, 131), Goto(Right), Insert(Right, 724), Goto(Right), Insert(Right, 184), Goto(Right), Goto(Right), Insert(Right, 359), Goto(Left), Insert(Left, 273), Insert(Left, 952), Insert(Right, 133), Insert(Left, 532), Insert(Right, 901), Insert(Right, 192), Insert(Right, 365), Goto(Right), Insert(Right, 790), Remove(Left), Insert(Left, 891), Insert(Left, 978), Insert(Right, 117), Insert(Left, 532), Replace(Right, 407), Goto(Right), Replace(Left, 973), Insert(Right, 165), Insert(Right, 463), Insert(Left, 292), Insert(Right, 410), Goto(Right), Insert(Left, 709), Goto(Right), Insert(Left, 459), Insert(Right, 521), Insert(Left, 868), Remove(Right), Remove(Right), Insert(Left, 270), Replace(Right, 782), Goto(Right), Insert(Left, 718), Insert(Left, 597), Insert(Left, 850), Replace(Left, 833), Insert(Left, 683), Goto(Right), Goto(Left), Replace(Left, 776), Goto(Right), Insert(Right, 354), Goto(Left), Goto(Right), Insert(Left, 742), Insert(Left, 868), Insert(Right, 911), Replace(Right, 979), Insert(Right, 912), Goto(Right), Insert(Left, 322), Insert(Right, 616), Replace(Left, 152), Goto(Right), Insert(Right, 618), Insert(Left, 741), Insert(Left, 603), Insert(Left, 72), Goto(Right), Goto(Right), Insert(Left, 969), Insert(Right, 68), Insert(Left, 898), Goto(Left), Insert(Right, 963), Insert(Right, 846), Insert(Right, 356), Remove(Right), Remove(Left), Replace(Left, 500), Insert(Right, 316), Insert(Left, 865), Goto(Right), Insert(Left, 203), Remove(Right), Insert(Right, 193), Insert(Right, 998), Insert(Left, 698), Goto(Left), Replace(Right, 550), Insert(Right, 462), Replace(Left, 756), Insert(Right, 694), Goto(Right), Insert(Right, 667), Goto(Right), Insert(Right, 844), Insert(Right, 122), Goto(Right), Insert(Right, 728), Remove(Left), Replace(Right, 663), Insert(Left, 264), Insert(Left, 209), Insert(Right, 137), Replace(Right, 964), Goto(Right), Insert(Right, 830), Insert(Right, 694), Remove(Left), Insert(Right, 513), Insert(Left, 657), Goto(Right), Replace(Right, 135), Insert(Left, 408), Goto(Right), Goto(Right), Insert(Left, 382), Remove(Left), Insert(Left, 356), Insert(Right, 100), Insert(Right, 750), Insert(Left, 172), Insert(Right, 330), Insert(Left, 238), Replace(Right, 955), Replace(Left, 279), Insert(Left, 758), Insert(Left, 772), Insert(Left, 960), Goto(Right), Insert(Left, 799), Remove(Right), Insert(Right, 992), Goto(Right), Insert(Left, 979), Replace(Right, 874), Insert(Right, 686), Goto(Right), Replace(Right, 542), Insert(Right, 57), Insert(Left, 250), Goto(Right), Insert(Left, 826), Insert(Right, 388), Goto(Left), Goto(Right), Goto(Left), Insert(Right, 972), Goto(Right), Goto(Right), Insert(Right, 916), Insert(Right, 337), Insert(Left, 983), Goto(Left), Replace(Left, 927), Remove(Right), Insert(Right, 121), Insert(Right, 73), Remove(Left), Goto(Right), Insert(Right, 3), Goto(Right), Insert(Left, 344), Insert(Left, 535), Goto(Right), Remove(Left), Insert(Right, 298), Goto(Right), Insert(Left, 450), Remove(Left), Insert(Right, 627), Remove(Left), Insert(Left, 431), Insert(Right, 631), Insert(Right, 335), Insert(Right, 93), Remove(Left), Goto(Right), Goto(Right), Replace(Left, 624), Insert(Left, 868), Goto(Right), Goto(Right), Goto(Right), Goto(Right), Remove(Right), Insert(Right, 737), Goto(Right), Goto(Right), Insert(Left, 233), Insert(Left, 887), Insert(Left, 274), Replace(Right, 528), Goto(Right), Insert(Left, 305), Replace(Right, 585), Goto(Right), Replace(Left, 101), Insert(Right, 71), Insert(Right, 325), Insert(Left, 350), Insert(Right, 167), Insert(Left, 580), Insert(Left, 18), Insert(Left, 910), Replace(Left, 389), Insert(Right, 97), Insert(Right, 967), Goto(Right), Remove(Left), Goto(Right), Remove(Left), Insert(Right, 423), Goto(Right), Insert(Right, 293), Insert(Right, 975), Insert(Left, 725), Replace(Right, 509), Goto(Right), Insert(Left, 597), Remove(Left), Insert(Left, 900), Goto(Right), Goto(Right), Remove(Right), Insert(Left, 918), Goto(Right), Insert(Right, 518), Insert(Left, 421), Goto(Left), Remove(Right), Goto(Right), Insert(Left, 944), Insert(Right, 976), Replace(Right, 570), Insert(Right, 577), Insert(Left, 792), Insert(Left, 883), Goto(Right), Goto(Right), Goto(Right), Insert(Left, 689), Goto(Right), Replace(Left, 953), Insert(Right, 704), Insert(Right, 472), Insert(Left, 506), Insert(Left, 573), Insert(Left, 915), Remove(Left), Goto(Left), Insert(Left, 90), Goto(Right), Insert(Left, 485), Remove(Left), Replace(Right, 637), Goto(Right), Replace(Left, 877), Insert(Right, 206), Remove(Left), Goto(Right), Remove(Right), Goto(Right), Insert(Right, 953), Goto(Right), Remove(Left), Goto(Left), Goto(Right), Remove(Right), Replace(Left, 744), Insert(Left, 322), Insert(Right, 894), Insert(Right, 911), Goto(Right), Insert(Right, 756), Replace(Right, 202), Insert(Right, 667), Insert(Left, 307), Insert(Right, 510), Remove(Right), Insert(Left, 141), Remove(Left), Insert(Left, 795), Goto(Left), Remove(Left), Goto(Right), Goto(Right), Insert(Left, 896), Insert(Left, 911), Insert(Left, 977), Goto(Right), Insert(Right, 660), Replace(Left, 348), Insert(Right, 348), Insert(Left, 870), Insert(Left, 466), Remove(Right), Goto(Right), Insert(Left, 154), Remove(Left), Insert(Right, 963), Insert(Left, 463), Goto(Right), Goto(Right), Insert(Right, 923), Goto(Right), Insert(Right, 711), Remove(Right), Goto(Left), Insert(Right, 227), Insert(Right, 928), Remove(Left), Insert(Right, 934), Insert(Right, 564), Goto(Right), Goto(Right), Goto(Right), Insert(Left, 906), Insert(Left, 200), Goto(Right), Insert(Left, 224), Goto(Right), Goto(Right), Insert(Right, 964), Insert(Left, 115), Goto(Right), Insert(Right, 185), Insert(Left, 246), Insert(Right, 673), Insert(Left, 514), Goto(Right), Goto(Right), Goto(Right), Remove(Right), Insert(Left, 469), Insert(Left, 763), Goto(Right), Insert(Right, 521), Insert(Right, 170), Insert(Right, 102), Goto(Right), Goto(Right), Replace(Right, 260), Replace(Right, 313), Goto(Right), Insert(Right, 238), Insert(Right, 27), Replace(Right, 386), Insert(Right, 304), Goto(Right), Insert(Left, 718), Insert(Right, 111), Insert(Right, 117), Goto(Right), Insert(Left, 535), Insert(Right, 763), Remove(Left), Goto(Left), Goto(Right), Insert(Left, 877), Insert(Right, 983), Insert(Right, 912), Remove(Right), Goto(Right), Goto(Right), Insert(Left, 378), Insert(Left, 219), Insert(Left, 108), Insert(Right, 639), Insert(Left, 937), Goto(Left), Goto(Right), Goto(Right), Replace(Left, 936), Goto(Right), Insert(Right, 9), Insert(Right, 224), Replace(Right, 641), Replace(Right, 301), Insert(Left, 367), Remove(Left), Goto(Right), Goto(Right), Insert(Left, 3), Insert(Right, 47), Goto(Right), Goto(Right), Insert(Right, 661), Insert(Left, 958), Insert(Right, 92), Insert(Right, 821), Replace(Left, 731), Replace(Left, 149), Goto(Left), Goto(Right), Goto(Left), Insert(Left, 21), Replace(Left, 822), Goto(Right), Insert(Right, 887), Insert(Left, 857), Insert(Left, 63), Insert(Left, 487), Goto(Right), Remove(Right), Goto(Right), Remove(Right), Insert(Right, 200), Goto(Right), Replace(Right, 480), Insert(Right, 596), Remove(Left), Insert(Right, 696), Remove(Left), Insert(Left, 538), Goto(Right), Remove(Right), Insert(Left, 987), Goto(Left), Remove(Right), Goto(Right), Goto(Right), Insert(Left, 46), Goto(Right), Insert(Left, 15), Goto(Right), Remove(Left), Goto(Right), Insert(Left, 854), Insert(Left, 760), Remove(Right), Insert(Left, 521), Insert(Left, 890), Insert(Left, 547), Insert(Left, 428), Goto(Right), Insert(Left, 507), Goto(Right), Insert(Left, 598), Goto(Right), Insert(Right, 647), Insert(Left, 300), Goto(Right), Insert(Right, 556), Goto(Right), Replace(Left, 865), Insert(Left, 621), Insert(Right, 830), Remove(Left), Insert(Right, 189), Insert(Right, 115), Insert(Left, 741), Goto(Right), Insert(Right, 519), Remove(Right), Insert(Left, 97), Replace(Left, 608), Goto(Right), Goto(Right), Insert(Right, 772), Insert(Left, 586), Goto(Right), Insert(Left, 669), Goto(Right), Insert(Left, 183), Goto(Left), Replace(Right, 767), Insert(Left, 129), Insert(Right, 70), Replace(Right, 281), Insert(Left, 817), Insert(Left, 580)]
