#include <iostream>
#include <string>

using namespace std;

string S;
bool check;
int gender;
bool seeA;
bool seeN;
bool seeV;

int main(){
	cin>>S;
	for(int i=0;i<S.size();i++){
		if(S[i]==' '||i==S.size()-1){
			if(i==S.size()-1){
				i=S.size();
			}
			check=false;
			if(S[i-1]=='r'&&S[i-2]=='t'&&S[i-3]=='e'){
				check=true;
				if(seeN==true||seeV==true){
					check=false;
					break;
				}
				seeN=true;
				if(gender==0){
					gender=2;
				}
				else{
					if(gender!=2){
						check=false;
						break;
					}
				}
			}
			else if(S[i-1]=='a'&&S[i-2]=='r'&&S[i-3]=='t'&&S[i-4]=='e'){
				check=true;
				if(seeN==true||seeV==true){
					check=false;
					break;
				}
				seeN=true;
				if(gender==0){
					gender=1;
				}
				else{
					if(gender!=1){
						check=false;
						break;
					}
				}
			}
			else if(S[i-1]=='s'&&S[i-2]=='o'&&S[i-3]=='i'&&S[i-4]=='l'){
				check=true;
				seeA=true;
				if(seeN==true||seeV==true){
					check=false;
					break;
				}
				if(gender==0){
					gender=2;
				}
				else{
					if(gender!=2){
						check=false;
						break;
					}
				}
			}
			else if(S[i-1]=='a'&&S[i-2]=='l'&&S[i-3]=='a'&&S[i-4]=='i'&&S[i-5]=='l'){
				check=true;
				seeA=true;
				if(seeN==true||seeV==true){
					check=false;
					break;
				}
				if(gender==0){
					gender=1;
				}
				else{
					if(gender!=1){
						check=false;
						break;
					}
				}
			}
			else if(S[i-1]=='s'&&S[i-2]=='e'&&S[i-3]=='t'&&S[i-4]=='i'&&S[i-5]=='n'&&S[i-6]=='i'){
				check=true;
				seeV=true;
				if(gender==0){
					gender=1;
				}
				else{
					if(gender!=1){
						check=false;
						break;
					}
				}
			}
			else if(S[i-1]=='s'&&S[i-2]=='i'&&S[i-3]=='t'&&S[i-4]=='i'&&S[i-5]=='n'&&S[i-6]=='i'){
				check=true;
				seeV=true;
				if(gender==0){
					gender=2;
				}
				else{
					if(gender!=2){
						check=false;
						break;
					}
				}
			}
			else{
				break;
			}
		}
	}
	if(check==true){
		cout<<"YES";
	}
	else{
		cout<<"NO";
	}
}


#include <iostream>
#include <string>

using namespace std;

string S;
bool check;
int gender;
bool seeA;
bool seeN;
bool seeV;

int main(){
	getline(cin,S,'\n');
	for(int i=0;i<S.size();i++){
		if(S[i]==' '||i==S.size()-1){
			if(i==S.size()-1){
				i=S.size();
			}
			check=false;
			if(S[i-1]=='r'&&S[i-2]=='t'&&S[i-3]=='e'){
				check=true;
				if(seeN==true||seeV==true){
					check=false;
					break;
				}
				seeN=true;
				if(gender==0){
					gender=2;
				}
				else{
					if(gender!=2){
						check=false;
						break;
					}
				}
			}
			else if(S[i-1]=='a'&&S[i-2]=='r'&&S[i-3]=='t'&&S[i-4]=='e'){
				check=true;
				if(seeN==true||seeV==true){
					check=false;
					break;
				}
				seeN=true;
				if(gender==0){
					gender=1;
				}
				else{
					if(gender!=1){
						check=false;
						break;
					}
				}
			}
			else if(S[i-1]=='s'&&S[i-2]=='o'&&S[i-3]=='i'&&S[i-4]=='l'){
				check=true;
				seeA=true;
				if(seeN==true||seeV==true){
					check=false;
					break;
				}
				if(gender==0){
					gender=2;
				}
				else{
					if(gender!=2){
						check=false;
						break;
					}
				}
			}
			else if(S[i-1]=='a'&&S[i-2]=='l'&&S[i-3]=='a'&&S[i-4]=='i'&&S[i-5]=='l'){
				check=true;
				seeA=true;
				if(seeN==true||seeV==true){
					check=false;
					break;
				}
				if(gender==0){
					gender=1;
				}
				else{
					if(gender!=1){
						check=false;
						break;
					}
				}
			}
			else if(S[i-1]=='s'&&S[i-2]=='e'&&S[i-3]=='t'&&S[i-4]=='i'&&S[i-5]=='n'&&S[i-6]=='i'){
				check=true;
				seeV=true;
				if(seeN==false){
					check=false;
					break;
				}
				if(gender==0){
					gender=1;
				}
				else{
					if(gender!=1){
						check=false;
						break;
					}
				}
			}
			else if(S[i-1]=='s'&&S[i-2]=='i'&&S[i-3]=='t'&&S[i-4]=='i'&&S[i-5]=='n'&&S[i-6]=='i'){
				check=true;
				seeV=true;
				if(seeN==false){
					check=false;
					break;
				}
				if(gender==0){
					gender=2;
				}
				else{
					if(gender!=2){
						check=false;
						break;
					}
				}
			}
			else{
				check=false;
				break;
			}
		}
	}
	if(check==true&&seeN==true){
		cout<<"YES";
	}
	else{
		cout<<"NO";
	}
}


#include <iostream>
#include <string>

using namespace std;

string S;
bool check;
int gender;
bool seeA;
bool seeN;
bool seeV;

int main(){
	getline(cin,S,'\n');
	for(int i=0;i<S.size();i++){
		if(S[i]==' '||i==S.size()-1){
			if(i==S.size()-1){
				i=S.size();
			}
			check=false;
			if(S[i-1]=='r'&&S[i-2]=='t'&&S[i-3]=='e'){
				check=true;
				if(seeN==true||seeV==true){
					check=false;
					break;
				}
				seeN=true;
				if(gender==0){
					gender=2;
				}
				else{
					if(gender!=2){
						check=false;
						break;
					}
				}
			}
			else if(S[i-1]=='a'&&S[i-2]=='r'&&S[i-3]=='t'&&S[i-4]=='e'){
				check=true;
				if(seeN==true||seeV==true){
					check=false;
					break;
				}
				seeN=true;
				if(gender==0){
					gender=1;
				}
				else{
					if(gender!=1){
						check=false;
						break;
					}
				}
			}
			else if(S[i-1]=='s'&&S[i-2]=='o'&&S[i-3]=='i'&&S[i-4]=='l'){
				check=true;
				seeA=true;
				if(seeN==true||seeV==true){
					check=false;
					break;
				}
				if(gender==0){
					gender=2;
				}
				else{
					if(gender!=2){
						check=false;
						break;
					}
				}
			}
			else if(S[i-1]=='a'&&S[i-2]=='l'&&S[i-3]=='a'&&S[i-4]=='i'&&S[i-5]=='l'){
				check=true;
				seeA=true;
				if(seeN==true||seeV==true){
					check=false;
					break;
				}
				if(gender==0){
					gender=1;
				}
				else{
					if(gender!=1){
						check=false;
						break;
					}
				}
			}
			else if(S[i-1]=='s'&&S[i-2]=='e'&&S[i-3]=='t'&&S[i-4]=='i'&&S[i-5]=='n'&&S[i-6]=='i'){
				check=true;
				seeV=true;
				if(gender==0){
					gender=1;
				}
				else{
					if(gender!=1){
						check=false;
						break;
					}
				}
			}
			else if(S[i-1]=='s'&&S[i-2]=='i'&&S[i-3]=='t'&&S[i-4]=='i'&&S[i-5]=='n'&&S[i-6]=='i'){
				check=true;
				seeV=true;
				if(gender==0){
					gender=2;
				}
				else{
					if(gender!=2){
						check=false;
						break;
					}
				}
			}
			else{
				check=false;
				break;
			}
		}
	}
	if(check==true){
		cout<<"YES";
	}
	else{
		cout<<"NO";
	}
}


#include <iostream>
#include <string>

using namespace std;

string S;
bool check;
int gender;
bool seeA;
bool seeN;
bool seeV;
bool seeS;

int main(){
	getline(cin,S,'\n');
	for(int i=0;i<S.size();i++){
		if(S[i]==' '||i==S.size()-1){
			if(S[i]==' '){
				seeS=true;
			}
			if(i==S.size()-1){
				i=S.size();
			}
			check=false;
			if(S[i-1]=='r'&&S[i-2]=='t'&&S[i-3]=='e'){
				check=true;
				if(seeN==true||seeV==true){
					check=false;
					break;
				}
				seeN=true;
				if(gender==0){
					gender=2;
				}
				else{
					if(gender!=2){
						check=false;
						break;
					}
				}
			}
			else if(S[i-1]=='a'&&S[i-2]=='r'&&S[i-3]=='t'&&S[i-4]=='e'){
				check=true;
				if(seeN==true||seeV==true){
					check=false;
					break;
				}
				seeN=true;
				if(gender==0){
					gender=1;
				}
				else{
					if(gender!=1){
						check=false;
						break;
					}
				}
			}
			else if(S[i-1]=='s'&&S[i-2]=='o'&&S[i-3]=='i'&&S[i-4]=='l'){
				check=true;
				seeA=true;
				if(seeN==true||seeV==true){
					check=false;
					break;
				}
				if(gender==0){
					gender=2;
				}
				else{
					if(gender!=2){
						check=false;
						break;
					}
				}
			}
			else if(S[i-1]=='a'&&S[i-2]=='l'&&S[i-3]=='a'&&S[i-4]=='i'&&S[i-5]=='l'){
				check=true;
				seeA=true;
				if(seeN==true||seeV==true){
					check=false;
					break;
				}
				if(gender==0){
					gender=1;
				}
				else{
					if(gender!=1){
						check=false;
						break;
					}
				}
			}
			else if(S[i-1]=='s'&&S[i-2]=='e'&&S[i-3]=='t'&&S[i-4]=='i'&&S[i-5]=='n'&&S[i-6]=='i'){
				check=true;
				seeV=true;
				if(seeS==true&&seeN==false){
					check=false;
					break;
				}
				if(gender==0){
					gender=1;
				}
				else{
					if(gender!=1){
						check=false;
						break;
					}
				}
			}
			else if(S[i-1]=='s'&&S[i-2]=='i'&&S[i-3]=='t'&&S[i-4]=='i'&&S[i-5]=='n'&&S[i-6]=='i'){
				check=true;
				seeV=true;
				if(seeS==true&&seeN==false){
					check=false;
					break;
				}
				if(gender==0){
					gender=2;
				}
				else{
					if(gender!=2){
						check=false;
						break;
					}
				}
			}
			else{
				check=false;
				break;
			}
		}
	}
	if(check==true){
		if(seeS==true&&seeN==false){
			cout<<"NO";
		}
		else{
			cout<<"YES";
		}
	}
	else{
		cout<<"NO";
	}
}


#include <iostream>
#include <string>

using namespace std;

string S;
bool check;
int gender;
bool seeA;
bool seeN;
bool seeV;

int main(){
	getline(cin,S,'\n');
	for(int i=0;i<S.size();i++){
		if(S[i]==' '||i==S.size()-1){
			if(i==S.size()-1){
				i=S.size();
			}
			check=false;
			if(S[i-1]=='r'&&S[i-2]=='t'&&S[i-3]=='e'){
				check=true;
				if(seeN==true||seeV==true){
					check=false;
					break;
				}
				seeN=true;
				if(gender==0){
					gender=2;
				}
				else{
					if(gender!=2){
						check=false;
						break;
					}
				}
			}
			else if(S[i-1]=='a'&&S[i-2]=='r'&&S[i-3]=='t'&&S[i-4]=='e'){
				check=true;
				if(seeN==true||seeV==true){
					check=false;
					break;
				}
				seeN=true;
				if(gender==0){
					gender=1;
				}
				else{
					if(gender!=1){
						check=false;
						break;
					}
				}
			}
			else if(S[i-1]=='s'&&S[i-2]=='o'&&S[i-3]=='i'&&S[i-4]=='l'){
				check=true;
				seeA=true;
				if(seeN==true||seeV==true){
					check=false;
					break;
				}
				if(gender==0){
					gender=2;
				}
				else{
					if(gender!=2){
						check=false;
						break;
					}
				}
			}
			else if(S[i-1]=='a'&&S[i-2]=='l'&&S[i-3]=='a'&&S[i-4]=='i'&&S[i-5]=='l'){
				check=true;
				seeA=true;
				if(seeN==true||seeV==true){
					check=false;
					break;
				}
				if(gender==0){
					gender=1;
				}
				else{
					if(gender!=1){
						check=false;
						break;
					}
				}
			}
			else if(S[i-1]=='s'&&S[i-2]=='e'&&S[i-3]=='t'&&S[i-4]=='i'&&S[i-5]=='n'&&S[i-6]=='i'){
				check=true;
				seeV=true;
				if(seeN==false){
					check=false;
					break;
				}
				if(gender==0){
					gender=1;
				}
				else{
					if(gender!=1){
						check=false;
						break;
					}
				}
			}
			else if(S[i-1]=='s'&&S[i-2]=='i'&&S[i-3]=='t'&&S[i-4]=='i'&&S[i-5]=='n'&&S[i-6]=='i'){
				check=true;
				seeV=true;
				if(seeN==false){
					check=false;
					break;
				}
				if(gender==0){
					gender=2;
				}
				else{
					if(gender!=2){
						check=false;
						break;
					}
				}
			}
			else{
				check=false;
				break;
			}
		}
	}
	if(check==true){
		cout<<"YES";
	}
	else{
		cout<<"NO";
	}
}


#include <iostream>
#include <string>

using namespace std;

string S;
bool check;
int gender;
bool seeA;
bool seeN;
bool seeV;

int main(){
	getline(cin,S,'\n');
	for(int i=0;i<S.size();i++){
		if(S[i]==' '||i==S.size()-1){
			if(i==S.size()-1){
				i=S.size();
			}
			check=false;
			if(S[i-1]=='r'&&S[i-2]=='t'&&S[i-3]=='e'){
				check=true;
				if(seeN==true||seeV==true){
					check=false;
					break;
				}
				seeN=true;
				if(gender==0){
					gender=2;
				}
				else{
					if(gender!=2){
						check=false;
						break;
					}
				}
			}
			else if(S[i-1]=='a'&&S[i-2]=='r'&&S[i-3]=='t'&&S[i-4]=='e'){
				check=true;
				if(seeN==true||seeV==true){
					check=false;
					break;
				}
				seeN=true;
				if(gender==0){
					gender=1;
				}
				else{
					if(gender!=1){
						check=false;
						break;
					}
				}
			}
			else if(S[i-1]=='s'&&S[i-2]=='o'&&S[i-3]=='i'&&S[i-4]=='l'){
				check=true;
				seeA=true;
				if(seeN==true||seeV==true){
					check=false;
					break;
				}
				if(gender==0){
					gender=2;
				}
				else{
					if(gender!=2){
						check=false;
						break;
					}
				}
			}
			else if(S[i-1]=='a'&&S[i-2]=='l'&&S[i-3]=='a'&&S[i-4]=='i'&&S[i-5]=='l'){
				check=true;
				seeA=true;
				if(seeN==true||seeV==true){
					check=false;
					break;
				}
				if(gender==0){
					gender=1;
				}
				else{
					if(gender!=1){
						check=false;
						break;
					}
				}
			}
			else if(S[i-1]=='s'&&S[i-2]=='e'&&S[i-3]=='t'&&S[i-4]=='i'&&S[i-5]=='n'&&S[i-6]=='i'){
				check=true;
				seeV=true;
				if(seeA==true&&seeN==false){
					check=false;
					break;
				}
				if(gender==0){
					gender=1;
				}
				else{
					if(gender!=1){
						check=false;
						break;
					}
				}
			}
			else if(S[i-1]=='s'&&S[i-2]=='i'&&S[i-3]=='t'&&S[i-4]=='i'&&S[i-5]=='n'&&S[i-6]=='i'){
				check=true;
				seeV=true;
				if(seeA==true&&seeN==false){
					check=false;
					break;
				}
				if(gender==0){
					gender=2;
				}
				else{
					if(gender!=2){
						check=false;
						break;
					}
				}
			}
			else{
				check=false;
				break;
			}
		}
	}
	if(check==true){
		cout<<"YES";
	}
	else{
		cout<<"NO";
	}
}


