Changed unique_sort method, resulted in accpeted Kattis submisson