function solution(s) {
var answer = '';
const sArr=[...s];
const n=sArr.length;
if(n%2===0){
answer=sArr[n/2-1]+sArr[n/2];
}else{
answer=sArr[parseInt(n/2)]
}
if(n===1){
answer=s;
}
return answer;
}