For Chi-square test of independence, the null hypothesis is that the row variable and the column variable are independent.
In a final exam, 5 girls and 6 boys got A, 7 girls and 8 boys got A-, 8 girls and 7 boys got B, 6 girls and 5 boys got B-. In order to test whether gender and final exam score are independent, we would input "5 7 8 6" in the first row for girls, and "6 8 7 5" in the second row for boys.
We get a chi-square value of 0.3152 with 3 degrees of freedom, and the associated p value is at 0.9572. As p>0.05, we can not reject the null hypothesis that gender and final exam score are independent.