function solution(spell, dic) {
let answer = [];
let counter = 0;
dic.forEach(item => {
for (let i=0; i<spell.length; i++) {
if (item.includes(spell[i])) {
counter += 1;
}
}
if (counter >= spell.length) {
answer.push(item);
}
counter = 0;
});
return answer.length > 0 ? 1 : 2;
}