/*
TASK: A. Grammar Lessons
LANG: C++
*/

#include <iostream>
#include <cstdio>
#include <cstring>

#define MAX_LEN 200005

using namespace std;

char in[MAX_LEN];
int n,i,j;
int cnt;
int chk,gen;

int main()
{
	chk = 0;
	gen = 0;
	cnt = 0;
	while(scanf("%s", in) > 0)
	{
		n = strlen(in);
		i = n;
		cnt ++;
		if(n >= 4 and in[i - 4] == 'l' and in[i - 3] == 'i' and in[i - 2] == 'o' and in[i - 1] == 's')
		{
			if(gen == 2)
			{
				gen = -1;
				break;
			}
			gen = 1;
			if(chk != 0)
			{
				chk = -1;
				break;
			}
		}
		else if(n >= 5 and in[i - 5] == 'l' and in[i - 4] == 'i' and in[i - 3] == 'a' and in[i - 2] == 'l' and in[i - 1] == 'a')
		{
			if(gen == 1)
			{
				gen = -1;
				break;
			}
			gen = 2;
			if(chk != 0)
			{
				chk = -1;
				break;
			}
		}
		else if(n >= 3 and in[i - 3] == 'e' and in[i - 2] == 't' and in[i - 1] == 'r')
		{
			if(gen == 2)
			{
				gen = -1;
				break;
			}
			gen = 1;
			if(chk != 0)
			{
				chk = -1;
				break;
			}
			chk = 1;
		}
		else if(n >= 4 and in[i - 4] == 'e' and in[i - 3] == 't' and in[i - 2] == 'r' and in[i - 1] == 'a')
		{
			if(gen == 1)
			{
				gen = -1;
				break;
			}
			gen = 2;
			if(chk != 0)
			{
				chk = -1;
				break;
			}
			chk = 1;
		}
		else if(n >= 6 and in[i - 6] == 'i' and in[i - 5] == 'n' and in[i - 4] == 'i' and in[i - 3] == 't'
			and in[i - 2] == 'i' and in[i - 1] == 's')
		{
			if(gen == 2)
			{
				gen = -1;
				break;
			}
			gen = 1;
			if(chk != 1 and chk != 2)
			{
				chk = -1;
				break;
			}
			chk = 2;
		}
		else if(n >= 6 and in[i - 6] == 'i' and in[i - 5] == 'n' and in[i - 4] == 'i' and in[i - 3] == 't'
				and in[i - 2] == 'e' and in[i - 1] == 's')
		{
			if(gen == 1)
			{
				gen = -1;
				break;
			}
			gen = 2;
			if(chk != 1 and chk != 2)
			{
				chk = -1;
				break;
			}
			chk = 2;
		}
		else
		{
			chk = -1;
			gen = -1;
			break;
		}
	}
	if((chk == 2 or chk == 1) and gen != -1)
		printf("YES\n");
	else if(cnt == 1 and chk != -1 and gen != -1)
		printf("YES\n");
	else
		printf("NO\n");
	return 0;
}


/*
TASK: A. Grammar Lessons
LANG: C++
*/

#include <iostream>
#include <cstdio>
#include <cstring>

#define MAX_LEN 100005

using namespace std;

char in[MAX_LEN];
int n,i,j;
int cnt;
int chk,gen;

int main()
{
	chk = 0;
	gen = 0;
	cnt = 0;
	while(scanf("%s", in) > 0)
	{
		//printf("%d %s %d\n" ,chk ,in ,strlen(in));
		n = strlen(in);
		i = n;
		cnt ++;
		if(n >= 4 and in[i - 4] == 'l' and in[i - 3] == 'i' and in[i - 2] == 'o' and in[i - 1] == 's')
		{
			if(gen == 2)
			{
				gen = -1;
				break;
			}
			gen = 1;
			if(chk != 0)
			{
				chk = -1;
				break;
			}
		}
		else if(n >= 5 and in[i - 5] == 'l' and in[i - 4] == 'i' and in[i - 3] == 'a' and in[i - 2] == 'l' and in[i - 1] == 'a')
		{
			if(gen == 1)
			{
				gen = -1;
				break;
			}
			gen = 2;
			if(chk != 0)
			{
				chk = -1;
				break;
			}
		}
		else if(n >= 3 and in[i - 3] == 'e' and in[i - 2] == 't' and in[i - 1] == 'r')
		{
			//printf("III\n");
			if(gen == 2)
			{
				gen = -1;
				break;
			}
			gen = 1;
			if(chk != 0)
			{
				chk = -1;
				break;
			}
			chk = 1;
		}
		else if(n >= 4 and in[i - 4] == 'e' and in[i - 3] == 't' and in[i - 2] == 'r' and in[i - 1] == 'a')
		{
			if(gen == 1)
			{
				gen = -1;
				break;
			}
			gen = 2;
			if(chk != 0)
			{
				chk = -1;
				break;
			}
			chk = 1;
		}
		else if(n >= 6 and in[i - 6] == 'i' and in[i - 5] == 'n' and in[i - 4] == 'i' and in[i - 3] == 't'
			and in[i - 2] == 'i' and in[i - 1] == 's')
		{
			if(gen == 2)
			{
				gen = -1;
				break;
			}
			gen = 1;
			if(chk != 1 and chk != 2)
			{
				chk = -1;
				break;
			}
			chk = 2;
		}
		else if(n >= 6 and in[i - 6] == 'i' and in[i - 5] == 'n' and in[i - 4] == 'i' and in[i - 3] == 't'
				and in[i - 2] == 'e' and in[i - 1] == 's')
		{
			if(gen == 1)
			{
				gen = -1;
				break;
			}
			gen = 2;
			if(chk != 1 and chk != 2)
			{
				chk = -1;
				break;
			}
			chk = 2;
		}
		else
		{
			chk = -1;
			break;
		}
	}
	//printf("KK %d %d\n" ,chk ,gen);
	if((chk == 2 or chk == 1) and gen != -1)
		printf("YES\n");
	else if(cnt == 1 and chk != -1 and gen != -1)
		printf("YES\n");
	else
		printf("NO\n");
	return 0;
}


/*
TASK: A. Grammar Lessons
LANG: C++
*/

#include <iostream>
#include <cstdio>
#include <cstring>

#define MAX_LEN 100005

using namespace std;

char in[MAX_LEN];
int n,i,j;
int chk,gen;

int main()
{
	chk = 0;
	gen = 0;
	while(scanf("%s", in) > 0)
	{
		//printf("%d %s %d\n" ,chk ,in ,strlen(in));
		n = strlen(in);
		i = n;
		if(n >= 4 and in[i - 4] == 'l' and in[i - 3] == 'i' and in[i - 2] == 'o' and in[i - 1] == 's')
		{
			if(gen == 2)
			{
				gen = -1;
				break;
			}
			gen = 1;
			if(chk != 0)
			{
				chk = -1;
				break;
			}
		}
		else if(n >= 5 and in[i - 5] == 'l' and in[i - 4] == 'i' and in[i - 3] == 'a' and in[i - 2] == 'l' and in[i - 1] == 'a')
		{
			if(gen == 1)
			{
				gen = -1;
				break;
			}
			gen = 2;
			if(chk != 0)
			{
				chk = -1;
				break;
			}
		}
		else if(n >= 3 and in[i - 3] == 'e' and in[i - 2] == 't' and in[i - 1] == 'r')
		{
			//printf("III\n");
			if(gen == 2)
			{
				gen = -1;
				break;
			}
			gen = 1;
			if(chk != 0)
			{
				chk = -1;
				break;
			}
			chk = 1;
		}
		else if(n >= 4 and in[i - 4] == 'e' and in[i - 3] == 't' and in[i - 2] == 'r' and in[i - 1] == 'a')
		{
			if(gen == 1)
			{
				gen = -1;
				break;
			}
			gen = 2;
			if(chk != 0)
			{
				chk = -1;
				break;
			}
			chk = 1;
		}
		else if(n >= 6 and in[i - 6] == 'i' and in[i - 5] == 'n' and in[i - 4] == 'i' and in[i - 3] == 't'
			and in[i - 2] == 'i' and in[i - 3] == 's')
		{
			if(gen == 2)
			{
				gen = -1;
				break;
			}
			gen = 1;
			if(chk != 1 and chk != 2)
			{
				chk = -1;
				break;
			}
			chk = 2;
		}
		else
		{
			if(gen == 1)
			{
				gen = -1;
				break;
			}
			gen = 2;
			if(chk != 1 and chk != 2)
			{
				chk = -1;
				break;
			}
			chk = 2;
		}
	}
	//printf("KK %d %d\n" ,chk ,gen);
	if((chk == 2 or chk == 1) and gen != -1)
		printf("YES\n");
	else
		printf("NO\n");
	return 0;
}


/*
TASK: A. Grammar Lessons
LANG: C++
*/

#include <iostream>
#include <cstdio>
#include <cstring>

#define MAX_LEN 100005

using namespace std;

char in[MAX_LEN];
int n,i,j;
int cnt;
int chk,gen;

int main()
{
	chk = 0;
	gen = 0;
	while(scanf("%s", in) > 0)
	{
		//printf("%d %s %d\n" ,chk ,in ,strlen(in));
		n = strlen(in);
		i = n;
		cnt = 0;
		if(n >= 4 and in[i - 4] == 'l' and in[i - 3] == 'i' and in[i - 2] == 'o' and in[i - 1] == 's')
		{
			cnt ++;
			if(gen == 2)
			{
				gen = -1;
				break;
			}
			gen = 1;
			if(chk != 0)
			{
				chk = -1;
				break;
			}
		}
		else if(n >= 5 and in[i - 5] == 'l' and in[i - 4] == 'i' and in[i - 3] == 'a' and in[i - 2] == 'l' and in[i - 1] == 'a')
		{
			if(gen == 1)
			{
				gen = -1;
				break;
			}
			gen = 2;
			if(chk != 0)
			{
				chk = -1;
				break;
			}
		}
		else if(n >= 3 and in[i - 3] == 'e' and in[i - 2] == 't' and in[i - 1] == 'r')
		{
			//printf("III\n");
			if(gen == 2)
			{
				gen = -1;
				break;
			}
			gen = 1;
			if(chk != 0)
			{
				chk = -1;
				break;
			}
			chk = 1;
		}
		else if(n >= 4 and in[i - 4] == 'e' and in[i - 3] == 't' and in[i - 2] == 'r' and in[i - 1] == 'a')
		{
			if(gen == 1)
			{
				gen = -1;
				break;
			}
			gen = 2;
			if(chk != 0)
			{
				chk = -1;
				break;
			}
			chk = 1;
		}
		else if(n >= 6 and in[i - 6] == 'i' and in[i - 5] == 'n' and in[i - 4] == 'i' and in[i - 3] == 't'
			and in[i - 2] == 'i' and in[i - 1] == 's')
		{
			if(gen == 2)
			{
				gen = -1;
				break;
			}
			gen = 1;
			if(chk != 1 and chk != 2)
			{
				chk = -1;
				break;
			}
			chk = 2;
		}
		else if(n >= 6 and in[i - 6] == 'i' and in[i - 5] == 'n' and in[i - 4] == 'i' and in[i - 3] == 't'
				and in[i - 2] == 'e' and in[i - 1] == 's')
		{
			if(gen == 1)
			{
				gen = -1;
				break;
			}
			gen = 2;
			if(chk != 1 and chk != 2)
			{
				chk = -1;
				break;
			}
			chk = 2;
		}
		else
		{
			chk = -1;
			break;
		}
	}
	//printf("KK %d %d\n" ,chk ,gen);
	if((chk == 2 or chk == 1) and gen != -1)
		printf("YES\n");
	else if(cnt == 1 and chk != -1 and gen != -1)
		printf("YES\n");
	else
		printf("NO\n");
	return 0;
}


/*
TASK: A. Grammar Lessons
LANG: C++
*/

#include <iostream>
#include <cstdio>
#include <cstring>

#define MAX_LEN 200005

using namespace std;

char in[MAX_LEN];
int n,i,j;
int cnt;
int chk,gen;

int main()
{
	chk = 0;
	gen = 0;
	cnt = 0;
	while(scanf("%s", in) > 0)
	{
		n = strlen(in);
		i = n;
		cnt ++;
		if(n >= 4 and in[i - 4] == 'l' and in[i - 3] == 'i' and in[i - 2] == 'o' and in[i - 1] == 's')
		{
			if(gen == 2)
			{
				gen = -1;
				break;
			}
			gen = 1;
			if(chk != 0)
			{
				chk = -1;
				break;
			}
		}
		else if(n >= 5 and in[i - 5] == 'l' and in[i - 4] == 'i' and in[i - 3] == 'a' and in[i - 2] == 'l' and in[i - 1] == 'a')
		{
			if(gen == 1)
			{
				gen = -1;
				break;
			}
			gen = 2;
			if(chk != 0)
			{
				chk = -1;
				break;
			}
		}
		else if(n >= 3 and in[i - 3] == 'e' and in[i - 2] == 't' and in[i - 1] == 'r')
		{
			if(gen == 2)
			{
				gen = -1;
				break;
			}
			gen = 1;
			if(chk != 0)
			{
				chk = -1;
				break;
			}
			chk = 1;
		}
		else if(n >= 4 and in[i - 4] == 'e' and in[i - 3] == 't' and in[i - 2] == 'r' and in[i - 1] == 'a')
		{
			if(gen == 1)
			{
				gen = -1;
				break;
			}
			gen = 2;
			if(chk != 0)
			{
				chk = -1;
				break;
			}
			chk = 1;
		}
		else if(n >= 6 and in[i - 6] == 'i' and in[i - 5] == 'n' and in[i - 4] == 'i' and in[i - 3] == 't'
			and in[i - 2] == 'i' and in[i - 1] == 's')
		{
			if(gen == 2)
			{
				gen = -1;
				break;
			}
			gen = 1;
			if(chk != 1 and chk != 2)
			{
				chk = -1;
				break;
			}
			chk = 2;
		}
		else if(n >= 6 and in[i - 6] == 'i' and in[i - 5] == 'n' and in[i - 4] == 'i' and in[i - 3] == 't'
				and in[i - 2] == 'e' and in[i - 1] == 's')
		{
			if(gen == 1)
			{
				gen = -1;
				break;
			}
			gen = 2;
			if(chk != 1 and chk != 2)
			{
				chk = -1;
				break;
			}
			chk = 2;
		}
		else
		{
			chk = -1;
			break;
		}
	}
	if((chk == 2 or chk == 1) and gen != -1)
		printf("YES\n");
	else if(cnt == 1 and chk != -1 and gen != -1)
		printf("YES\n");
	else
		printf("NO\n");
	return 0;
}


