def parse_grid(grid):
    """
    converts a grid like

    K F A
    L G B
    M H C
    N I D
    O J E

    to

    ABCDEFGHIJKLMNO
    """

    rows = [row.strip().split(" ") for row in grid]
    return "".join(rows[row][col] for col in range(2, -1, -1) for row in range(0, 5))