I do not really get what problem is , that's looks like solution , but I think something wrong with my understanding exactly to conditions.