esg issuer graph Note : As description about decision of cyclic and noncyclic was missing So I have not written the code for that as it will be completely part of assumptions and it will may lead to the incorrect solution. I have written code for finding the issuer with max rating. Drop a comment if you need further help I will be happy to help you. Thanks..!! Code:- ratings = {} esg issuer graph How to get it? esg issuer graph ratings['AAA']=9 ratings['AA']=8 ratings['A']=7 ratings['BBB']=6 ratings['BB']=5 ratings['B']=4 ratings['CCC']=3 ratings['CC']=2 ratings['C']=1 esg issuer graph How to use it? esg issuer graph issuer = [] parent = [] rating = [] maxRating = 0 maxIssuer = '' maxRatingText = '' #reading a file esg issuer graph How to get it for free? esg issuer graph file = open('input.txt','r') for line in file: data = line.split('|') issuer.append(data[0]) parent.append(data[1]) rating.append(data[2].replace('\n','')) #loop to find max for i in range(len(issuer)): esg issuer graph How to get it for free? esg issuer graph if(ratings[rating[i]] > maxRating): maxRating = ratings[rating[i]] maxRatingText = rating[i] maxIssuer = issuer[i] print(maxIssuer) print(maxRatingText) Output:- https://ibb.co/qmVmdmt esg issuer graph How to get it for free? esg issuer graph esg issuer graph