Nagarro interview question

Find nagaroo from a string in a particular order