Deprecated solution for Problem 1