function solution(n, words){
let a
let b
let c = [words[0]]
for(let i = 1; i < words.length; i++){
console.log(c)
// 마지막글자로 시작했는지 확인
if(words[i - 1][words[i - 1].length - 1] !== words[i][0]){
a = (i % n) + 1
b = Math.floor(i / n) + 1
return [a,b]
}
// 중복단어 쳌
if(c.includes(words[i])){
a = (i % n) + 1
b = Math.floor(i / n) + 1
return [a,b]
}
c.push(words[i])
}
return [0,0]
}