There will be two integer value f (1<=f<=12) and s (1<=s<=6) , were f denotes the position of the fret and s denotes the string number (here, the strings are numbered 1 to 6 from top to bottom). We need to find the note of that particular fret for that particular guitar string.
We need to map the position of each fret with the name of that fret. Then for each s we will first get its position. Then from there we need to go f units further in a circular order. That means if we reach the end point we will go to starting index next.
AUTHOR’S AND TESTER’S SOLUTIONS:
Author’s solution can be found here.