/**
 * Created by hiroqn on 13/10/11.
 */
var fs = require('fs'),
    length = fs.fstatSync(process.stdin.fd).size,
    buffer = new Buffer(length),
    bytesRead = fs.readSync(process.stdin.fd, buffer, 0, length, 0),
    input = buffer.toString('utf8', 0, bytesRead).split('\n');

var SHIIN = 'kstnhmyrwgzddbp'.split('').reduce(function (c, p) {
      c[p] = true;
      return c;
    }, {}),
    BOIN = 'aiueo'.split('').reduce(function (c, p) {
      c[p] = true;
      return c;
    }, {}),
//    TYOUIN = 'aa,ii,uu,ei,ou'.split(',').reduce(function (c, p) {
//      c[p] = true;
//      return c;
//    }, {}),
    MUSEI = 'ksthp'.split('').reduce(function (c, p) {
      c[p] = true;
      return c;
    }, {});
main();
function isHatsu(jp) {
  return jp[0].length > 1 ? jp[0].charAt(0) === jp[0].charAt(1) : false;
}
function isMusei(list, i) {
  var jp = list[i];
  if (jp[1] === 'i' || jp[1] === 'u') {
    return MUSEI[jp[0].charAt(0)] && (i === list.length - 1 || MUSEI[list[i + 1][0].charAt(0)]);
  }
  if (jp[1] === 'a' || jp[1] === 'o') {
    return MUSEI[jp[0].charAt(0)] &&
        i < list.length - 1 && MUSEI[list[i + 1][0].charAt(0)] &&
        jp[1] === list[i + 1][1] && !isHatsu(list[i + 1])
//        (list[i + 1][0].length > 1 || list[i + 1][0].charAt(0) !== list[i + 1][0].charAt(1))
//    (MUSEI[str[i - 1]] || i > 1 && MUSEI[str[i - 2]] && str[i - 1] === 'y') &&
//        (i < len - 2 && MUSEI[str[i + 1]] && c === str[i + 2] ||
//            i < len - 3 && MUSEI[str[i + 1]] && str[i + 2 ] === 'y' && c === str[i + 3] )
  }
  return false;
}
function main() {
  var str, res,
      i, len,
      jpList, mbList,//museiboin
      cur, jp,
      temp,
      seqFlag;
  while (input[0] !== '#') {
    str = input.shift();
    seqFlag = false;
    res = '';

    jpList = [];
    for (i = 0, len = str.length; i < len; i++) {
      cur = str[i];

      if (SHIIN[cur]) {
        if (cur === 'n' && (i === len - 1 || SHIIN[str[i + 1]])) {
          jpList.push(['n', '']);
          continue;
        }
        if (cur === 'n' && str[i + 1] === '\'') {
          i++;
          jpList.push(['n\'', '']);
          continue;
        }
        if (cur === str[i + 1]) {
          i++;
          cur += cur;
        }
        if (str[i + 1] === 'y') {
          i++;
          cur += 'y';
        }
        i++;
        jpList.push([cur, str[i]]);
//        console.log(str.slice(i,i+2));
//        if (TYOUIN[str.slice(i, i + 2)]) {
//          i++;
//          jpList.push('-');
//        }
      }
      if (BOIN[cur]) {
        jpList.push(['', cur]);
//        if (TYOUIN[str.slice(i, i + 2)]) {
//          i++;
//          jpList.push('-');
//        }
      }
    }
    seqFlag = false;
    res = '';
    for (i = 0, len = jpList.length; i < len; i++) {
      jp = jpList[i];
      if (!seqFlag && isMusei(jpList, i)) {
        res += jp[0] + '(' + jp[1] + ')';
        seqFlag = true;
      } else {
        res += jp[0] + jp[1];
        seqFlag = false;

      }
    }
//    for (i = 0; i < len; i++) {
//      jp = mbList[i];
//      if (jp === 'i' || jp === 'u') {
//        if (mbList[i] === 'x') {
//          i++;
//        }
//        if (mbList[i + 1] !== '') {
//          seqFlag = true;
//        }
//      }
//    }
    console.log(res);
  }
}