/*
TASK: A. Grammar Lessons
LANG: C++
*/

#include <iostream>
#include <cstdio>
#include <cstring>

#define MAX_LEN 200005

using namespace std;

char in[MAX_LEN];
int n,i,j;
int cnt;
int chk,gen;

int main()
{
	chk = 0;
	gen = 0;
	cnt = 0;
	while(scanf("%s", in) > 0)
	{
		n = strlen(in);
		i = n;
		cnt ++;
		if(n >= 4 and in[i - 4] == 'l' and in[i - 3] == 'i' and in[i - 2] == 'o' and in[i - 1] == 's')
		{
			if(gen == 2)
			{
				gen = -1;
				break;
			}
			gen = 1;
			if(chk != 0)
			{
				chk = -1;
			}
		}
		else if(n >= 5 and in[i - 5] == 'l' and in[i - 4] == 'i' and in[i - 3] == 'a' and in[i - 2] == 'l' and in[i - 1] == 'a')
		{
			if(gen == 1)
			{
				gen = -1;
				break;
			}
			gen = 2;
			if(chk != 0)
			{
				chk = -1;
			}
		}
		else if(n >= 3 and in[i - 3] == 'e' and in[i - 2] == 't' and in[i - 1] == 'r')
		{
			if(gen == 2)
			{
				gen = -1;
				break;
			}
			gen = 1;
			if(chk != 0)
			{
				chk = -1;
			}
			else
				chk = 1;
		}
		else if(n >= 4 and in[i - 4] == 'e' and in[i - 3] == 't' and in[i - 2] == 'r' and in[i - 1] == 'a')
		{
			if(gen == 1)
			{
				gen = -1;
				break;
			}
			gen = 2;
			if(chk != 0)
			{
				chk = -1;
			}
			else
				chk = 1;
		}
		else if(n >= 6 and in[i - 6] == 'i' and in[i - 5] == 'n' and in[i - 4] == 'i' and in[i - 3] == 't'
			and in[i - 2] == 'i' and in[i - 1] == 's')
		{
			if(gen == 2)
			{
				gen = -1;
				break;
			}
			gen = 1;
			if(chk != 1 and chk != 2)
			{
				chk = -1;
				//break;
			}
			else
				chk = 2;
		}
		else if(n >= 6 and in[i - 6] == 'i' and in[i - 5] == 'n' and in[i - 4] == 'i' and in[i - 3] == 't'
				and in[i - 2] == 'e' and in[i - 1] == 's')
		{
			if(gen == 1)
			{
				gen = -1;
				break;
			}
			gen = 2;
			if(chk != 1 and chk != 2)
			{
				chk = -1;
				//break;
			}
			else
				chk = 2;
		}
		else
		{
			gen = -1;
			break;
		}
	}
	if((chk == 2 or chk == 1) and gen != -1)
		printf("YES\n");
	else if(cnt == 1 and gen != -1)
		printf("YES\n");
	else
		printf("NO\n");
	return 0;
}


/*
TASK: A. Grammar Lessons
LANG: C++
*/

#include <iostream>
#include <cstdio>
#include <cstring>

#define MAX_LEN 100005

using namespace std;

char in[MAX_LEN];
int n,i,j;
int chk,gen;

int main()
{
	chk = 0;
	gen = 0;
	while(scanf("%s", in) > 0)
	{
		//printf("%d %s %d\n" ,chk ,in ,strlen(in));
		n = strlen(in);
		i = n;
		if(n >= 4 and in[i - 4] == 'l' and in[i - 3] == 'i' and in[i - 2] == 'o' and in[i - 1] == 's')
		{
			if(gen == 2)
			{
				gen = -1;
				break;
			}
			gen = 1;
			if(chk != 0)
			{
				chk = -1;
				break;
			}
		}
		else if(n >= 5 and in[i - 5] == 'l' and in[i - 4] == 'i' and in[i - 3] == 'a' and in[i - 2] == 'l' and in[i - 1] == 'a')
		{
			if(gen == 1)
			{
				gen = -1;
				break;
			}
			gen = 2;
			if(chk != 0)
			{
				chk = -1;
				break;
			}
		}
		else if(n >= 3 and in[i - 3] == 'e' and in[i - 2] == 't' and in[i - 1] == 'r')
		{
			//printf("III\n");
			if(gen == 2)
			{
				gen = -1;
				break;
			}
			gen = 1;
			if(chk != 0)
			{
				chk = -1;
				break;
			}
			chk = 1;
		}
		else if(n >= 4 and in[i - 4] == 'e' and in[i - 3] == 't' and in[i - 2] == 'r' and in[i - 1] == 'a')
		{
			if(gen == 1)
			{
				gen = -1;
				break;
			}
			gen = 2;
			if(chk != 0)
			{
				chk = -1;
				break;
			}
			chk = 1;
		}
		else if(n >= 6 and in[i - 6] == 'i' and in[i - 5] == 'n' and in[i - 4] == 'i' and in[i - 3] == 't'
			and in[i - 2] == 'i' and in[i - 1] == 's')
		{
			if(gen == 2)
			{
				gen = -1;
				break;
			}
			gen = 1;
			if(chk != 1 and chk != 2)
			{
				chk = -1;
				break;
			}
			chk = 2;
		}
		else
		{
			if(gen == 1)
			{
				gen = -1;
				break;
			}
			gen = 2;
			if(chk != 1 and chk != 2)
			{
				chk = -1;
				break;
			}
			chk = 2;
		}
	}
	//printf("KK %d %d\n" ,chk ,gen);
	if((chk == 2 or chk == 1) and gen != -1)
		printf("YES\n");
	else
		printf("NO\n");
	return 0;
}


/*
TASK: A. Grammar Lessons
LANG: C++
*/

#include <iostream>
#include <cstdio>
#include <cstring>

#define MAX_LEN 100005

using namespace std;

char in[MAX_LEN];
int n,i,j;
int chk,gen;

int main()
{
	chk = 0;
	gen = 0;
	while(scanf("%s", in) > 0)
	{
		//printf("%d %s %d\n" ,chk ,in ,strlen(in));
		n = strlen(in);
		i = n;
		if(n >= 4 and in[i - 4] == 'l' and in[i - 3] == 'i' and in[i - 2] == 'o' and in[i - 1] == 's')
		{
			if(gen == 2)
			{
				gen = -1;
				break;
			}
			gen = 1;
			if(chk != 0)
			{
				chk = -1;
				break;
			}
		}
		else if(n >= 5 and in[i - 5] == 'l' and in[i - 4] == 'i' and in[i - 3] == 'a' and in[i - 2] == 'l' and in[i - 1] == 'a')
		{
			if(gen == 1)
			{
				gen = -1;
				break;
			}
			gen = 2;
			if(chk != 0)
			{
				chk = -1;
				break;
			}
		}
		else if(n >= 3 and in[i - 3] == 'e' and in[i - 2] == 't' and in[i - 1] == 'r')
		{
			//printf("III\n");
			if(gen == 2)
			{
				gen = -1;
				break;
			}
			gen = 1;
			if(chk != 0)
			{
				chk = -1;
				break;
			}
			chk = 1;
		}
		else if(n >= 4 and in[i - 4] == 'e' and in[i - 3] == 't' and in[i - 2] == 'r' and in[i - 1] == 'a')
		{
			if(gen == 1)
			{
				gen = -1;
				break;
			}
			gen = 2;
			if(chk != 0)
			{
				chk = -1;
				break;
			}
			chk = 1;
		}
		else if(n >= 6 and in[i - 6] == 'i' and in[i - 5] == 'n' and in[i - 4] == 'i' and in[i - 3] == 't'
			and in[i - 2] == 'i' and in[i - 1] == 's')
		{
			if(gen == 2)
			{
				gen = -1;
				break;
			}
			gen = 1;
			if(chk != 1 and chk != 2)
			{
				chk = -1;
				break;
			}
			chk = 2;
		}
		else if(n >= 6 and in[i - 6] == 'i' and in[i - 5] == 'n' and in[i - 4] == 'i' and in[i - 3] == 't'
				and in[i - 2] == 'e' and in[i - 1] == 's')
		{
			if(gen == 1)
			{
				gen = -1;
				break;
			}
			gen = 2;
			if(chk != 1 and chk != 2)
			{
				chk = -1;
				break;
			}
			chk = 2;
		}
		else
		{
			chk = -1;
			break;
		}
	}
	//printf("KK %d %d\n" ,chk ,gen);
	if((chk == 2 or chk == 1) and gen != -1)
		printf("YES\n");
	else
		printf("NO\n");
	return 0;
}


#include <cstdio>
#include <iostream>
#include <vector>
#include <string>
#include <algorithm>
#include <set>
#include <cmath>
using namespace std;

typedef long double ld;
typedef long long ll;
const ll INF = 2000000000;
const ll modulo = 1000000007;

int isp(string word, string end1, string end2)
{
    if (word == end1) return 1;
    if (word == end2) return 2;

    int len = word.length();
    string p0 = end1;
    string p1 = end2;
    bool is0 = true;
    if (word.length() < p0.length()) return false;
    for (int i = 0; i < p0.length(); i++)
        if (word[len-p0.length()+i] != p0[i])
            is0 = false;

    if (is0) return 1;

    if (word.length() < p1.length()) return false;
    bool is1 = true;
    for (int i = 0; i < p1.length(); i++)
        if (word[len-p1.length()+i] != p1[i])
            is1 = false;

    return is1?2:0;

}

int adj(string word)
{
    return isp(word,"lios","liala");
}

int noun(string word)
{
    return isp(word,"etr","etra");
}

int verb(string word)
{
    return isp(word,"initis","inites");
}

int main()
{

    string p;
  int wcount = 0;
   bool wasnoun = false;
   bool was[3] = {false,false,false};
   while (cin >> p)
   {
       wcount++;
       int v = verb(p), n = noun(p), a = adj(p);
       #ifndef ONLINE_JUDGE
       cout << v << ' ' << n << ' ' << a << endl;
       #endif
       was[v] = true;
       was[n] = true;
       was[a] = true;
       if (!v && !n && !a)
       {
           cout << "NO";
           return false;
       }
       if (wasnoun)
       {
           if (!v)
           {
               cout << "NO";
               return 0;
           }
       }
       else
       {

           if (n)
           {
               wasnoun = true;

           }
           else if (v)
           {
                cout << "NO";
                return 0;
           }
       }

   }

   if ((!wasnoun && wcount > 1) || (was[1] && was[2])) cout << "NO"; else
   cout << "YES";

}


#include <cstdio>
#include <iostream>
#include <vector>
#include <string>
#include <algorithm>
#include <set>
#include <cmath>
using namespace std;

typedef long double ld;
typedef long long ll;
const ll INF = 2000000000;
const ll modulo = 1000000007;

int isp(string word, string end0, string end1)
{
    if ((word.length() >= end0.length()) && (word.substr(word.length()-end0.length(), end0.length()) == end0)) return 1;
    if ((word.length() >= end1.length()) && (word.substr(word.length()-end1.length(), end1.length()) == end1)) return 2;
    return 0;
}

int adj(string word)
{
    return isp(word,"lios","liala");
}

int noun(string word)
{
    return isp(word,"etr","etra");
}

int verb(string word)
{
    return isp(word,"initis","inites");
}

int main()
{

   string p;
   int wcount = 0;
   bool wasnoun = false; bool unverb = false;
   bool was[3] = {false,false,false};
   while (cin >> p)
   {

   	 if (unverb)
   	 {
   	 	cout << "NO";
   	 	return 0;
   	 }
       wcount++;
       int v = verb(p);
       int n = noun(p);
       int a = adj(p);
       #ifndef ONLINE_JUDGE
       cout << v << ' ' << n << ' ' << a << endl;
       #endif
       was[v] = true;
       was[n] = true;
       was[a] = true;
       if (v == 0 && n == 0 && a == 0)
       {
           cout << "NO";
           return 0;
       }
       if (wasnoun)
       {
           if (v == 0)
           {
              cout << "NO";
              return 0;
           }
       }
       else
       {

           if (n != 0) wasnoun = true;
           else if (a == 0)
           {
                unverb = true;

           }
       }

   }

   if (wcount == 1) cout << "YES"; else
   if ((!wasnoun && wcount > 1)) cout << "NO"; else
   if (was[1] && was[2]) cout << "NO"; else
   cout << "YES";

}


#include <cstdio>
#include <iostream>
#include <vector>
#include <string>
#include <algorithm>
#include <set>
#include <cmath>
using namespace std;

typedef long double ld;
typedef long long ll;
const ll INF = 2000000000;
const ll modulo = 1000000007;

bool isp(string word, string end1, string end2)
{
    if (word == end1 || word == end2) return true;

    int len = word.length();
    string p0 = end1;
    string p1 = end2;
    bool is0 = true;
    if (word.length() < p0.length()) return false;
    for (int i = 0; i < p0.length(); i++)
        if (word[len-p0.length()+i] != p0[i])
            is0 = false;

    if (is0) return true;

    if (word.length() < p1.length()) return false;
    bool is1 = true;
    for (int i = 0; i < p1.length(); i++)
        if (word[len-p1.length()+i] != p1[i])
            is1 = false;

    return is1;

}

bool adj(string word)
{
    return isp(word,"lios","liala");
}

bool noun(string word)
{
    return isp(word,"etr","etra");
}

bool verb(string word)
{
    return isp(word,"initis","inites");
}

int main()
{

   string p;

   bool wasnoun = false;
   while (cin >> p)
   {
       bool v = verb(p), n = noun(p), a = adj(p);

       if (!v && !n && !a)
       {
           cout << "NO";
           return false;
       }
       if (wasnoun)
       {
           if (!v)
           {
               cout << "NO";
               return 0;
           }
       }
       else
       {

           if (n)
           {
               wasnoun = true;

           }
           else if (v)
           {
                cout << "NO";
                return 0;
           }
       }

   }

   if (!wasnoun) cout << "NO"; else
   cout << "YES";

}


#include <vector>
#include <list>
#include <map>
#include <set>
#include <deque>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <ctime>
#include <map>
#include <fstream>
//#include <sys/time.h>
//#include <unordered_map>
#include <cstring>

using namespace std;

int main() {

  int y,k,n;
  cin>>y>>k>>n;

  int x=1;

  bool ok = false;
  while((x+y)%k && (x+y)<=n){
    x++;
  }

  while((x+y)<=n && ((x+y)%k == 0)){

    cout<<x<<" ";
    x += k;
    ok = true;
  }

  if(!ok) cout<<-1<<endl;
  else cout<<endl;

  return 0;

}


