RSpec.describe 'mod_three' do
  [ [0],               [],
    [1],               [1],
    [2],               [2],
    [3],               [],
    [4],               [1],
    [5],               [2],
    [6],               [],
    [7],               [1],
    [0,1,2,3,4,5,6,7], [1, 2, 1, 2, 1],
    [237, 491, 988, 944, 796, 342, 284, 110, 647, 782, 250, 504, 196, 624, 466, 983, 580, 841, 785, 513, 1, 541, 253, 498, 206, 516, 271, 108, 601, 868, 450, 813, 824, 397, 218, 325, 190, 131, 905, 418, 934, 826, 858, 403, 998, 535, 687, 339, 792, 914, 954, 522, 805, 31, 883, 167, 613, 829, 308, 698, 256, 746, 740, 801, 301, 678, 166, 706, 3, 370, 362, 542, 688, 911, 501, 534, 877, 574, 650, 533, 838, 429, 787, 978, 537, 793, 697, 507, 930, 714, 850, 689, 939, 828, 634, 900, 27, 950, 295, 670, 173, 587, 810, 654, 819, 451, 931, 652, 360, 589, 275, 546, 120, 552, 774, 739, 473, 133, 909, 633, 465, 974, 562, 320, 897, 979, 119, 807, 871, 109, 35, 489, 313, 572, 958, 17, 610, 307, 903, 464, 257, 198, 11, 887, 696, 591, 106, 23, 174, 402, 683, 346, 636, 481, 744, 474, 521, 440, 641, 947, 681, 130, 949, 502, 244, 298, 165, 665, 933, 441, 240, 103, 170, 182, 47, 726, 524, 756, 981, 37, 141, 586, 50, 798, 940, 322, 29, 946, 235, 367, 414, 471, 595, 847, 644, 755, 359, 40, 943, 874, 667, 291, 209, 751, 6, 531, 916, 508, 547, 251, 816, 728, 19, 919, 445, 843, 663, 817, 870, 281, 408, 773, 891, 575, 880, 5, 127, 570, 387, 635, 30, 763, 335, 759, 363, 475, 261, 228, 616, 259, 872, 270, 789, 808, 804, 768, 117, 901, 221, 713, 213, 354, 195, 88, 786, 942, 593, 762, 937, 904, 671, 748, 415, 467, 806, 860, 377, 771, 319, 332, 894, 822, 925, 945, 779, 139, 505, 211, 959, 14, 155, 176, 484, 770, 212, 249, 603, 977, 656, 157, 57, 84, 852, 217, 775, 662, 210, 818, 929, 642, 615, 338, 865, 128, 760, 859, 115, 179, 548, 781, 343, 143, 605, 90, 56, 661, 907, 260, 873, 520, 598, 590, 526, 730, 267, 709, 965, 861, 60, 917, 113, 202, 701, 995, 262, 741, 668, 316, 729, 758, 386, 201, 472, 935, 659, 812, 193, 71, 573, 617, 691, 997, 864, 200, 156, 645, 392, 169, 252, 44, 854, 620, 340, 100, 837, 68, 276, 735, 384, 655, 797, 761, 495, 97, 161, 737, 777, 263, 639, 199, 222, 846, 910, 82, 318, 556, 333, 629, 132, 356, 941, 61, 889, 485, 544, 551, 124, 724, 984, 274, 802, 180, 439, 536, 606, 509, 896, 882, 695, 694, 795, 703, 895, 932, 374, 160, 144, 866, 421, 518, 288, 254, 514, 966, 734, 482, 172, 844, 497, 830, 63, 660, 59, 705, 448, 612, 188, 890, 220, 406, 391, 767, 757, 168, 503, 666, 138, 424, 545, 394, 69, 576, 282, 578, 630, 55, 626, 366, 581, 989, 600, 479, 10, 845, 716, 511, 145, 297, 305, 719, 569, 477, 114, 855, 175, 921, 116, 956, 148, 517, 684, 294, 628, 442, 287, 16, 234, 717, 85, 15, 585, 183, 177, 381, 101, 435, 241, 496, 825, 853, 227, 350, 42, 961, 856, 693, 146, 673, 674, 395, 21, 710, 851, 736, 960, 123, 563, 926, 34],
     [2,1,2,1,2,2,2,2,1,1,1,2,1,1,2,1,1,1,2,1,1,1,2,1,2,1,1,2,2,1,1,1,1,2,1,2,1,1,1,2,1,1,2,2,1,2,2,1,1,1,1,2,2,1,2,1,1,2,2,1,1,1,1,1,2,1,2,1,1,2,2,1,1,1,1,2,1,2,1,2,1,2,1,2,1,1,2,1,2,1,2,1,1,2,2,2,2,1,2,2,1,1,2,2,2,2,1,1,1,1,1,2,1,2,2,2,2,1,1,2,1,1,2,1,1,1,1,1,2,2,2,1,1,1,1,2,1,1,1,1,2,2,1,1,1,1,2,2,2,1,2,1,2,1,2,1,1,1,2,1,1,2,2,1,2,1,1,2,1,1,2,2,2,2,1,2,1,2,1,1,1,2,2,2,2,1,2,2,2,2,1,1,1,2,2,2,2,1,2,1,1,1,2,2,1,1,2,2,2,1,1,2,1,1,2,1,1,1,2,2,2,1,2,2,1,2,1,2,2,1,2,2,2,1,2,2,1,1,2,2,1,2,2,2,1,1,2,1,2,2,1,2,2,2,1,1,1,1,2,2,2,1,1,2,1,2,1,1,1,1,1,2,2,2,2,1,1,1,2,2,1,2,1,2,2,1,2,2,1,1,2,2,2,1,2,2,1,1,1,2,1,2,1,2,1,2,1,2,2,2,2,1,2,2,1,1,2,2,2,1,2,2,1,1,1,1,2,1,1,2,1,1,1,2,2,1,1,2,1,2,2,2,2,1,2,2,1],
  ].each_slice 2 do |input, output|
    specify "mod_three(#{input.inspect}) returns #{output.inspect}" do
      expect(mod_three input).to eq output
    end
  end
end
