In my case I just wrote out the possible combinations, and saw the 1/3 right away. I had fallen for the same problem as the 100 coin tosses: by the time I have identified a child enough to refer to the "other child," I have already beaten some of the odds!
But please clarify the "one is a girl" and "one is named Mary."
Our OS who art in CPU, UNIX be thy name. Thy programs run, thy syscalls done, In kernel as it is in user!