#include <iostream>
using namespace std;
int main()
{
int i, j, N, A, B, C, ok;
cin >> N;
for (i=0;i<N;i++) {
ok = 0;
cin >> A >> B >> C;
for (j=A+1;j<B;j++)
if (j % C != 0) {
cout << j << " ";
ok = 1;
}
if (ok == 0)
cout << "No free parking spaces.";
cout << endl;
}
}