import re


def get_flag(txt):
    """Return anything matching basic flag format, otherwise empty string."""
    flag = ""
    pattern = r'.*([a-zA-Z]{3}\{.*\}).*'   # 3 letters followed by text in {}
    m = re.match(pattern, txt)
    if m:
        flag = m.group(1)
    return flag