Solve in Python:
## 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:
    flag=True
    temp=grid.split("\n")
    for i,j in enumerate(temp):
        temp[i]=j.split()
    res=""
    x=0
    y=0
    while True:
        try:
            res+=temp[y][x]
            if y==len(temp)-1:
                flag=False
            elif y==0 and not flag:
                flag=True
            y+=1 if flag else -1
            x+=1
        except:
            return res