O(9*n^3)