Solve Lexical Scoping assignment