Company: thoughtworks_9oct
Difficulty: medium
Class Performance Assessment Problem Description A fully automated classroom grades every student with one of six symbols. The symbols are ranked by precedence, from best to worst: A > B > C > D > E > F At the end of a session all the students' symbols are collected into one string and fed to an assessment robot, which decides the class's overall score like this: It counts how many times each symbol occurs in the string. The symbol that occurs most often becomes the overall score. If several symbols share that highest count, the robot breaks the tie by precedence and picks the best-ranked of them ( A beats B , B beats C , and so on). Only the counts matter: the order in which the symbols appear in the string never changes the result. Complete the function performance(symbols) . It receives the class's symbols as a string and returns the overall score as a one-character string. Input Format Read from standard input. symbols The only line contains the string symbols . Outp