def rot_char(character, n):
    """Rot-n for a single character"""
    if character.islower():
        return chr(((ord(character)-97+n)%26)+97)
    elif character.isupper():
        return chr(((ord(character)-65+n)%26)+65)
    else:
        return character