def parse_directions(filename):
    """ Load the direction string from FILENAME. """
    # Rooms = '.', walls = '#', doors = '|' or '-'.
    # Current position = 'X'.
    # Rooms are size 1.
    # Movement is possible only through doors.
    # Start = '^', end = '$'.
    # Parenthesis containing a final '|', e.g. (NEWS|) mean that the
    # branch could be skipped entirely.
    directions = ''

    with open(filename) as f:
        directions = f.readline().rstrip()

    return directions