#!/usr/bin/python
# -*- coding: iso-8859-1 -*-

import sys
import re

convert = {
    ('`', 'a'):"à",
    ('^', 'a'):"â",
    ('~', 'a'):"ã",
    ("'", 'a'):"á",
    ('`', 'A'):"À",
    ('^', 'A'):"Â",
    ('~', 'A'):"Ã",
    ('`', 'e'):"è",
    ('^', 'e'):"ê",
    ("'", 'e'):"é",
    ("'", 'E'):"É",
    ("'", '\\i'):"í",
    ("'", 'i'):"í",
    ('^', 'o'):"ô",
    ('~', 'o'):"õ",
    ('~', 'O'):"Õ",
    ("'", 'o'):"ó",
    ("'", 'u'):"ú",
    ("'", 'U'):"Ú",
    ("c", 'c'):"ç",
    ("c", 'C'):"Ç",
    ("'", '' ):"'"
}
accent = re.compile(r".*(\\i \\(.*)\{(.*)\})")
#accent = re.compile(r".*\\i \\([^{]*)")

real = ""

for line in sys.stdin:
    result = accent.match(line)
    line = line[:-1]

    if result:
        tmp = line.replace(result.group(1),convert[result.groups()[1:3]])

        if real:
            real += tmp
        else:
            real = tmp
    else:
        print real + line
        real = ""
