from typing import Any


def ordinal(value: Any) -> Any:
    """Converts an integer to its ordinal as a string.

    1 is '1º', 2 is '2º', 3 is '3º', etc.
    Works for any integer or anything int() will turn into an integer.
    Anything other value will have nothing done to it.

    Args:
        value: integer.

    Returns:
        Any: ordinal string.
    """
    try:
        value = int(value)
    except (TypeError, ValueError):
        return value
    return "{}{}".format(value, "º")