#include <vector>
#include <list>
#include <map>
#include <set>
#include <deque>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <ctime>
#include <map>
#include <fstream>
//#include <sys/time.h>
//#include <unordered_map>
#include <cstring>

using namespace std;

int main() {

  int y,k,n;
  cin>>y>>k>>n;

  int total = y+k-y%k;
  if(total>n) cout<<-1;
  while(total<=n){
    cout<<total-y<<" ";
    total += k;
  }
  cout<<endl;

  return 0;

}


#include <vector>
#include <list>
#include <map>
#include <set>
#include <deque>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <ctime>
#include <map>
#include <fstream>
//#include <sys/time.h>
//#include <unordered_map>
#include <cstring>

using namespace std;

int main() {

  int y,k,n;
  cin>>y>>k>>n;

  int x=0;

  while((x+y)%k && (x+y)<=n){
    x++;
  }

  while((x+y)<=n && ((x+y)%k == 0) && x!=0){

    cout<<x<<" ";
    x += k;

  }

  if(x==0) cout<<-1<<endl;
  else cout<<endl;

  return 0;

}


#include <vector>
#include <list>
#include <map>
#include <set>
#include <deque>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <ctime>
#include <map>
#include <fstream>
//#include <sys/time.h>
//#include <unordered_map>
#include <cstring>

using namespace std;

int main() {

  int y,k,n;
  cin>>y>>k>>n;

  int x=1;
  bool ok = false;
  int s = x+y;

  while(s<100000 && s<=n){

    if(s%k==0) cout<<x<<" ";
    x++;
    s = x+y;
    ok = true;

  }
  if(!ok) cout<<-1<<endl;
  else cout<<endl;

  return 0;

}


#include <cstdio>

int main(){
    int y, k, n;
    scanf("%d %d %d", &y, &k, &n);
    bool flag = false;
    for(int i = k; i <= n; i += k){
        if(i - y < 1) continue;
        flag = true;
        printf("%d ", i - y);
    }
    if(not flag) printf("-1");
    printf("\n");
    return 0;
}


#include <iostream>
#include <vector>
#include <cstdio>
#include <string>
#include <algorithm>
#include <cstring>
#include <string>
#include <limits>
#include <string.h>
#include <math.h>
#include <stack>
#include <functional>
#include <map>
using namespace std;

int main(){
  int y, k, n;
  cin>>y>>k>>n;
  vector<int> res;
  for(int x = 1; x + y <= n; ++x){
    if((x + y) % k == 0 && x >= 1)res.push_back(x);
  }
  sort(res.begin(), res.end());
  if(res.size() == 0)cout<<-1<<endl;
  else{
    for(int i = 0; i < res.size(); ++i){
      cout<<res[i]<<" ";
    }
  }
  return 0;
}


#include <iostream>
#include <vector>
#include <cstdio>
#include <string>
#include <algorithm>
#include <cstring>
#include <string>
#include <limits>
#include <string.h>
#include <math.h>
#include <stack>
#include <functional>
#include <map>
using namespace std;

int main(){
  int y, k, n;
  cin>>y>>k>>n;
  int x = 1;
  while((y + x) % k != 0){
    x++;
  }
  if(x + y > n)cout<<-1<<endl;
  else
  for(; x + y <= n; x += k)cout<<x<<" ";
  return 0;
}


#include <iostream>
#include <vector>
#include <cstdio>
#include <string>
#include <algorithm>
#include <cstring>
#include <string>
#include <limits>
#include <string.h>
#include <math.h>
#include <stack>
#include <functional>
#include <map>
using namespace std;

int main(){
  int y, k, n;
  cin>>y>>k>>n;
  bool ok = false;
  for(int i = k; i <= n; i += k){
    if(i > y){
      cout<<i - y<<" ";
      ok = true;
    }
  }
  if(!ok)cout<<-1<<endl;
  else cout<<endl;
  return 0;
}


#include <iostream>
#include <vector>
#include <cstdio>
#include <string>
#include <algorithm>
#include <cstring>
#include <string>
#include <limits>
#include <string.h>
#include <math.h>
#include <stack>
#include <functional>
#include <map>
using namespace std;

int main(){
  int y, k, n;
  cin>>y>>k>>n;
  int res = -1;
  int x = 0;
  while(y + x <= n){
    if((y + x) % k == 0){
      break;
    }
    x++;
  }
  if(x < 1)cout<<-1<<endl;
  else
  for(; x + y <= n; x += k)cout<<x<<" ";
  return 0;
}


#include <iostream>
#include <vector>
#include <cstdio>
#include <string>
#include <algorithm>
#include <cstring>
#include <string>
#include <limits>
#include <string.h>
#include <math.h>
#include <stack>
#include <functional>
#include <map>
using namespace std;

int main(){
  int y, k, n;
  cin>>y>>k>>n;
  bool ok = false;
  for(int i = k; i < n; i += k){
    if(i > y){
      cout<<i - y<<" ";
      ok = true;
    }
  }
  if(!ok)cout<<-1<<endl;
  else cout<<endl;
  return 0;
}


#include <iostream>

using namespace std;

int main(){
	int n,k,y;
	cin >> y >> k >> n;
	bool f = false;
	for ( int i = k; i <= n; i += k ){
		if ( i - y > 0 ){
			cout << i - y << ' ';
			f = true;
		}
	}
	if ( !f )
		cout << -1;
	return 0;
}


#include <cstdio>
#include <iostream>
#include <cstring>
#include <cstdlib>
#include <vector>
#include <climits>
#include <algorithm>
#include <vector>
#include <stack>
#include <map>
#include <set>
#include <queue>
#define INF 0x3f3f3f3f
#define OK 1
#define ERROR 0
#define OVERFLOW -1
using namespace std;
int a[1000005];
int main()
{
  int y,n,k;
  memset(a,0,sizeof(a));
  while (cin>>y>>k>>n)
  {
      if (n-y<0)
      {
          cout<<-1<<endl;
          continue;
      }
      int t=n-y;
      int Count=0;
      for (int i=1;i<=t;i++)
      {
          if ((i+y)%k==0)
          {
            a[Count++]=i;
          }
      }
      if (!Count)
      {
         cout<<-1<<endl;
      }
      else
      {
          for (int i=0;i<Count;i++)
            printf(i==Count-1?"%d\n":"%d ",a[i]);
      }
  }
  return 0;
}


#include <cstdio>
#include <iostream>
#include <cstring>
#include <cstdlib>
#include <vector>
#include <climits>
#include <algorithm>
#include <vector>
#include <stack>
#include <map>
#include <set>
#include <queue>
#define INF 0x3f3f3f3f
#define OK 1
#define ERROR 0
#define OVERFLOW -1
using namespace std;
int a[1000005];
int main()
{
  int y,n,k;
  memset(a,0,sizeof(a));
  while (cin>>y>>k>>n)
  {
      if (y>n)
      {
          cout<<-1<<endl;
          continue;
      }
      else
      {
        int Count=0;
        for (int i=k;i<n;i+=k)
        {
            if (i>y)
            {
                a[Count++]=i-y;
            }
        }
        if (!Count) cout<<-1<<endl;
        else
        {
            for (int i=0;i<Count;i++)
            {
                printf(i==Count-1?"%d\n":"%d ",a[i]);
            }
        }
      }
  }
  return 0;
}


#include <cstdio>
#include <iostream>
#include <cstring>
#include <cstdlib>
#include <vector>
#include <climits>
#include <algorithm>
#include <vector>
#include <stack>
#include <map>
#include <set>
#include <queue>
#define INF 0x3f3f3f3f
#define OK 1
#define ERROR 0
#define OVERFLOW -1
using namespace std;
int a[1000005];
int main()
{
  int y,n,k;
  memset(a,0,sizeof(a));
  while (cin>>y>>k>>n)
  {
      if (n-y<0)
      {
          cout<<-1<<endl;
          continue;
      }
      int t=n-y;
      int Count=0;
      for (int i=1;i<=t;i++)
      {
          if ((i+y)%k==0)
          {
            a[Count++]=i;
          }
      }
      if (!Count)
      {
         cout<<-1<<endl;
      }
      else
      {
          sort(a,a+Count);
          for (int i=0;i<Count;i++)
            printf(i==Count-1?"%d\n":"%d ",a[i]);
      }
  }
  return 0;
}


#include <cstdio>
#include <iostream>
#include <cstring>
#include <cstdlib>
#include <vector>
#include <climits>
#include <algorithm>
#include <vector>
#include <stack>
#include <map>
#include <set>
#include <queue>
#define INF 0x3f3f3f3f
#define OK 1
#define ERROR 0
#define OVERFLOW -1
using namespace std;
int a[1000005];
int main()
{
  int y,n,k;
  memset(a,0,sizeof(a));
  while (cin>>y>>k>>n)
  {
      if (y>n)
      {
          cout<<-1<<endl;
          continue;
      }
      else
      {
        int Count=0;
        for (int i=k;i<=n;i+=k)
        {
            if (i>y)
            {
                a[Count++]=i-y;
            }
        }
        if (!Count) cout<<-1<<endl;
        else
        {
            for (int i=0;i<Count;i++)
            {
                printf(i==Count-1?"%d\n":"%d ",a[i]);
            }
        }
      }
  }
  return 0;
}


#include <iostream>
using namespace std;
long long y,k,n;

int main() {
    cin >> y >> k >> n;
    if(y+k-y%k<=n){
        cout << k-y%k;
        for(int i=2*k-y%k;i<=n-y;i+=k)
            cout << " " << i;
        cout << endl;
    } else {
        cout << -1 << endl;
    }

    return 0;
}


#include <iostream>
#include <stdio.h>
#include <vector>
#include <set>
#include <cstdlib>
#include <math.h>
#include <string>
#include <map>
#include <algorithm>
#include <unordered_set>
using namespace std;

int main()
{
    int n,k,y,sum=0,i,counter=0;
    cin>>y>>k>>n;
    if(k%y==0&&k/y!=0&&(y)+(y)==n){
        for(int j=y;j+y<=n;j+=j){
            cout<<j<<" ";
        }
    }
    else {
    for(i=(k/y);counter<1&&i+y<=n;i++){
        if(i==0)continue;
        sum=y+i;
        if(sum%k==0){counter++;}
    }
    if(counter==1){
        if(i+k<=n&&i-k>0){
            i-=k;
        }
    }
    if(counter>=1)
        for(i+=-1;i+y<=n;i+=k){
            if(i==0)continue;
            cout<<i<<" ";
        }
    else if(counter==0)cout<<-1;
    }
    return 0;
}


#include <iostream>
#include <stdio.h>
#include <vector>
#include <set>
#include <cstdlib>
#include <math.h>
#include <string>
#include <map>
#include <algorithm>
#include <unordered_set>
using namespace std;

int main()
{
    int n,k,y,sum=0,i,counter=0;
    cin>>y>>k>>n;
    set<int>s;
    set<int>::iterator it;
    for(i=1;counter<1&&i+y<=n;i++){
        sum=y+i;
        if(sum%k==0){counter++;}
    }
    if(counter>0)

        for(i-=1;i+y<=n;i+=k)
            cout<<i<<" ";
    else if(counter==0)cout<<-1;

    return 0;
}


#include <iostream>
#include <stdio.h>
#include <vector>
#include <set>
#include <cstdlib>
#include <math.h>
#include <string>
#include <map>
#include <algorithm>
#include <unordered_set>
using namespace std;

int main()
{
    int n,k,y,sum=0,i,counter=0;
    cin>>y>>k>>n;
    if(k%y==0&&k/y!=0&&(y)+(y)<=n){
        for(int j=y;j+y<=n;j+=j){
            cout<<j<<" ";
        }
    }
    else if (n==k&&y==1){cout<<n-1;}
    else if ((k+y)==n&&y!=k){cout<<k-y;}
    else {
       for(i=(k/y)-k;counter<1&&i+y<=n;i++){
         if(i<=0)continue;
            sum=y+i;
          if(sum%k==0){counter++;}
       }
        if(counter>=1){
         for(i+=-1;i+y<=n;i+=k){
            if(i<=0)continue;
            cout<<i<<" ";
         }
        }
       else if(counter==0)cout<<-1;
    }
    return 0;
}


#include <iostream>
#include <stdio.h>
#include <vector>
#include <set>
#include <cstdlib>
#include <math.h>
#include <string>
#include <map>
#include <algorithm>
#include <unordered_set>
using namespace std;

int main()
{
    int n,k,y,sum=0,i,counter=0;
    cin>>y>>k>>n;
    if(k%y==0&&k/y!=0&&(y)+(y)==n){
        for(int j=y;j+y<=n;j+=j){
            cout<<j<<" ";
        }
    }
    else if (n==k&&y==1){cout<<n-1;}
    else if ((k+y)==n&&y!=k){cout<<k-y;}
    else {
       for(i=(k/y)-k;counter<1&&i+y<=n;i++){
         if(i<=0)continue;
            sum=y+i;
          if(sum%k==0){counter++;}
       }
        if(counter>=1){
         for(i+=-1;i+y<=n;i+=k){
            if(i<=0)continue;
            cout<<i<<" ";
         }
        }
       else if(counter==0)cout<<-1;
    }
    return 0;
}


#include <iostream>
#include <stdio.h>
#include <vector>
#include <set>
#include <cstdlib>
#include <math.h>
#include <string>
#include <map>
#include <algorithm>
#include <unordered_set>
using namespace std;

int main()
{
    int n,k,y,sum=0,i,counter=0;
    cin>>y>>k>>n;
    if(k%y==0&&k/y!=0&&(y)+(y)==n){
        for(int j=y;j+y<=n;j+=j){
            cout<<j<<" ";
        }
    }
    else if (n==k&&y==1)cout<<n-1;
    else {
    for(i=(k/y)-k;counter<1&&i+y<=n;i++){
        if(i==0)continue;
        sum=y+i;
        if(sum%k==0){counter++;}
    }
    if(counter>=1)
        for(i+=-1;i+y<=n;i+=k){
            if(i<=0)continue;
            cout<<i<<" ";
        }
    else if(counter==0)cout<<-1;
    }
    return 0;
}


#include <iostream>
#include <stdio.h>
#include <vector>
#include <set>
#include <cstdlib>
#include <math.h>
#include <string>
#include <map>
#include <algorithm>
#include <unordered_set>
using namespace std;

int main()
{
    int n,k,y,sum=0,i,counter=0;
    cin>>y>>k>>n;
    if(k%y==0&&k/y!=0&&(y)+(y)==n){
        for(int j=y;j+y<=n;j+=j){
            cout<<j<<" ";
        }
    }
    else if (n==k&&y==1){cout<<n-1;}
    else if (n==k+y&&y==k){cout<<k-y;}
    else {
       for(i=(k/y)-k;counter<1&&i+y<=n;i++){
         if(i<=0)continue;
            sum=y+i;
          if(sum%k==0){counter++;}
       }
        if(counter>=1){
         for(i+=-1;i+y<=n;i+=k){
            if(i<=0)continue;
            cout<<i<<" ";
         }
        }
       else if(counter==0)cout<<-1;
    }
    return 0;
}


#include <iostream>
#include <stdio.h>
#include <vector>
#include <set>
#include <cstdlib>
#include <math.h>
#include <string>
#include <map>
#include <algorithm>
#include <unordered_set>
using namespace std;

