SP25396 GRIMM - A Terribly Grimm Problem
Description
Grimm's conjecture states that to each element of a set of consecutive composite numbers one can assign a distinct prime that divides it.
For example, for the range 242 to 250, one can assign distinct primes as follows:

Given the lower and upper bounds of a sequence of composite numbers, find a distinct prime for each. If there is more than one such assignment, output the one with the smallest first prime. If there is still more than one, output the one with the smallest second prime, and so on.
Input Format
There will be several test cases in the input. Each test case will consist of a single line
Output Format
For each test case, output the set of unique primes, in order, all on the same line, separated by single spaces. Output no extra spaces, and do not separate answers with blank lines.