For the First set of 5 cards, the two cards with the same suit are the diamonds, and the 4 of diamonds should be the "base" card as the gap between the 4 of diamonds and the 6 of diamonds is 2, which can be expressed using the remaining three cards with l h m. Therefore, from right to left, the cards would be the 4 of diamonds followed by the 5 of clubs, the 10 of spades and the 9 of hearts, allowing you to guess the 6 of diamonds
Following the same tactic for the next set of 5 cards, we would find the queen of hearts as the "base" card. The gap between the queen and the 3 is 4 so the remaining cards are expressed in m h l. Therefore the order from right to left would be the queen of diamonds, the 8 of diamonds, the 10 of spades and the 2 of clubs, allowing you to guess the 3 of hearts.
For the third and final set, following the same method, we would find the King of Hearts as the "Base" card, but from then on, we cannot continue. Choosing the King as the base card leaves 3 7s: the 7 of clubs, the 7 of spades and the 7 of diamonds. We cannot express which card is the highest or lowest out of 3 of the same value, therefore, we cannot find out the step which is in-between the base card and the secret card.