This sentence is compound sentence.We used 'but' to connect two sentences.
In 'Mary and Jane...'sentence,we can classify each words to theirs original.
Mary,Jane,sizes,shapes,thinking -Noun
And,but-conjunction
Have-verb
They-pronoun
Same,different-adjective