Basic idea to tackle this problem