def cardinal(converted_data, path):
    """
    Translates first move on path to cardinal direction.

    Args:
        converted_data (dict): python readable json
        path (list): path from a*
    Return:
        direction (str): cardinal direction as string
    """
    # if x values are same check y values for direction
    if converted_data["you"]["body"][0]['x'] == path[1][0]:
        if (converted_data["you"]["body"][0]['y']) < (path[1][1]):
            direction = 'down'
        else:
            direction = 'up'
    # x values are different check them for direction
    else:
        if (converted_data["you"]["body"][0]['x']) < (path[1][0]):
            direction = 'right'
        else:
            direction = 'left'
    return direction