function solution(answers) {
let score1 = 0;
let score2 = 0;
let score3 = 0;
const arr1 = [1, 2, 3, 4, 5];
const arr2 = [2, 1, 2, 3, 2, 4, 2, 5];
const arr3 = [3, 3, 1, 1, 2, 2, 4, 4, 5, 5];
const result = [];
answers.forEach((num, i) => {
if (num === arr1[i % 5]) ++score1;
if (num === arr2[i % 8]) ++score2;
if (num === arr3[i % 10]) ++score3;
});
const maxNum = Math.max(score1, score2, score3);
if (score1 === maxNum) result.push(1);
if (score2 === maxNum) result.push(2);
if (score3 === maxNum) result.push(3);
return result;
}