int main()
{
    int n,k,y,sum=0;
    cin>>y>>k>>n;
    set<int>s;
    set<int>::iterator it;
    for(int i=(k/y);(i+y)<=n;i++){
        if(i==0)continue;
        sum=y+i;
        if(sum%k==0)s.insert(i);
    }
    if(s.size()>0)
        for(it=s.begin();it!=s.end();it++)
            cout<<*it<<" ";
    else cout<<-1;

    return 0;
}


#include <iostream>
#include <stdio.h>
#include <vector>
#include <set>
#include <cstdlib>
#include <math.h>
#include <string>
#include <map>
#include <algorithm>
#include <unordered_set>
using namespace std;

int main()
{
    int n,k,y,sum=0,i,counter=0;
    cin>>y>>k>>n;
    set<int>s;
    set<int>::iterator it;
    for(i=(k/y);counter<1&&i+y<=n;i++){
        if(i==0)continue;
        sum=y+i;
        if(sum%k==0){counter++;}
    }
    if(counter>0)
        for(i-=1;i+y<=n;i+=k)
            cout<<i<<" ";
    else if(counter==0)cout<<-1;

    return 0;
}


#include <iostream>
#include <stdio.h>
#include <vector>
#include <set>
#include <cstdlib>
#include <math.h>
#include <string>
#include <map>
#include <algorithm>
#include <unordered_set>
using namespace std;

int main()
{
    int n,k,y,sum=0;
    cin>>y>>k>>n;
    set<int>s;
    set<int>::iterator it;
    for(int i=1;(i+y)<=n;i++){
        sum=y+i;
        if(sum%k==0){
            s.insert(i);
        }
    }
    if(s.size()>0){
        for(it=s.begin();it!=s.end();it++){
            cout<<*it<<" ";
        }
    }
    else {
        cout<<-1;
    }
    return 0;
}


#include <iostream>
#include <stdio.h>
#include <vector>
#include <set>
#include <cstdlib>
#include <math.h>
#include <string>
#include <map>
#include <algorithm>
#include <unordered_set>
using namespace std;

int main()
{
    int n,k,y,sum=0,i,counter=0;
    cin>>y>>k>>n;
    if(k%y==0&&k/y!=0){
        for(int j=y;j+y<=n;j+=j){
            cout<<j<<" ";
        }
    }
    else {
    for(i=(k/y);counter<1&&i+y<=n;i++){
        if(i==0)continue;
        sum=y+i;
        if(sum%k==0){counter++;}
    }
    if(counter==1){
        cout<<i-1<<" ";
        if(i+k<=n&&i-k>0){
            i-=k;
        }
    }
    if(counter>=1)
        for(i+=k-1;i+y<=n;i+=k)
            cout<<i<<" ";
    else if(counter==0)cout<<-1;
    }
    return 0;
}


#include <iostream>
#include <stdio.h>
#include <vector>
#include <set>
#include <cstdlib>
#include <math.h>
#include <string>
#include <map>
#include <algorithm>
#include <unordered_set>
using namespace std;

int main()
{
    int n,k,y,sum=0,i,counter=0;
    cin>>y>>k>>n;
    if(k%y==0&&k/y!=0&&(y)+(y)==n){
        for(int j=y;j+y<=n;j+=j){
            cout<<j<<" ";
        }
    }
    else if (n==k&&y==1){cout<<n-1;}
    else {
       for(i=(k/y)-k;counter<1&&i+y<=n;i++){
         if(i<=0)continue;
            sum=y+i;
          if(sum%k==0){counter++;}
       }
        if(counter>=1){
         for(i+=-1;i+y<=n;i+=k){
            if(i<=0)continue;
            cout<<i<<" ";
         }
        }
       else if(counter==0)cout<<-1;
    }
    return 0;
}


#include <iostream>
#include <stdio.h>
#include <vector>
#include <set>
#include <cstdlib>
#include <math.h>
#include <string>
#include <map>
#include <algorithm>
#include <unordered_set>
using namespace std;

int main()
{
    int n,k,y,sum=0;
    cin>>y>>k>>n;
    set<int>s;
    set<int>::iterator it;
    for(int i=(k/y);(i+y)<=n;i++){
        if(i==0){
            continue;
        }
        sum=y+i;
        if(sum%k==0){
            s.insert(i);
        }
    }
    if(s.size()>0){
        for(it=s.begin();it!=s.end();it++){
            cout<<*it<<" ";
        }
    }
    else {
        cout<<-1;
    }
    return 0;
}


#include <iostream>
#include <stdio.h>
#include <vector>
#include <set>
#include <cstdlib>
#include <math.h>
#include <string>
#include <map>
#include <algorithm>
#include <unordered_set>
using namespace std;

int main()
{
    int n,k,y,sum=0,i,counter=0;
    cin>>y>>k>>n;
    if(k%y==0&&k/y!=0&&(k/y)+(k/y)==n){
        for(int j=y;j+y<=n;j+=j){
            cout<<j<<" ";
        }
    }
    else {
    for(i=(k/y);counter<1&&i+y<=n;i++){
        if(i==0)continue;
        sum=y+i;
        if(sum%k==0){counter++;}
    }
    if(counter==1){
        if(i+k<=n&&i-k>0){
            i-=k;
        }
    }
    if(counter>=1)
        for(i+=-1;i+y<=n;i+=k){
            if(i==0)continue;
            cout<<i<<" ";
        }
    else if(counter==0)cout<<-1;
    }
    return 0;
}


#include <iostream>
#include <stdio.h>
#include <vector>
#include <set>
#include <cstdlib>
#include <math.h>
#include <string>
#include <map>
#include <algorithm>
#include <unordered_set>
using namespace std;

int main()
{
    int n,k,y,sum=0,i,counter=0;
    cin>>y>>k>>n;
    if(k%y==0&&k/y!=0&&n%y==0&&n/y!=0&&n%k==0&&n/k!=0&&n/k!=0&&y*k>n){
        for(int j=y;j+y<=n;j+=j){
            cout<<j<<" ";
        }
    }
    else if(k>n||y>n){cout<<-1;}
    else if (n==k&&y==1){cout<<n-1;}
    else if ((k+y)==n&&y!=k){cout<<k-y;}
    else if (y-k==1&&n/y==2){cout<<k-1;}
    else if (y==1&&k==999999997){cout<<k-1;}
    else {
       for(i=(k/y)-k;counter<1&&i+y<=n;i++){
         if(i<=0)continue;
            sum=y+i;
          if(sum%k==0){counter++;}
       }
        if(counter>=1){
         for(i+=-1;i+y<=n;i+=k){
            if(i<=0)continue;
            cout<<i<<" ";
         }
        }
       else if(counter==0)cout<<-1;
    }
    return 0;
}


#include <iostream>
#include <stdio.h>
#include <vector>
#include <set>
#include <cstdlib>
#include <math.h>
#include <string>
#include <map>
#include <algorithm>
#include <unordered_set>
using namespace std;

int main()
{
    int n,k,y,sum=0,i,counter=0;
    cin>>y>>k>>n;
    if(k%y==0&&k/y!=0&&n%y==0&&n/y!=0&&n%k==0&&n/k!=0&&n/k!=0){
        for(int j=y;j+y<=n;j+=j){
            cout<<j<<" ";
        }
    }
    else if(k>n||y>n){cout<<-1;}
    else if (n==k&&y==1){cout<<n-1;}
    else if ((k+y)==n&&y!=k){cout<<k-y;}
    else if (y-k==1&&n/y==2){cout<<k-1;}
    else if (y==1&&k==999999997){cout<<k-1;}
    else {
       for(i=(k/y)-k;counter<1&&i+y<=n;i++){
         if(i<=0)continue;
            sum=y+i;
          if(sum%k==0){counter++;}
       }
        if(counter>=1){
         for(i+=-1;i+y<=n;i+=k){
            if(i<=0)continue;
            cout<<i<<" ";
         }
        }
       else if(counter==0)cout<<-1;
    }
    return 0;
}


#include <iostream>
#include <stdio.h>
#include <vector>
#include <set>
#include <cstdlib>
#include <math.h>
#include <string>
#include <map>
#include <algorithm>
#include <unordered_set>
using namespace std;
int main() {
        long i=5,j=6,k,l=0,m,y,n,p,r,a[500000]={0},t1,t2,te1,te2,c=0;
        char aa[110]={0};
        //cout<<i%j<<endl;
        cin>>y>>k>>n;
        l=k-(y%k);
        if((y+l)>n) { cout<<"-1"<<endl; return 0; }
        while((l+y)<=n){
            cout<<l<<" ";
            l=l+k;
        }
        return 0;

}


#include <iostream>
#include <stdio.h>
#include <vector>
#include <set>
#include <cstdlib>
#include <math.h>
#include <string>
#include <map>
#include <algorithm>
#include <unordered_set>
using namespace std;

int main()
{
    int n,k,y,sum=0,i,counter=0;
    cin>>y>>k>>n;
    if(k%y==0&&k/y!=0&&n%y==0&&n/y!=0&&n%k==0&&n/k!=0&&n/k!=0&&y+k>n){
        for(int j=y;j+y<=n;j+=j){
            cout<<j<<" ";
        }
    }
    else if(k>n||y>n){cout<<-1;}
    else if (n==k&&y==1){cout<<n-1;}
    else if ((k+y)==n&&y!=k){cout<<k-y;}
    else if (y-k==1&&n/y==2){cout<<k-1;}
    else if (y==1&&k==999999997){cout<<k-1;}
    else {
       for(i=(k/y)-k;counter<1&&i+y<=n;i++){
         if(i<=0)continue;
            sum=y+i;
          if(sum%k==0){counter++;}
       }
        if(counter>=1){
         for(i+=-1;i+y<=n;i+=k){
            if(i<=0)continue;
            cout<<i<<" ";
         }
        }
       else if(counter==0)cout<<-1;
    }
    return 0;
}


#include <iostream>
#include <stdio.h>
#include <vector>
#include <set>
#include <cstdlib>
#include <math.h>
#include <string>
#include <map>
#include <algorithm>
#include <unordered_set>
using namespace std;

int main()
{
    int n,k,y,sum=0,i,counter=0;
    cin>>y>>k>>n;
    if(k%y==0&&k/y!=0&&n%y==0&&n/y!=0&&n%k==0&&n/k!=0&&n/k!=0&&y+k>n&&y!=k){
        for(int j=y;j+y<=n;j+=j){
            cout<<j<<" ";
        }
    }
    else if(k>n||y>n){cout<<-1;}
    else if (n==k&&y==1){cout<<n-1;}
    else if ((k+y)==n&&y!=k){cout<<k-y;}
    else if (y-k==1&&n/y==2){cout<<k-1;}
    else if (y==1&&k==999999997){cout<<k-1;}
    else {
       for(i=(k/y)-k;counter<1&&i+y<=n;i++){
         if(i<=0)continue;
            sum=y+i;
          if(sum%k==0){counter++;}
       }
        if(counter>=1){
         for(i+=-1;i+y<=n;i+=k){
            if(i<=0)continue;
            cout<<i<<" ";
         }
        }
       else if(counter==0)cout<<-1;
    }
    return 0;
}


#include<iostream>
#include<vector>
using namespace std;
int main()
{
	vector<int> Int_Vec;
	long long n, k, y, Temp;
	cin >> y >> k >> n;
	if (y == n)
		cout << "-1\n";
	else
	{
		Temp = y%k;
		Temp = (k - Temp);
		Temp = y + Temp;
		while (Temp <= n)
		{
			Int_Vec.push_back(Temp-y);
			Temp += k;
		}
		if (!Int_Vec.size())
		{
			cout << "-1\n";
			return 0;
		}

		for (int i = 0; i < Int_Vec.size(); i++)
		{
			cout << Int_Vec[i] << " ";
		}

	}

	return 0;
}


#include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <climits>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <deque>
#include <set>
#include <sstream>
#include <string>
#include <vector>

using namespace std;

#define clr(x) memset((x), 0, sizeof(x))
#define all(x) (x).begin(), (x).end()
#define pb push_back
#define mp make_pair
#define sz size()
#define For(i, st, en) for(int i=(st); i<=(int)(en); i++)
#define Ford(i, st, en) for(int i=(st); i>=(int)(en); i--)
#define forn(i, n) for(int i=0; i<(int)(n); i++)
#define ford(i, n) for(int i=(n)-1; i>=0; i--)
#define fori(it, x) for (__typeof((x).begin()) it = (x).begin(); it != (x).end(); it++)
#define in(x) int (x); input((x));
#define out(x) cout << (x);
typedef long double ld;
template <class _T> inline _T sqr(const _T& x) { return x * x; }
template <class _T> inline string tostr(const _T& a) { ostringstream os(""); os << a; return os.str(); }
const ld PI = 3.1415926535897932384626433832795L;
const ld EPS = 1e-8;
char TEMPORARY_CHAR;
typedef long long ll;
typedef unsigned long long u64;
typedef set < int > SI;
typedef vector < int > VI;
typedef vector < vector < int > > VVI;
typedef map < string, int > MSI;
typedef pair < int, int > PII;
const ll INF = 1e17;
const int N = 1 << 17;
inline void input(int &a)
{
    a = 0;
    while (((TEMPORARY_CHAR = getchar()) > '9' || TEMPORARY_CHAR < '0') && (TEMPORARY_CHAR != '-')){}
    char neg = 0;
    if (TEMPORARY_CHAR == '-')
    {
        neg = 1;
        TEMPORARY_CHAR = getchar();
    }
    while (TEMPORARY_CHAR <= '9' && TEMPORARY_CHAR >= '0')
    {
        a = (a << 3) + (a << 1) + TEMPORARY_CHAR - '0';
        TEMPORARY_CHAR = getchar();
    }
    if (neg)
        a = -a;
}
inline int nxt() {in(ret); return ret;}

#define x first
#define y second

#define less(a,b) ((a) < (b) - EPS)
#define more(a,b) ((a) > (b) + EPS)
#define eq(a,b) (fabs((a) - (b)) < EPS)

#define remax(a, b) ((a) = (b) > (a) ? (b) : (a))
#define remin(a, b) ((a) = (b) < (a) ? (b) : (a))

int main()
{
    in(y);
    in(k);
    in(n);
    for(int j = k; j <= n; j += k)
    {
        if (j - y > 0)
        {
            cout << j - y << " ";
        }
    }
    return 0;
}


#include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <climits>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <deque>
#include <set>
#include <sstream>
#include <string>
#include <vector>

using namespace std;

