solution for simon of ex4