A building has seven floors numbered one to seven, in such a manner that the ground floor is numbered one, the floor above it, numbered two and so on such that the topmost floor is numbered seven. One of the seven professors, namely, A, B, C, D, E, F, and G lives on each floor, but not necessarily in the same order.