#define clr(x) memset((x), 0, sizeof(x))
#define all(x) (x).begin(), (x).end()
#define pb push_back
#define mp make_pair
#define sz size()
#define For(i, st, en) for(int i=(st); i<=(int)(en); i++)
#define Ford(i, st, en) for(int i=(st); i>=(int)(en); i--)
#define forn(i, n) for(int i=0; i<(int)(n); i++)
#define ford(i, n) for(int i=(n)-1; i>=0; i--)
#define fori(it, x) for (__typeof((x).begin()) it = (x).begin(); it != (x).end(); it++)
#define in(x) int (x); input((x));
#define out(x) cout << (x);
typedef long double ld;
template <class _T> inline _T sqr(const _T& x) { return x * x; }
template <class _T> inline string tostr(const _T& a) { ostringstream os(""); os << a; return os.str(); }
const ld PI = 3.1415926535897932384626433832795L;
const ld EPS = 1e-8;
char TEMPORARY_CHAR;
typedef long long ll;
typedef unsigned long long u64;
typedef set < int > SI;
typedef vector < int > VI;
typedef vector < vector < int > > VVI;
typedef map < string, int > MSI;
typedef pair < int, int > PII;
const ll INF = 1e17;
const int N = 1 << 17;
inline void input(int &a)
{
    a = 0;
    while (((TEMPORARY_CHAR = getchar()) > '9' || TEMPORARY_CHAR < '0') && (TEMPORARY_CHAR != '-')){}
    char neg = 0;
    if (TEMPORARY_CHAR == '-')
    {
        neg = 1;
        TEMPORARY_CHAR = getchar();
    }
    while (TEMPORARY_CHAR <= '9' && TEMPORARY_CHAR >= '0')
    {
        a = (a << 3) + (a << 1) + TEMPORARY_CHAR - '0';
        TEMPORARY_CHAR = getchar();
    }
    if (neg)
        a = -a;
}
inline int nxt() {in(ret); return ret;}

#define x first
#define y second

#define less(a,b) ((a) < (b) - EPS)
#define more(a,b) ((a) > (b) + EPS)
#define eq(a,b) (fabs((a) - (b)) < EPS)

#define remax(a, b) ((a) = (b) > (a) ? (b) : (a))
#define remin(a, b) ((a) = (b) < (a) ? (b) : (a))

int main()
{
    in(y);
    in(k);
    in(n);
    bool flag = false;
    for(int j = k; j <= n; j += k)
    {
        if (j - y > 0)
        {
            flag = true;
            cout << j - y << " ";
        }
    }
    if (!flag)
    {
        puts("-1");
    }
    return 0;
}


#include<bits/stdc++.h>
using namespace std;
int main(){
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    int y,k,n;
    cin>>y>>k>>n;
    int x=((y+k))/k;
    vector<int>v;
    for(int i=x;i*k<=n;i++){
        v.push_back(i*k-y);
    }
    int lim=v.size();
    for(int i=0;i<lim;i++){
        cout<<((i==0)?"":" ")<<v[i];
    }
    if(lim==0)cout<<"-1";
    cout<<"\n";
    return 0;
}


#include <iostream>
using namespace std;
#define ll long long

int n,i,k,y;

int main(){
//  freopen("input.txt", "r", stdin);
//  freopen("output.txt", "w", stdout);
//  ios::sync_with_stdio(0);
  cin >> y >> k >> n;
  if ((y/k)*k+k>n) cout << -1;
  else
    for (i=(y/k)*k+k; i<=n; i+=k)
      cout << i-y << ' ';
  return 0;
}


#include <bits/stdc++.h>

#define rep(i,n) for(int i=0; i<n; i++)
#define repa(i,a,b,d) for(int i=a; i<=b; i+=d)
#define repd(i,a,b,d) for(int i=a; i>=b; i-=d)
#define repi(it,stl) for(auto it = (stl).begin(); (it)!=stl.end(); ++(it))
#define sz(a) ((int)(a).size())
#define mem(a,n) memset((a), (n), sizeof(a))
#define all(n) (n).begin(),(n).end()
#define rall(n) (n).rbegin(),(n).rend()
#define mp(a,b) make_pair((a),(b))
#define pii pair<int,int>
#define vi vector<int>
#define vs vector<string>
#define sstr stringstream
#define indexof(v,x) (find(all((v)),(x))-(v).begin())

typedef long long ll;
using namespace std;

int main(){
    ios_base::sync_with_stdio(0);
    cin.tie(0);
#ifndef ONLINE_JUDGE
    freopen("main.txt","rt",stdin);
    //  freopen("out.txt","wt",stdout);
#endif

    ll y,k,n;
    cin >> y >> k >> n;
    bool yes=0;
    for (int i = y/k; i*k <= n; ++i) {
        ll x = i*k-y;
        if(x+y > n) break;
        if(x <= 0) continue;
        cout << x << " ";
        yes=1;
    }
    if(!yes) cout << -1;

    return 0;
}


#include <vector>
#include <list>
#include <map>
#include <set>
#include <queue>
#include <deque>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <ctime>
#include <string.h>

#define rep(i,n) for(int i=0; i<n; i++)
#define repa(i,a,b,d) for(int i=a; i<=b; i+=d)
#define repd(i,a,b,d) for(int i=a; i>=b; i-=d)
#define repi(it,stl) for(auto it = (stl).begin(); (it)!=stl.end(); ++(it))
#define sz(a) ((int)(a).size())
#define mem(a,n) memset((a), (n), sizeof(a))
#define all(n) (n).begin(),(n).end()
#define rall(n) (n).rbegin(),(n).rend()
#define mp(a,b) make_pair((a),(b))
#define pii pair<int,int>
#define vi vector<int>
#define vs vector<string>
#define sstr stringstream
#define myfind(v,x) (find(all((v)),(x))-(v).begin())

typedef long long ll;
using namespace std;

int main()
{
#ifndef ONLINE_JUDGE
    freopen("in.txt", "rt", stdin);
#endif

    int y,k,n;
    cin >> y >> k >> n;
    int res=0;
    bool ys=0;
    int d=1;
    repa(i,1,n,d){
        if (i+y<=n && (i+y)%k==0) {
            d=k;
            ys=1;
            cout << i << " ";
        }
    }
    if(!ys) cout << -1;
    return 0;
}


#include <bits/stdc++.h>

#define rep(i,n) for(int i=0; i<n; i++)
#define repa(i,a,b,d) for(int i=a; i<=b; i+=d)
#define repd(i,a,b,d) for(int i=a; i>=b; i-=d)
#define repi(it,stl) for(auto it = (stl).begin(); (it)!=stl.end(); ++(it))
#define sz(a) ((int)(a).size())
#define mem(a,n) memset((a), (n), sizeof(a))
#define all(n) (n).begin(),(n).end()
#define rall(n) (n).rbegin(),(n).rend()
#define mp(a,b) make_pair((a),(b))
#define pii pair<int,int>
#define vi vector<int>
#define vs vector<string>
#define sstr stringstream
#define indexof(v,x) (find(all((v)),(x))-(v).begin())

typedef long long ll;
using namespace std;

int main(){
    ios_base::sync_with_stdio(0);
    cin.tie(0);
#ifndef ONLINE_JUDGE
    freopen("main.txt","rt",stdin);
    //  freopen("out.txt","wt",stdout);
#endif

    ll y,k,n;
    cin >> y >> k >> n;
    bool yes=0;
    for (int i = y/k; i < n; ++i) {
        ll x = i*k-y;
        if(x+y > n) break;
        if(x < 0) continue;
        cout << x << " ";
        yes=1;
    }
    if(!yes) cout << -1;

    return 0;
}


#include <vector>
#include <list>
#include <map>
#include <set>
#include <queue>
#include <deque>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <ctime>
#include <string.h>

#define rep(i,n) for(int i=0; i<n; i++)
#define repa(i,a,b,d) for(int i=a; i<=b; i+=d)
#define repd(i,a,b,d) for(int i=a; i>=b; i-=d)
#define repi(it,stl) for(auto it = (stl).begin(); (it)!=stl.end(); ++(it))
#define sz(a) ((int)(a).size())
#define mem(a,n) memset((a), (n), sizeof(a))
#define all(n) (n).begin(),(n).end()
#define rall(n) (n).rbegin(),(n).rend()
#define mp(a,b) make_pair((a),(b))
#define pii pair<int,int>
#define vi vector<int>
#define vs vector<string>
#define sstr stringstream
#define myfind(v,x) (find(all((v)),(x))-(v).begin())

typedef long long ll;
using namespace std;

int main()
{
#ifndef ONLINE_JUDGE
    freopen("in.txt", "rt", stdin);
#endif

    int y,k,n;
    cin >> y >> k >> n;
    int res=0;
    bool ys=0;
    int d=1;
    repa(i,1,n,d){
        if (i+y<=n && (i+y)%k==0) {
            d=k;
            cout << i << " ";
        }
    }
    if(d==1) cout << -1;
    return 0;
}


#include <vector>
#include <list>
#include <map>
#include <set>
#include <queue>
#include <deque>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <ctime>
#include <string.h>

#define rep(i,n) for(int i=0; i<n; i++)
#define repa(i,a,b,d) for(int i=a; i<=b; i+=d)
#define repd(i,a,b,d) for(int i=a; i>=b; i-=d)
#define repi(it,stl) for(auto it = (stl).begin(); (it)!=stl.end(); ++(it))
#define sz(a) ((int)(a).size())
#define mem(a,n) memset((a), (n), sizeof(a))
#define all(n) (n).begin(),(n).end()
#define rall(n) (n).rbegin(),(n).rend()
#define mp(a,b) make_pair((a),(b))
#define pii pair<int,int>
#define vi vector<int>
#define vs vector<string>
#define sstr stringstream
#define myfind(v,x) (find(all((v)),(x))-(v).begin())

typedef long long ll;
using namespace std;

int main()
{
#ifndef ONLINE_JUDGE
    freopen("in.txt", "rt", stdin);
#endif

    int y,k,n;
    cin >> y >> k >> n;
    int res=0;
    bool ys=0;
    repa(i,1,min(n,100000),1){
        if (i+y<=n && (i+y)%k==0) {
            ys=1;
            cout << i << " ";
        }
    }
    if(!ys) cout << -1;
    return 0;
}


// A C program to check for Identical BSTs without building the trees
#include <cstdio>
#include <limits>
#include <climits>
#include <cstdbool>
#include <iostream>

void inout_two_bags_of_potatoes() {
    int64_t y;
    int64_t n;
    int64_t k;
    std::cin >> y >> k >> n;
    // (x + y) <= n so x <= n - y
    int64_t possible_x = n - y;
    if (possible_x <= 0 || k >= n) {
        std::cout << "-1";
    } else {
        int64_t x = 0;
        if (y < k) {
            x = k - y;
        } else {
            int64_t rem = y % k;
            x = k - rem;
        }
        for (int i = x; i <= possible_x; i += k) {
            std::cout << i << " ";
        }
    }
}

int main() {
    inout_two_bags_of_potatoes();
    return 0;
}


// A C program to check for Identical BSTs without building the trees
#include <cstdio>
#include <limits>
#include <climits>
#include <cstdbool>
#include <iostream>

void inout_two_bags_of_potatoes() {
    int64_t y;
    int64_t n;
    int64_t k;
    std::cin >> y >> k >> n;
    // (x + y) <= n so x <= n - y
    int64_t possible_x = n - y;
    if (possible_x <= 0) {
        std::cout << "-1\n";
    } else {
        int64_t x = 0;
        if (y < k) {
            x = y - k;
        } else {
            int64_t rem = y % k;
            x = k - rem;
            for (int i = x; i <= possible_x; i += k) {
                std::cout << i << " ";
            }
        }
    }
}

int main() {
    inout_two_bags_of_potatoes();
    return 0;
}


// A C program to check for Identical BSTs without building the trees
#include <cstdio>
#include <limits>
#include <climits>
#include <cstdbool>
#include <iostream>

void inout_two_bags_of_potatoes() {
    int64_t y;
    int64_t n;
    int64_t k;
    std::cin >> y >> k >> n;
    // (x + y) <= n so x <= n - y
    int64_t max_x = n - y;
    if (max_x <= 0 || k > n) {
        std::cout << "-1";
    } else {
        int64_t x = 0;
        if (y < k) {
            x = k - y;
        } else {
            int64_t rem = y % k;
            x = k - rem;
        }
        for (uint64_t i = x; i <= max_x; i += k) {
            std::cout << i << " ";
        }
    }
}

int main() {
    inout_two_bags_of_potatoes();
    return 0;
}


// A C program to check for Identical BSTs without building the trees
#include <cstdio>
#include <limits>
#include <climits>
#include <cstdbool>
#include <iostream>

typedef unsigned long long ull;

void inout_two_bags_of_potatoes() {
    ull y;
    ull n;
    ull k;
    std::cin >> y >> k >> n;
    // (x + y) <= n so x <= n - y
    if (n <= y || k > n) {
        std::cout << "-1";
    } else {
        ull x = 0;
        if (y < k) {
            x = k - y;
        } else if (y == k) {
            x = y;
        } else {
            x = k - (y % k);
        }
        ull max_x = n - y;
        if (max_x < x) {
            std::cout << "-1";
        } else {
            for (ull i = x; i <= max_x; i += k) {
                std::cout << i << " ";
            }
        }
    }
}

int main() {
    inout_two_bags_of_potatoes();
    return 0;
}


// A C program to check for Identical BSTs without building the trees
#include <cstdio>
#include <limits>
#include <climits>
#include <cstdbool>
#include <iostream>

typedef unsigned long long ull;

void inout_two_bags_of_potatoes() {
    ull y;
    ull n;
    ull k;
    std::cin >> y >> k >> n;
    // (x + y) <= n so x <= n - y
    if (n <= y || k > n) {
        std::cout << "-1";
    } else {
        ull x = 0;
        if (y < k) {
            x = k - y;
        } else {
            x = k - (y % k);
        }
        ull max_x = n - y;
        for (ull i = x; i <= max_x; i += k) {
            std::cout << i << " ";
        }
    }
}

int main() {
    inout_two_bags_of_potatoes();
    return 0;
}


// A C program to check for Identical BSTs without building the trees
#include <cstdio>
#include <limits>
#include <climits>
#include <cstdbool>
#include <iostream>

void inout_two_bags_of_potatoes() {
    int64_t y;
    int64_t n;
    int64_t k;
    std::cin >> y >> k >> n;
    // (x + y) <= n so x <= n - y
    int64_t possible_x = n - y;
    if (possible_x <= 0 || k > n) {
        std::cout << "-1";
    } else {
        int64_t x = 0;
        if (y < k) {
            x = k - y;
        } else {
            int64_t rem = y % k;
            x = k - rem;
        }
        for (int i = x; i <= possible_x; i += k) {
            std::cout << i << " ";
        }
    }
}

int main() {
    inout_two_bags_of_potatoes();
    return 0;
}


// A C program to check for Identical BSTs without building the trees
#include <cstdio>
#include <limits>
#include <climits>
#include <cstdbool>
#include <iostream>

void inout_two_bags_of_potatoes() {
    int64_t y;
    int64_t n;
    int64_t k;
    std::cin >> y >> k >> n;
    // (x + y) <= n so x <= n - y
    int64_t max_x = n - y;
    if (max_x <= 0 || k > n) {
        std::cout << "-1";
    } else {
        int64_t x = 0;
        if (y < k) {
            x = k - y;
        } else {
            int64_t rem = y % k;
            x = k - rem;
        }
        for (int64_t i = x; i <= max_x; i += k) {
            std::cout << i << " ";
        }
    }
}

int main() {
    inout_two_bags_of_potatoes();
    return 0;
}


// A C program to check for Identical BSTs without building the trees
#include <cstdio>
#include <limits>
#include <climits>
#include <cstdbool>
#include <iostream>

void inout_two_bags_of_potatoes() {
    int64_t y;
    int64_t n;
    int64_t k;
    std::cin >> y >> k >> n;
    // (x + y) <= n so x <= n - y
    int64_t possible_x = n - y;
    if (possible_x == 0) {
        std::cout << "-1\n";
    } else {
        int64_t x = 0;
        if (y < k) {
            x = y - k;
        } else {
            int64_t rem = y % k;
            x = k - rem;
            for (int i = x; i <= possible_x; i += k) {
                std::cout << i << " ";
            }
        }
    }
}

