## Decode the diagonal. 
Given a grid of characters. Output a decoded message as a string.
Input
```
  H Z R R Q
  D I F C A E A !
  G H T E L A E 
  L M N H P R F 
  X Z R P E
```
Output
`HITHERE!` (diagonally down right `↘` and diagonally up right `↗` if you can't go further).
The message ends when there is no space at the right up or down diagonal.
To make things even clearer: the same example, but in a simplified view
```
  H _ _ _ _
  _ I _ _ _ _ _ !
  _ _ T _ _ _ E 
  _ _ _ H _ R _
  _ _ _ _ E
```
def get_diagonale_code(grid: str) -> str:
    ans=[]
    if grid:
      grid = [k.strip().split(" ") for k in grid.split("\n")]
      i=j=0
      dir = True
      while j <len(grid[i]):
        ans.append(grid[i][j])
        if i == len(grid) - 1:dir = False
        if (i == 0): dir = True 
        i = 0 if len(grid) == 1 else i +1 if dir else i - 1
        j+=1
    return "".join(ans)

def get_diagonale_code(grid: str) -> str:
    ans=[]
    if grid:
      grid = [k.strip().split(" ") for k in grid.split("\n")]
      i=j=0
      dir = True
      while j <len(grid[i]):
        ans.append(grid[i][j])
        if i == len(grid) - 1:dir = False
        if (i == 0): dir = True 
        i = 0 if len(grid) == 1 else i +1 if dir else i - 1
        j+=1
    return "".join(ans)
