All numbers are repeated thrice and only one number has occured once in python