This solution determines the floor number for person A by logically deducing the position of each resident based on the provided clues.
The deduced floor arrangement is:
| Floor 7 | F |
| Floor 6 | D |
| Floor 5 | C |
| Floor 4 | A |
| Floor 3 | B |
| Floor 2 | E |
| Floor 1 | G |
Based on this arrangement, A lives on floor number 4.
Read the following information carefully and answer the question that follows.
Five coaching classes — P, Q, R, S, and T — are located on five different floors numbered 1, 2, 3, 4, and 5, but not necessarily in the same order. Each coaching class teaches only one of the following subjects: Physics, Chemistry, Mathematics, Biology, and English, but not necessarily in the same order.
Based on the above information, determine on which floor Mathematics is taught.