int main() {
    inout_two_bags_of_potatoes();
    return 0;
}


// A C program to check for Identical BSTs without building the trees
#include <cstdio>
#include <limits>
#include <climits>
#include <cstdbool>
#include <iostream>

typedef unsigned long long ull;

void inout_two_bags_of_potatoes() {
    ull y;
    ull n;
    ull k;
    std::cin >> y >> k >> n;
    // (x + y) <= n so x <= n - y
    if (n <= y || k > n) {
        std::cout << "-1";
    } else {
        ull x = 0;
        if (y < k) {
            x = k - y;
        } else if (y == k) {
            x = y;
        } else {
            x = k - (y % k);
        }
        ull max_x = n - y;
        for (ull i = x; i <= max_x; i += k) {
            std::cout << i << " ";
        }
    }
}

int main() {
    inout_two_bags_of_potatoes();
    return 0;
}


// A C program to check for Identical BSTs without building the trees
#include <cstdio>
#include <limits>
#include <climits>
#include <cstdbool>
#include <iostream>

void inout_two_bags_of_potatoes() {
    int64_t y;
    int64_t n;
    int64_t k;
    std::cin >> y >> k >> n;
    // (x + y) <= n so x <= n - y
    int64_t possible_x = n - y;
    if (possible_x <= 0) {
        std::cout << "-1\n";
    } else {
        int64_t x = 0;
        if (y < k) {
            x = k - y;
        } else {
            int64_t rem = y % k;
            x = k - rem;
        }
        for (int i = x; i <= possible_x; i += k) {
            std::cout << i << " ";
        }
    }
}

int main() {
    inout_two_bags_of_potatoes();
    return 0;
}


#define _CRT_SECURE_NO_DEPRECATE

#include <stdio.h>
#include <iostream>
#include <memory.h>
#include <assert.h>
#include <algorithm>
#include <functional>
#include <vector>
#include <string>
#include <map>
#include <set>
#include <deque>
#include <math.h>

#define fo(a,b,c) for( a = ( b ); a < ( c ); ++ a )
#define fr(a,b) fo( a, 0, ( b ) )
#define fi(a) fr( i, ( a ) )
#define fj(a) fr( j, ( a ) )
#define fk(a) fr( k, ( a ) )
#define mp make_pair
#define pb push_back
#define all(v) (v).begin( ), (v).end( )
#define _(a,b) memset( a, b, sizeof( a ) )
using namespace std;

void _ad(int &p){ static int i = 0; p = i++; }
#define fi123(x) for_each (all(x),_ad)
#define outv(x) copy(all(x), ostream_iterator<int>(cout," "))

typedef long long ll;
typedef vector<int> vi;
typedef vector<string> vs;
typedef pair<int,int> pii;
typedef map<string,int> msi;

template<class T> void sort_v (vector<T> &v){ sort (v.begin(),v.end());}
template<class T> void print_v (vector<T> &v,const char* c = " "){	copy(v.begin(),v.end(),ostream_iterator<T>(cout,c)); }
template<class T> void each (vector<T> &v,void (*f)(T&)){ for_each (v.begin(),v.end(),f); }
template<class T> void scanf_v (vector<T> &v,int cnt) { v.resize(cnt);	for (int i = 0; i < cnt; i++) {	getchar(); T a; scanf ("%d",&a); v[i] = a; }}

int n, m;
void f(int &a)
{
	a = rand();
}
int main( )
{
#ifndef ONLINE_JUDGE
	//freopen("input.txt", "rt", stdin);
	//freopen("output.txt", "wt", stdout);
#endif
	int y,k,n;
	bool f = 0;
	cin >> y >> k >> n;
	for (int dk = k; (n / dk) <= 100000; dk += k)
	{
		int x = dk - y;
		if (x >= 1 && x + y <= n)
		{
			printf ("%d ",x);
			f = 1;
		}
		if (x + y > n)
			break;
	}
	if (!f)
		printf ("-1");

	return 0;
}


#define _CRT_SECURE_NO_DEPRECATE

#include <stdio.h>
#include <iostream>
#include <memory.h>
#include <assert.h>
#include <algorithm>
#include <functional>
#include <vector>
#include <string>
#include <map>
#include <set>
#include <deque>
#include <math.h>

#define fo(a,b,c) for( a = ( b ); a < ( c ); ++ a )
#define fr(a,b) fo( a, 0, ( b ) )
#define fi(a) fr( i, ( a ) )
#define fj(a) fr( j, ( a ) )
#define fk(a) fr( k, ( a ) )
#define mp make_pair
#define pb push_back
#define all(v) (v).begin( ), (v).end( )
#define _(a,b) memset( a, b, sizeof( a ) )
using namespace std;

void _ad(int &p){ static int i = 0; p = i++; }
#define fi123(x) for_each (all(x),_ad)
#define outv(x) copy(all(x), ostream_iterator<int>(cout," "))

typedef long long ll;
typedef vector<int> vi;
typedef vector<string> vs;
typedef pair<int,int> pii;
typedef map<string,int> msi;

//template<class T> void sort_v (vector<T> &v){ sort (v.begin(),v.end());}
//template<class T> void print_v (vector<T> &v,const char* c = " "){	copy(v.begin(),v.end(),ostream_iterator<T>(cout,c)); }
//template<class T> void each (vector<T> &v,void (*f)(T&)){ for_each (v.begin(),v.end(),f); }
//template<class T> void scanf_v (vector<T> &v,int cnt) { v.resize(cnt);	for (int i = 0; i < cnt; i++) {	getchar(); T a; scanf ("%d",&a); v[i] = a; }}

int n, m;
void f(int &a)
{
	a = rand();
}
int main( )
{
#ifndef ONLINE_JUDGE
	//freopen("input.txt", "rt", stdin);
	//freopen("output.txt", "wt", stdout);
#endif
	int y,k,n;
	bool f = 0;
	cin >> y >> k >> n;
	for (int dk = k; (n / dk) <= 100000; dk += k)
	{
		int x = dk - y;
		if (x >= 1 && x + y <= n)
		{
			printf ("%d ",x);
			f = 1;
		}
		if (x + y > n)
			break;
	}
	if (!f)
		printf ("-1");

	return 0;
}


/**
 * ID: ping128
 * LANG: C++
 */

#include <stdio.h>
#include <iostream>
#include <sstream>
#include <stdlib.h>
#include <string>
#include <vector>
#include <set>
#include <queue>
#include <stack>
#include <list>
#include <math.h>
#include <algorithm>
#include <map>
#include <string.h>

using namespace std;

typedef long long LL;
typedef pair<int, int>PII;
typedef pair<PII, int>PII2;

int y, k, n;
int main()
{
    cin >> y >> k >> n;
    int start = ((y - 1) / k + 1) * k;
    if(start - y == 0) start += k;
    if(start > n) cout << -1 << endl;
    else
    {
        cout << start - y;
        start += k;
        while(start <= n)
        {
            cout << " " << start - y;
            start += k;
        }
        cout << endl;
    }
return 0;
}


/**
 * ID: ping128
 * LANG: C++
 */

#include <stdio.h>
#include <iostream>
#include <sstream>
#include <stdlib.h>
#include <string>
#include <vector>
#include <set>
#include <queue>
#include <stack>
#include <list>
#include <math.h>
#include <algorithm>
#include <map>
#include <string.h>

using namespace std;

typedef long long LL;
typedef pair<int, int>PII;
typedef pair<PII, int>PII2;

int y, k, n;
int main()
{
    cin >> y >> k >> n;
    int start = ((y - 1) / k + 1) * k;
    if(start - y == 0) start += k;
    if(start > n) cout << -1 << endl;
    else
    {
        cout << start - y;
        start += k;
        while(start < n)
        {
            cout << " " << start - y;
            start += k;
        }
        cout << endl;
    }
return 0;
}


#include <iostream>

using namespace std;

int main() {
    int y, k, n;
    cin >> y >> k >> n;
    int x = k - y % k;
    if (n - y < x) {
        cout << -1 << endl;
        return 0;
    }

    cout << x;
    for (x += k; x + y <= n; x += k) cout << ' ' << x;
    cout  << endl;
    return 0;
}


#include <bits/stdc++.h>

#define FOR(i,a,b) for(int i=(a),_b=(b); i<=_b; i++)
#define FORD(i,a,b) for(int i=(a),_b=(b); i>=_b; i--)
#define REP(i,a) for(int i=0,_a=(a); i<_a; i++)
#define EACH(it,a) for(__typeof(a.begin()) it = a.begin(); it != a.end(); ++it)

#define DEBUG(x) { cout << #x << " = "; cout << (x) << endl; }
#define PR(a,n) { cout << #a << " = "; FOR(_,1,n) cout << a[_] << ' '; cout << endl; }
#define PR0(a,n) { cout << #a << " = "; REP(_,n) cout << a[_] << ' '; cout << endl; }

#define sqr(x) ((x) * (x))
using namespace std;

int main() {
    long long y, k, n;
    while (cin >> y >> k >> n) {
        long long lb = y - y % k;
        while (lb <= y) lb += k;

        bool ok = false;
        for(long long sum = lb; sum <= n; sum += k) {
            ok = true;
            printf("%d ", (int) sum - y);
        }
        if (!ok) puts("-1");
        else puts("");
    }
    return 0;
}


#include <algorithm>
#include <climits>
#include <cstdio>
#include <cwchar>
#include <iostream>
//#include <conio.h>
//#include <windows.h>
#include <ctime>
#include <vector>
#include <set>
#include <map>
#include <string>
#include <iomanip>
#include <functional>
#include <numeric>
#include <cmath>
#include <limits>

using namespace std;

//HANDLE OUTPUT_HANDLE = GetStdHandle(STD_OUTPUT_HANDLE);
//
//const int player_move_delay = 200;
//clock_t player_last_move = 0;
//int player_x = 0;
//int player_y = 0;
//clock_t current_time = 0;
//const int MILLIS_PER_SEC = 1000;
//const int size_x = 80;
//const int size_y = 25;
//
//void setcolor(WORD color) {
//  SetConsoleTextAttribute(OUTPUT_HANDLE, color);
//}
//void setposition(SHORT x, SHORT y) {
//  COORD c = {x, y};
//  SetConsoleCursorPosition(OUTPUT_HANDLE, c);
//}
//void setinfo(DWORD size, WINBOOL visible) {
//  CONSOLE_CURSOR_INFO cursor = {size, visible};
//  SetConsoleCursorInfo(OUTPUT_HANDLE, &cursor);
//}
//void setbuffersize(SHORT x, SHORT y) {
//  COORD c = {x, y};
//  SetConsoleScreenBufferSize(OUTPUT_HANDLE, c);
//}
//void draw(CHAR_INFO* buffer, SHORT bufSizeX, SHORT bufSizeY, SHORT x, SHORT y) {
//  COORD dwBufferSize = {bufSizeX, bufSizeY};
//  COORD dwBufferCoord = {x, y};
//  SMALL_RECT rcRegion = {0, 0, size_x - 1, size_y - 1};
//  WriteConsoleOutput(OUTPUT_HANDLE, (CHAR_INFO*) buffer, dwBufferSize, dwBufferCoord, &rcRegion);
//}
//
//void move_player(int x, int y) {
//  if ((current_time - player_last_move) * MILLIS_PER_SEC >= player_move_delay * CLOCKS_PER_SEC) {
//      player_x += x;
//      player_y += y;
//      player_last_move = current_time;
//  }
//}
//
//map<pair<int, int>, char> terrain;

int main() {
#ifdef LOCAL
    freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
#endif

    int y, k, n;
    cin >> y >> k >> n;
    bool flag = false;
    for (int i = 0; i <= n / k; ++i) {
        if (i * k > y)
            flag = true, cout << i * k - y << " ";
    }
    if (!flag)
        cout << -1;

//  CHAR_INFO buffer[size_y][size_x];
//  setbuffersize(size_x, size_y);
//  setinfo(0, 0);
//  while (true) {
//      current_time = clock();
//      if (kbhit())
//          switch (getch()) {
//          case 'a':
//              move_player(-1, 0);
//              break;
//          case 'd':
//              move_player(1, 0);
//              break;
//          case 'w':
//              move_player(0, -1);
//              break;
//          case 's':
//              move_player(0, 1);
//              break;
//          }
//      for (int i = 0; i < size_y; ++i)
//          for (int j = 0; j < size_x; ++j) {
//              int x = player_x - size_x / 2 + j;
//              int y = player_y - size_y / 2 + i;
//              if (x == player_x && y == player_y)
//                  buffer[i][j].Char.AsciiChar = 1;
//              else if (terrain.find(make_pair(x, y)) == terrain.end())
//                  buffer[i][j].Char.AsciiChar = ' ';
//              else
//                  buffer[i][j].Char.AsciiChar = '#';
//              buffer[i][j].Attributes = 1 | 2 | 4;
//          }
//      draw((CHAR_INFO*) buffer, size_x, size_y, 0, 0);
//  }

    return 0;
}


#include <iostream>
//#include <set>

using namespace std;

int main()
{
    int counter = 0;
    int y, k, n;
    cin >> y >> k >> n;
    for(int x = 1; x <= n - y; ++x)
        if((x + y) % k == 0)
        {
            cout << x << ' ';
            ++counter;
        }
    if(counter == 0)
        cout << -1;
    return 0;
}


#include <iostream>
//#include <set>

using namespace std;

int main()
{
    int counter = 0;
    int y, k, n;
    cin >> y >> k >> n;
    for(int i = (y / k) * k + k - y; i <= n - y; i += k)
    {
        cout << i << ' ';
        ++counter;
    }
    if(counter == 0)
        cout << -1;
    return 0;
}


#include <cstdio>

using namespace std;

int main()
{
    int y, k, n;
    scanf("%d%d%d", &y, &k, &n);

    bool w = false;

    for (int x = k-y%k; x+y <= n; x += k)
    {
        printf("%d ", x);
        w = true;
    }

    if (w == false) puts("-1");
    else puts("");

    return 0;
}


#include <cstdio>

using namespace std;

int main()
{
    int y, k, n;
    scanf("%d%d%d", &y, &k, &n);

    for (int x = k-y%k; x+y <= n; x += k) printf("%d ", x);

    puts("");

    return 0;
}


#include <bits/stdc++.h>

using namespace std;

int main()
{
    int y, n, k;
    cin >> y >> k >> n;
    int x = k - (y % k);
    bool q = 1;
    for(int i = x; y + i <= n; i += k){
        if(i)
            cout << i << " ", q = 0;
    }
    if(q)
        cout << -1;
    return 0;
}


#include <bits/stdc++.h>
using namespace std;

int main() {
    int y, k, n;
    cin >> y >> k >> n;
    bool check = 1;
    for (int x = k - (y % k); x + y <= n; x += k) {
        if ((x + y) % k == 0) {
            cout << x << ' ';
            check = 0;
        }
    }
    if (check) cout << -1 << '\n';
}


#include <bits/stdc++.h>
using namespace std;

#define TEST freopen("input", "r", stdin)

