def getWordPattern(word: str) -> str:
    """Get word pattern

    Returns a string of the pattern form of the given word.

    Args:
        word: String containing word to convert into word pattern.

    Example:
    >>> import pythontutorials.books.CrackingCodes.Ch17.makeWordPatterns as makeWordPatterns
    >>> makeWordPatterns.getWordPattern('DUSTBUSTER')
    '0.1.2.3.4.1.2.3.5.6'

    Returns:
        String containing word pattern.
    """
    word = word.upper()
    nextNum = 0
    letterNums = {}
    wordPattern = []

    for letter in word:
        if letter not in letterNums:
            letterNums[letter] = str(nextNum)
            nextNum += 1
        wordPattern.append(letterNums[letter])
    return '.'.join(wordPattern)