A magnified young galaxy from about 500 million years after the Big Bang