sexe   = ["F", "G", "G", "F", "F", "G", "F", "G", "F", "G"]
classe = ["2nde", "1re", "2nde", "Tle", "2nde", "Tle", "1re", "2nde", "Tle", "1re"]

def effectif(s, c):
    n = 0
    for i in range(len(sexe)):
        if sexe[i] == s and classe[i] == c:
            n = n + 1
    return n

for s in ["F", "G"]:
    for c in ["2nde", "1re", "Tle"]:
        print(s, c, effectif(s, c))
