static const int sequence[1024] = { 3, 17, 65, 32, 0, 4, 8, 128, 12, 34, 72, 64, 16, 2, 6, 10, 18, 20, 24, 36, 256, 40, 48, 66, 68, 1, 5, 9, 33, 80, 129, 130, 132, 96, 136, 512, 144, 7, 11, 13, 19, 14, 21, 22, 25, 35, 26, 37, 257, 38, 28, 258, 41, 42, 160, 260, 44, 49, 67, 50, 264, 69, 70, 52, 73, 74, 76, 56, 81, 272, 82, 84, 131, 192, 133, 134, 97, 137, 88, 98, 513, 138, 514, 100, 140, 288, 145, 516, 146, 15, 104, 148, 23, 520, 27, 39, 29, 259, 43, 30, 161, 261, 152, 45, 162, 262, 51, 46, 265, 112, 71, 53, 164, 266, 528, 75, 320, 54, 77, 57, 268, 273, 83, 78, 58, 168, 274, 85, 193, 86, 60, 135, 194, 276, 89, 99, 139, 515, 90, 544, 101, 141, 196, 289, 517, 176, 147, 102, 142, 290, 92, 518, 280, 105, 149, 384, 521, 106, 150, 200, 292, 522, 31, 153, 163, 263, 47, 108, 113, 154, 165, 267, 524, 529, 576, 321, 55, 114, 296, 166, 269, 530, 79, 322, 208, 156, 59, 169, 275, 270, 87, 116, 61, 195, 170, 532, 277, 324, 91, 62, 545, 197, 304, 278, 177, 103, 143, 172, 291, 93, 519, 546, 281, 120, 640, 198, 385, 224, 536, 328, 178, 107, 151, 201, 94, 293, 282, 523, 386, 548, 109, 202, 155, 294, 525, 180, 577, 284, 115, 297, 167, 388, 531, 110, 336, 323, 209, 157, 526, 204, 578, 552, 271, 768, 298, 117, 171, 184, 533, 210, 158, 325, 63, 392, 305, 118, 279, 580, 300, 534, 173, 326, 352, 547, 121, 560, 641, 199, 212, 225, 537, 329, 306, 179, 95, 283, 174, 387, 122, 400, 584, 642, 549, 226, 538, 203, 330, 295, 181, 216, 308, 285, 389, 550, 111, 124, 337, 644, 228, 527, 540, 592, 205, 579, 182, 553, 332, 416, 769, 299, 286, 312, 390, 185, 211, 159, 338, 206, 648, 393, 554, 232, 770, 119, 581, 608, 301, 535, 186, 448, 327, 353, 561, 340, 213, 394, 556, 307, 772, 582, 656, 240, 302, 175, 354, 188, 123, 401, 585, 562, 643, 214, 227, 344, 539, 396, 331, 776, 217, 309, 672, 356, 402, 586, 564, 551, 125, 645, 229, 218, 541, 310, 593, 784, 183, 333, 417, 704, 360, 404, 588, 287, 568, 313, 126, 391, 646, 230, 339, 542, 220, 594, 334, 418, 800, 207, 649, 555, 408, 368, 233, 771, 314, 609, 187, 596, 449, 420, 832, 650, 341, 234, 316, 395, 610, 557, 773, 583, 450, 600, 657, 424, 241, 896, 652, 303, 342, 236, 355, 189, 563, 612, 558, 215, 774, 452, 345, 658, 242, 432, 397, 190, 777, 616, 673, 456, 346, 660, 244, 357, 398, 403, 587, 565, 778, 624, 674, 348, 464, 664, 358, 248, 219, 566, 311, 785, 780, 705, 676, 361, 405, 589, 480, 569, 127, 786, 647, 231, 706, 680, 362, 406, 590, 543, 221, 595, 570, 335, 419, 801, 788, 409, 369, 708, 688, 364, 222, 315, 572, 802, 792, 410, 370, 712, 597, 421, 833, 804, 651, 235, 412, 372, 720, 598, 317, 422, 834, 808, 611, 451, 376, 601, 736, 318, 425, 897, 836, 653, 816, 343, 237, 602, 426, 898, 613, 840, 559, 654, 775, 238, 453, 659, 604, 243, 433, 428, 900, 614, 848, 191, 454, 434, 617, 904, 864, 457, 347, 661, 245, 436, 399, 618, 912, 458, 662, 779, 246, 440, 625, 620, 928, 675, 349, 465, 460, 665, 359, 249, 626, 960, 567, 350, 466, 666, 781, 250, 628, 677, 481, 468, 668, 782, 252, 632, 678, 787, 482, 472, 707, 681, 363, 407, 591, 484, 571, 682, 789, 488, 709, 689, 684, 365, 790, 496, 223, 573, 710, 803, 690, 366, 793, 574, 411, 371, 713, 692, 794, 714, 805, 696, 796, 413, 373, 721, 716, 806, 599, 423, 414, 374, 835, 722, 809, 377, 737, 724, 810, 319, 378, 837, 738, 728, 817, 812, 380, 603, 838, 740, 818, 427, 899, 841, 744, 655, 820, 239, 605, 842, 752, 824, 429, 901, 606, 615, 849, 844, 430, 455, 902, 850, 435, 905, 865, 852, 906, 866, 856, 437, 619, 913, 908, 868, 438, 459, 663, 914, 872, 247, 441, 621, 929, 916, 880, 442, 461, 622, 930, 920, 444, 462, 627, 961, 932, 351, 467, 667, 962, 936, 251, 629, 964, 944, 469, 669, 630, 783, 968, 253, 470, 670, 633, 976, 679, 254, 483, 473, 634, 992, 474, 636, 485, 476, 486, 683, 489, 490, 685, 791, 497, 492, 686, 498, 711, 691, 367, 500, 575, 504, 693, 795, 694, 715, 697, 797, 698, 798, 717, 807, 700, 718, 415, 375, 723, 725, 811, 726, 379, 739, 729, 813, 730, 814, 381, 839, 741, 732, 819, 382, 742, 745, 821, 746, 822, 843, 753, 748, 825, 754, 826, 607, 845, 756, 828, 431, 846, 760, 903, 851, 853, 854, 907, 867, 857, 858, 909, 869, 860, 439, 910, 870, 915, 873, 874, 917, 881, 876, 443, 918, 882, 623, 931, 921, 884, 445, 922, 888, 463, 446, 933, 924, 934, 963, 937, 938, 965, 945, 940, 966, 946, 631, 969, 948, 970, 952, 471, 671, 977, 972, 255, 978, 635, 993, 980, 994, 984, 475, 637, 996, 638, 1000, 477, 1008, 478, 487, 491, 493, 687, 494, 499, 501, 502, 505, 506, 508, 695, 699, 799, 701, 702, 719, 727, 731, 815, 733, 734, 383, 743, 747, 823, 749, 750, 755, 827, 757, 829, 758, 830, 847, 761, 762, 764, 855, 859, 861, 862, 911, 871, 875, 877, 878, 919, 883, 885, 886, 923, 889, 890, 447, 925, 892, 926, 935, 939, 941, 942, 967, 947, 949, 950, 971, 953, 954, 973, 956, 974, 979, 981, 982, 995, 985, 986, 997, 988, 998, 639, 1001, 1002, 1004, 1009, 479, 1010, 1012, 1016, 495, 503, 507, 509, 510, 703, 735, 751, 759, 831, 763, 765, 766, 863, 879, 887, 891, 893, 894, 927, 943, 951, 955, 957, 958, 975, 983, 987, 989, 990, 999, 1003, 1005, 1006, 1011, 1013, 1014, 1017, 1018, 1020, 511, 767, 895, 959, 991, 1007, 1015, 1019, 1021, 1022, 1023, };
