/**
 * 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 BOIN = 'aiueo'.split('').reduce(function (c, p) {
      c[p] = true;
      return c;
    }, {}),
    MUSEI = 'ksthp'.split('').reduce(function (c, p) {
      c[p] = true;
      return c;
    }, {});
function isMusei(str, i) {
  var c = str[i],len=str.length;
  if (i === 0) {
    return false;
  }
  if (c === 'i' || c === 'u') {
    return (MUSEI[str[i - 1]] || i > 1 && MUSEI[str[i - 2]] && str[i - 1] === 'y') &&
        (i === len - 1 || MUSEI[str[i + 1]])
  }
  if (c === 'a' || c === 'o') {
    return (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;
}
main();
function main() {
  var str, res,
      i, len,
      jpList, mbList,//museiboin
      cur, jp,
      seqFlag;

  while (input[0] !== '#') {
    str = input.shift();
    seqFlag = false;
    res = '';
    for (i = 0, len = str.length; i < len; i++) {
      if (BOIN[str[i]]) {
        if (!seqFlag && isMusei(str, i)) {
          res += '(' + str[i] + ')';
          seqFlag = true;
        } else {
          seqFlag = false;
          res += str[i];
        }
      } else {
        res += str[i];
      }
    }
    console.log(res);
  }
}