def extract_querie_relevance(qrel, query_strings):
    """Create output file with query id, query string and relevant doc"""
    print("Extracting {0} queries...".format(len(qrel)))
    query_relevance = {}
    for qid in qrel.keys():
        relevant_documents = ",".join([docid for docid in qrel[qid]])
        query_relevance[qid] = (query_strings[qid], relevant_documents)
    return query_relevance