Graduates thank teachers after challenging year