Read each word as a relation that needs context.
WordBasic meaningWordBasic meaningفَوْقٌaboveتَحْتٌbelowأَمَامٌin frontقُدَّامٌahead / in frontخَلْفٌbehindوَرَاءٌbehind, ahead or beyond by contextبَيْنٌbetweenعِنْدٌnear / at
The table shows dictionary forms. In an idafah phrase, the ending appears according to the sentence, as in فَوْقَ الْبَيْتِ.