As Allah's Apostle. ﷺ was delivering sermon on the Day of Nahr, a man stood up before him and said: Messenger of Allah, I did not know that such and such (rite was to be performed) before such and such (rite). Then another man came and said: Messenger of Allah, I thought that such and such (rite) should precede such and such (rite), and then another man came and said: Messenger of Allah, I had thought that such and such was before such and such, and such and such (is the sequence) of the three (rites, viz. throwing of pebbles, sacrificing of animal and shaving of one's head). He said to all these three: Do now (if you have not observed the cequence) ; there is no harm in it.
أَنَّ النَّبِيَّ ﷺ بَيْنَا هُوَ يَخْطُبُ يَوْمَ النَّحْرِ فَقَامَ إِلَيْهِ رَجُلٌ فَقَالَ مَا كُنْتُ أَحْسِبُ يَا رَسُولَ اللَّهِ أَنَّ كَذَا وَكَذَا قَبْلَ كَذَا وَكَذَا ثُمَّ جَاءَ آخَرُ فَقَالَ يَا رَسُولَ اللَّهِ كُنْتُ أَحْسِبُ أَنَّ كَذَا قَبْلَ كَذَا وَكَذَا لِهَؤُلاَءِ الثَّلاَثِ قَالَ افْعَلْ وَلاَ حَرَجَ