# Task
 In the Land Of Chess, bishops don't really like each other. In fact, when two bishops happen to stand on the same diagonal, they immediately rush towards the opposite ends of that same diagonal.
 Given the initial positions (in chess notation) of two bishops, `bishop1` and `bishop2`, calculate their future positions. Keep in mind that bishops won't move unless they see each other along the same diagonal.
# Example
 For `bishop1 = "d7" and bishop2 = "f5"`, the output should be `["c8", "h3"]`.
 ![](https://codefightsuserpics.s3.amazonaws.com/tasks/bishopDiagonal/img/ex_1.jpg?_tm=1473766087137)
 For `bishop1 = "d8" and bishop2 = "b5"`, the output should be `["b5", "d8"]`.
 The bishops don't belong to the same diagonal, so they don't move.
 ![](https://codefightsuserpics.s3.amazonaws.com/tasks/bishopDiagonal/img/ex_2.jpg?_tm=1473766087425)
# Input/Output
 - `[input]` string `bishop1`
    Coordinates of the first bishop in chess notation.
 - `[input]` string `bishop2`
    Coordinates of the second bishop in the same notation.
 - `[output]` a string array
    Coordinates of the bishops in lexicographical order after they check the diagonals they stand on.
def bishop_diagonal(bishop1, bishop2):
    
    rank, file = ord(bishop1[0]) - ord(bishop2[0]), int(bishop1[1]) - int(bishop2[1])
    
    if abs(rank) == abs(file):
        
        ranksign, filesign = -1 if rank < 0 else 1, -1 if file < 0 else 1
        
        while bishop1[0] not in "ah" and bishop1[1] not in "18":
            bishop1 = chr(ord(bishop1[0]) + ranksign) + str(int(bishop1[1]) + filesign) 
    
        while bishop2[0] not in "ah" and bishop2[1] not in "18":
            bishop2 = chr(ord(bishop2[0]) - ranksign) + str(int(bishop2[1]) - filesign)
        
    return sorted([bishop1, bishop2])
def bishop_diagonal(bishop1, bishop2):
    
    rank, file = ord(bishop1[0]) - ord(bishop2[0]), int(bishop1[1]) - int(bishop2[1])
    
    if abs(rank) == abs(file):
        
        ranksign, filesign = -1 if rank < 0 else 1, -1 if file < 0 else 1
        
        while bishop1[0] not in "ah" and bishop1[1] not in "18":
            bishop1 = chr(ord(bishop1[0]) + ranksign) + str(int(bishop1[1]) + filesign) 
    
        while bishop2[0] not in "ah" and bishop2[1] not in "18":
            bishop2 = chr(ord(bishop2[0]) - ranksign) + str(int(bishop2[1]) - filesign)
        
    return sorted([bishop1, bishop2])