مَرَرْتُ بِمَسَاجِدِ الْمَدِينَةِ
Translation: I passed by the city's mosques.
مَرَرْتُ: past-tense verb plus attached subject.
بِ: preposition.
مَسَاجِدِ: genitive noun governed by bi-, with kasra; also muḍāf.
الْمَدِينَةِ: muḍāf ilayh, genitive with kasra.
When this diptote is used as muḍāf, the genitive kasra is permitted.