import re


def read_file(infile):
    """
    Reads an input file and removes any whitespace characters
    and makes all characters uppercase.
    """

    cipher_text = infile.read()

    regex = re.compile('[^a-zA-Z]')
    converted = regex.sub('', cipher_text).upper()

    return converted