def graph_grid(grid):
    """Creates a nice grid display, something like this:

       0     1     2     3     4     5     6
    0 [ ]---------------[ ]---------------[ ]
       |                 |                 |
    1  |    [ ]---------[ ]---------[ ]    |
       |     |           |           |     |
    2  |     |    [ ]---[ ]---[ ]    |     |
       |     |     |           |     |     |
    3 [ ]---[ ]---[ ]         [ ]---[ ]---[ ]
       |     |     |           |     |     |
    4  |     |    [ ]---[ ]---[ ]    |     |
       |     |           |           |     |
    5  |    [ ]---------[ ]---------[ ]    |
       |                 |                 |
    6 [ ]---------------[ ]---------------[ ]

    :param grid: a 2-dimensional 7x7 list.
    :return: A nicer display of the grid
    """

    return '''`      0     1     2     3     4     5     6
    0 [{}]---------------[{}]---------------[{}]
       |                 |                 |
    1  |    [{}]---------[{}]---------[{}]    |
       |     |           |           |     |
    2  |     |    [{}]---[{}]---[{}]    |     |
       |     |     |           |     |     |
    3 [{}]---[{}]---[{}]         [{}]---[{}]---[{}]
       |     |     |           |     |     |
    4  |     |    [{}]---[{}]---[{}]    |     |
       |     |           |           |     |
    5  |    [{}]---------[{}]---------[{}]    |
       |                 |                 |
    6 [{}]---------------[{}]---------------[{}]`'''.format(
        grid[0][0], grid[0][3], grid[0][6],
        grid[1][1], grid[1][3], grid[1][5],
        grid[2][2], grid[2][3], grid[2][4],
        grid[3][0], grid[3][1], grid[3][2], grid[3][4], grid[3][5], grid[3][6],
        grid[4][2], grid[4][3], grid[4][4],
        grid[5][1], grid[5][3], grid[5][5],
        grid[6][0], grid[6][3], grid[6][6])