Added basic solution to highlight the issue