get min cost class array
fix print