The challenge is about combining three-letter dominoes into a full sentence. Each of the dominoes has to be used exactly once.
For example, from DOM, OMI, MIN, INO, NOE, OES you create:
After overlapping, you see that the word is DOMINOES
This challenge is inspired by another challenge prepared by me, that is about leaking all three-letters words and then use them to recover the whole CSRF token with only one page reload.
I used the backtracking
algorithm to find all the possible solutions where the correctness function is the existence of each word in the english top 10000
dictionary.
After running the algorithm, it produced 7296
correct solutions.
From reading the first lines of the produced file we can notice that each sentence consists of the same words but in the permutated order.
The idea of the challenge is to find the correct flag from these 7296
lines. From the challenge description, it was clear that the flag is in the unusual format, and that it consists of lower_case english words that when combined produce a grammatically correct meaningful sentence.
The approach for reducing the number of lines is to filter out all "strange" sentences.
For example, the above approach can reduce the number of solutions to 67, from where it's relatively easy to find the best candidates for the flag, which is justCTF{there_was_no_single_doubt_in_my_mind_that_great_player_like_you_shall_solve_the_puzzle}
I created PoC, that solves the challenge.