They refused to admit their mistake at first,but they apologized to the teacher in the end.
At first they refused to admit their mistakes, but in the end they made apology to the teacher.