Ten persons A, B, C, D, E, F, G, H, I and J live in a building that consists of five floors. The bottommost floor is numbered as 1, the floor above it as 2 and so on. Each floor consist of two flats- Flat P and Flat Q. Flat P of each floor is towards the west of Flat Q. 
Four persons live between D and G. 
D lives neither on even-numbered floor nor in flat Q. 
|  | Case 1 |  | Case 1a |  | Case 2 |  | Case 2a |  | 
| Floor 5 |  |  |  |  | D |  | D |  | 
| Floor 4 | G |  |  | G |  |  |  |  | 
| Floor 3 |  |  |  |  |  |  |  |  | 
| Floor 2 |  |  |  |  | G |  |  | G | 
| Floor 1 | D |  | D |  |  |  |  |  | 
|  | Flat P | Flat Q | Flat P | Flat Q | Flat P | Flat Q | Flat P | Flat Q | 
A lives to the east of J. C lives immediate above A but neither in the same flat nor with G. 
H lives on floor 3. 
Thus, case 2 and case 2a are invalid. 
|  | Case 1 |  | Case 1a |  | 
| Floor 5 |  |  |  |  | 
| Floor 4 | G |  |  | G | 
| Floor 3 | C | H | C | H | 
| Floor 2 | J | A | J | A | 
| Floor 1 | D |  | D |  | 
|  | Flat P | Flat Q | Flat P | Flat Q | 
Neither F nor I lives towards east of G. G lives below F.
F and I lives on the adjacent floors. Thus, case 1 is invalid. 
|  | Case 1a |  | Case 1a.a |  | 
| Floor 5 | F |  |  | F | 
| Floor 4 | I | G | I | G | 
| Floor 3 | C | H | C | H | 
| Floor 2 | J | A | J | A | 
| Floor 1 | D |  | D |  | 
|  | Flat P | Flat Q | Flat P | Flat Q | 
B lives above E in the same flat. Thus, case 2a.a is invalid. 
Therefore, the final arrangement is: 
| Floor 5 | F | B | 
| Floor 4 | I | G | 
| Floor 3 | C | H | 
| Floor 2 | J | A | 
| Floor 1 | D | E | 
|  | Flat P | Flat Q | 
I and G live on the floor immediately above C's floor.