German uses a lot of compound words, but luckily, since they're always written together, they are considered one word, and only the last word matters for gender and declination.