def to_ordinal(number):
    """Return the "ordinal" representation of a number"""

    assert isinstance(number, int)

    sr = str(number)  # string representation
    ld = sr[-1]  # last digit

    try:
        # Second to last digit
        stld = sr[-2]
    except IndexError:
        stld = None

    if stld != '1':
        if ld == '1':
            return sr + 'st'
        if ld == '2':
            return sr + 'nd'
        if ld == '3':
            return sr + 'rd'

    return sr + 'th'