int main (){
	// TEST;
	int y, k, n, cnt = 0;
	cin >> y >> k >> n;
	for (int x = 1; x <= n-y; ++x){
		if ((x+y)%k == 0){
			cout << x << ' '; cnt ++;
		}
	}
	if (cnt == 0){
		cout << -1;
	}
	cout << '\n';
	return 0;
}


#include <bits/stdc++.h>
using namespace std;

#define __ ios::sync_with_stdio(0);
#define TEST freopen("input", "r", stdin)

int main (){ __
	TEST;
	int y, k, n;
	cin >> y >> k >> n;
	n -= y;
	if (k > n){
		cout << -1 << '\n';
	} else {
		for (int i=k-y; i<=n; i+=k){
			if (i <= 0) {
				continue;
			}
			cout << i << ' ';
		}
		cout << '\n';
	}
	return 0;
}


#include <bits/stdc++.h>
using namespace std;

#define TEST freopen("input", "r", stdin)

int main (){
	TEST;
	int y, k, n, cnt = 0;
	cin >> y >> k >> n;
	for (int x = 1; x <= n-y; ++x){
		if ((x+y)%k == 0){
			cout << x << ' '; cnt ++;
		}
	}
	if (cnt == 0){
		cout << -1;
	}
	cout << '\n';
	return 0;
}


#include <bits/stdc++.h>
using namespace std;

#define __ ios::sync_with_stdio(0);
#define TEST freopen("input", "r", stdin)

int main (){ __
	// TEST;
	int y, k, n;
	cin >> y >> k >> n;
	n -= y;
	if (k > n){
		cout << -1 << '\n';
	} else {
		for (int i=k-y; i<=n; i+=k){
			if (i <= 0) {
				continue;
			}
			cout << i << ' ';
		}
		cout << '\n';
	}
	return 0;
}


#include <bits/stdc++.h>
using namespace std;

#define __ ios::sync_with_stdio(0);
#define TEST freopen("input", "r", stdin)

int main (){ __
	//TEST;
	int y, k, n;
	cin >> y >> k >> n;
	n -= y;
	if (k-y > n){
		cout << -1 << '\n';
	} else {
		for (int i=k-y; i<=n; i+=k){
			if (i <= 0) {
				continue;
			}
			cout << i << ' ';
		}
		cout << '\n';
	}
	return 0;
}


#include <bits/stdc++.h>
using namespace std;

#define __ ios::sync_with_stdio(0);

int main (){ __
	int y, k, n, tot = 0;
	cin >> y >> k >> n;
	n -= y;
  for (int i=k-y; i<=n; i+=k){
    if (i <= 0) {
      continue;
    }
    cout << i << ' ', tot ++;
  }
  if (tot == 0){
    cout << -1;
  }
  cout << '\n';
	return 0;
}


#include <bits/stdc++.h>
using namespace std;

#define __ ios::sync_with_stdio(0);
#define TEST freopen("input", "r", stdin)

int main (){ __
	TEST;
	int y, k, n, tot = 0;
	cin >> y >> k >> n;
	n -= y;
  for (int i=k-y; i<=n; i+=k){
    if (i <= 0) {
      continue;
    }
    cout << i << ' ', tot ++;
  }
  if (tot == 0){
    cout << -1;
  }
  cout << '\n';
	return 0;
}


#include <iostream>

using namespace std;

int main()
{
    int y, k, n;
    cin >> y >> k >> n;
    n -= y;
    if (n < k) {
        cout << -1 << endl;
        return 0;
    }
    for (int res = k - y % k; res <= n; res += k) {
        cout << res << endl;
    }
}


#include <iostream>

using namespace std;

int main()
{
    int y, k, n;
    cin >> y >> k >> n;
    n -= y;
    if (n + y %k < k) {
        cout << -1 << endl;
        return 0;
    }
    for (int res = k - y % k; res <= n; res += k) {
        cout << res << endl;
    }
}


#include <iostream>
#include <cmath>
#include <iomanip>
#include <string>
#include <cstring>
#include <cstdio>
#include <math.h>
#include <algorithm>
#include <stdio.h>
#include <climits>
#include <stack>
#include <queue>
#include <vector>
#include <set>
#include <sstream>

using namespace std;

#define sf(x) scanf("%d", &x);
#define scan(x) scanf("%I64d", &x);
#define pr(x) printf("%d ", x);
#define distance(x1,y1,x2,y2) sqrt((x2-x1)*(x2-x1)+(y2-y1)*(y2-y1));

typedef unsigned long long ull;
typedef long long ll;

int dx[] = { 1, 0, -1, 0 };
int dy[] = { 0, 1, 0, -1 };

/*bool valid(int i, int j){
    return i >= 0 && i <= n - 1 && j >= 0 && j <= m - 1;
    }*/

int main(){
    int y, k, n, start;
    cin >> y >> k >> n;
    vector<int>v;
    if (y%k == 0)start = k;
    else start = ((y / k + 1) * k) - y;
    //cout << start << "\n";
    for (int i = start; i <= n; i += k){
        if (y + i <= n && (i + y)%k == 0){
            v.push_back(i);
        }
    }
    if (!v.size())
        cout << "-1\n";
    else{
        for (int i = 0; i < v.size(); i++){
            cout << v[i];
            if (i < v.size() - 1)cout << " ";
        }
        cout << "\n";
    }
}


#include <iostream>
#include <cmath>
#include <iomanip>
#include <string>
#include <cstring>
#include <cstdio>
#include <math.h>
#include <algorithm>
#include <stdio.h>
#include <climits>
#include <stack>
#include <queue>
#include <vector>
#include <set>
#include <sstream>

using namespace std;

#define sf(x) scanf("%d", &x);
#define scan(x) scanf("%I64d", &x);
#define pr(x) printf("%d ", x);
#define distance(x1,y1,x2,y2) sqrt((x2-x1)*(x2-x1)+(y2-y1)*(y2-y1));

typedef unsigned long long ull;
typedef long long ll;

int dx[] = { 1, 0, -1, 0 };
int dy[] = { 0, 1, 0, -1 };

/*bool valid(int i, int j){
    return i >= 0 && i <= n - 1 && j >= 0 && j <= m - 1;
    }*/

int main(){
    int y, k, n;
    cin >> y >> k >> n;
    vector<int>v;
    for (int i = 1; i <= n - y; i++){
        if (y + i < n && (i + y)%k == 0){
            v.push_back(i);
        }
    }
    if (!v.size())
        cout << "-1\n";
    else{
        for (int i = 0; i < v.size(); i++){
            cout << v[i];
            if (i < v.size() - 1)cout << " ";
        }
        cout << "\n";
    }
}


#include <iostream>
#include <cmath>
#include <iomanip>
#include <string>
#include <cstring>
#include <cstdio>
#include <math.h>
#include <algorithm>
#include <stdio.h>
#include <climits>
#include <stack>
#include <queue>
#include <vector>
#include <set>
#include <sstream>

using namespace std;

#define sf(x) scanf("%d", &x);
#define scan(x) scanf("%I64d", &x);
#define pr(x) printf("%d ", x);
#define distance(x1,y1,x2,y2) sqrt((x2-x1)*(x2-x1)+(y2-y1)*(y2-y1));

typedef unsigned long long ull;
typedef long long ll;

int dx[] = { 1, 0, -1, 0 };
int dy[] = { 0, 1, 0, -1 };

/*bool valid(int i, int j){
    return i >= 0 && i <= n - 1 && j >= 0 && j <= m - 1;
    }*/

int main(){
    int y, k, n;
    cin >> y >> k >> n;
    vector<int>v;
    for (int i = 1; i <= n - y; i++){
        if (y + i <= n && (i + y)%k == 0){
            v.push_back(i);
        }
    }
    if (!v.size())
        cout << "-1\n";
    else{
        for (int i = 0; i < v.size(); i++){
            cout << v[i];
            if (i < v.size() - 1)cout << " ";
        }
        cout << "\n";
    }
}


#include <iostream>
#include <sstream>
#include <vector>
using namespace std;

vector<int64_t> calc(int64_t y, int64_t k, int64_t n) {
	vector<int64_t> v;

	for (int64_t x = 1; x <= n - y; ++x) {
		auto z = x + y;
		if (z % k == 0) {
			for (int t = x; t <= n - y; t += k)
				v.push_back(t);
			return v;
		}
	}
	if (v.empty())
		v.push_back(-1);

	return v;
}

void solve(istream &in, ostream &out)
{
	int64_t y, k, n;
	in >> y >> k >> n;
	auto v = calc(y, k, n);
	for (size_t i = 0; i < v.size(); ++i) {
		out << v[i] << ' ';
	}
}

int main() {
	solve(cin, cout);
	return 0;
}


#include <iostream>
#include <sstream>
#include <vector>
using namespace std;

void solve(istream &in, ostream &out)
{
	int y, k, n;
	in >> y >> k >> n;

	bool found = false;
	for (int z = k; z <= n; z += k) {
		int x = z - y;
		if (x >= 1) {
			out << x << ' ';
			found = true;
		}
	}
	if (!found) {
		out << "-1 ";
	}
}

int main() {
	solve(cin, cout);
	return 0;
}


#include <iostream>
#include <sstream>
#include <vector>
using namespace std;

vector<int64_t> calc(int64_t y, int64_t k, int64_t n) {
	vector<int64_t> v;

	for (int64_t x = 1; x <= n - y; ++x) {
		auto z = x + y;
		if (z % k == 0) {
			v.push_back(x);
		}
	}
	if (v.empty())
		v.push_back(-1);

	return v;
}

void solve(istream &in, ostream &out)
{
	int64_t y, k, n;
	in >> y >> k >> n;
	auto v = calc(y, k, n);
	for (size_t i = 0; i < v.size(); ++i) {
		out << v[i] << ' ';
	}
}

int main() {
	solve(cin, cout);
	return 0;
}


#include <iostream>
#include <sstream>
#include <vector>
using namespace std;

vector<int64_t> calc(int64_t y, int64_t k, int64_t n) {
	vector<int64_t> v;

	for (int64_t x = k - y; x <= n - y; x += k) {
		if (x > 0)
			v.push_back(x);
	}
	if (v.empty())
		v.push_back(-1);
	return v;
}

void solve(istream &in, ostream &out)
{
	int64_t y, k, n;
	in >> y >> k >> n;
	auto v = calc(y, k, n);
	for (size_t i = 0; i < v.size(); ++i) {
		out << v[i] << ' ';
	}
}

int main() {
	solve(cin, cout);
	return 0;
}


#include <iostream>
#include <sstream>
#include <vector>
#include <algorithm>
#include <string>
#include <bitset>
#include <map>
#include <set>
#include <fstream>
using namespace std;

void solve(istream &in, ostream &out) {
	int y, k, n;
	in >> y >> k >> n;

	int x = y / k * k + k - y;
	if (x + y <= n)
		out << x;
	else {
		out << -1 << endl;
		return;
	}
	for (x = x + k; x + y <= n; x += k) {
		out << ' ' << x;
	}
	out << endl;
}

int main() {
	solve(cin, cout);
	return 0;
}


#include <iostream>
#include <sstream>
#include <vector>
using namespace std;

vector<int64_t> calc(int64_t y, int64_t k, int64_t n) {
	vector<int64_t> v;

	for (int64_t x = 0; x < n - y; ++x) {
		auto z = x + y;
		if (z % k == 0 && z < n) {
			v.push_back(x);
		}
	}
	if (v.empty())
		v.push_back(-1);

	return v;
}

void solve(istream &in, ostream &out)
{
	int64_t y, k, n;
	in >> y >> k >> n;
	auto v = calc(y, k, n);
	for (size_t i = 0; i < v.size(); ++i) {
		out << v[i] << ' ';
	}
}

int main() {
	solve(cin, cout);
	return 0;
}


#include <iostream>
#include <sstream>
#include <vector>
using namespace std;

vector<int> calc(int y, int k, int n) {
	vector<int> o;
	for (int i = 1; i * k <= n; ++i) {
		int x = i * k - y;
		if (x >= 1)
			o.push_back(x);
	}
	if (o.empty())
		o.push_back(-1);
	return o;
}
void solve(istream &in, ostream &out)
{
	int y, k, n;
	in >> y >> k >> n;

	auto o = calc(y, k, n);

	for (auto i = o.begin(); i != o.end(); ++i)
		out << *i << " ";
}

int main() {
	solve(cin, cout);
	return 0;
}


#include <iostream>
#include <sstream>
#include <vector>
using namespace std;

void solve(istream &in, ostream &out)
{
  int y, k, n;
  in >> y >> k >> n;

  int z = (y / k + 1) * k;
  if (z > n) {
    out << "-1";
    return;
  }

  for (; z <= n; z += k)
    out << z - y << " ";
}

int main() {
  solve(cin, cout);
  return 0;
}


#define _CRT_SECURE_NO_WARNINGS
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <string>
#include <vector>
#include <algorithm>
#include <tuple>
#include <map>
#include <set>
#include <queue>
#include <stack>
#include <utility>
#include <string.h>

#define MP make_pair
#define PB push_back
#define EPS 0.001
#define ALL(a) a.begin(), a.end()

using namespace std;

typedef unsigned int uint;
typedef long long ll;

ll gcd(ll a, ll b) {
    while (b) {
        a %= b;
        swap(a, b);
    }
    return a;
}

ll lcm(ll a, ll b) {
    return (a / gcd(a, b)) * b;
}

#define ONLINE_JUDGE
int main() {
#ifndef ONLINE_JUDGE
    freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
#endif

    int y, k, n;
    cin >> y >> k >> n;
    vector <int> ans;
    for (int i = k; i <= n; i += k) {
        if (i > y) {
            ans.push_back(i - y);
        }
    }
    if (ans.size() == 0) {
        cout << -1 << endl;
    }
    else {
        for (auto i : ans) {
            cout << i << " ";
        }
        cout << endl;
    }

    return 0;
}


#include<stdio.h>
int main(void){
    unsigned long int y,k,n;
    scanf("%ld %ld %ld",&y,&k,&n);

    long int i;
    if((y/k+1)*k>n){
        printf("%d",-1);

    }else {
        for (i = (y/k+1)*k ;i <= n ; i += k) {
            printf("%ld ", i-y);
        }
    }
    return 0;
}


#include<cstdio>
#include<cstring>
#include<iostream>
#include<sstream>
#include<algorithm>
#include<vector>
#include<bitset>
#include<set>
#include<queue>
#include<stack>
#include<map>
#include<cstdlib>
#include<cmath>
#define PI 2*asin(1.0)
#define LL __int64
#define pb push_back
#define clr(a,b) memset(a,b,sizeof(a))
const int  MOD = 1e9 + 7;
const int N = 2e2 + 15;
const int INF = (1 << 30) - 1;
const int letter = 130;
using namespace std;
int main()
{
    int y,n,k;
    while(cin >> y >> k >> n)
    {
        if(y > n) {
                cout << -1 << endl;
                continue;
        }
       // int flag = 0;
        int t = y/k;
        int d = t+1;
        int start = d*k-y;
        if(start+y > n)
        {
            cout << -1 << endl;
            continue;
        }
        for(int i = start;i+y<=n;)
        {
                cout << i <<" ";
                i += k;
        }
       // if(!flag) cout << -1;
        cout << endl;
    }
    return 0;
}