Please write details how did you solve this problem.