Solved using digit frecvency trick