/*
Description:
To pass the series of gates guarded by the owls, Kenneth needs to present them each with a highly realistic portrait of one. Unfortunately, he is absolutely rubbish at drawing, and needs some code to return a brand new portrait with a moment's notice.

All owl heads look like this:

''0v0''
Such beautiful eyes! However, they differ in their plumage, which is always symmetrical, eg.:

   VVHVAV''0v0''VAVHVV
or

YYAYAH8XH''0v0''HX8HAYAYY
So Kenneth needs a method that will take a garble of text generated by mashing at his keyboard (numbers and letters, but he knows how to avoid punctuation etc.) for a bit and give him a symmetrical owl with a lovely little face, with a truly symmetrical plumage made of uppercase letters and numbers.

(To be clear, the acceptable characters for the plumage are 8,W,T,Y,U,I,O,A,H,X,V and M.)
*/
function owlPic(text) {
  const dict = ["8", "W", "T", "Y", "U", "I", "O", "A", "H", "X", "V", "M"];
  const left = text
    .toUpperCase()
    .split("")
    .filter(v => dict.includes(v))
    .join("");
  const right = left
    .split("")
    .reverse()
    .join("");
  return left + `''0v0''` + right;
}
