Code with comments and labels for better understanding.
Code with comments and labels for better understanding.