The foot of a ladder is 6 m away from a wall and its top reaches a window 8 m above the ground. If the ladder is shifted in such a way that its foot is 8 m away from the wall, to what height does its top reach?