كَمَسَاجِدَ — such as masājid.
كَـ: preposition.
مَسَاجِدَ: genitive noun marked with fatḥa because its plural pattern makes it a diptote.
Do not treat مَسَاجِدَ here as a direct object merely because it ends with fatḥa. The preceding kāf is a preposition.