penniless and friendless in a foreign land , he wandered deep into the african interior until he reached buganda , where he was taken in by a group of anglican missionaries who taught him how to read and write english and prayed daily for his immortal soul .