#include <iostream>
#include <cmath>

using namespace std;

typedef long long Int;

int main()
{
    Int y, k, n;
    cin >> y >> k >> n;

    Int a = (k-y%k);
    n -= y;

    if( a > n ) {
        cout << -1 << endl;
        return 0;
    }
    for( ; a <= n; a += k ) {
        cout << a << ' ';
    }

    return 0;
}


#include<bits/stdc++.h>
using namespace std;
#define lp(i,n) for(int i=0;i<n;++i)
#define lp2(i,a,b) for(int i=a;i<=b;++i)
#define lpn(i,n) for(int i=n-1;i>=0;--i)
#define lpn2(i,a,b) for(int i=a;i>=b;--i)
#define ll long long
#define ii pair<int,int>
#define vi vector<int>
#define vs vector<short>
#define vd vector<double>
#define vll vector<ll>
#define vii vector<ii>
#define vvi vector<vi>
#define vvll vector<vll>
#define sz size
#define F first
#define S second
#define mp(x,y) make_pair(x,y)
#define pb push_back
#define Max(a,b) (((a)>=(b))?(a):(b))
#define Min(a,b) (((a)<=(b))?(a):(b))
#define show(x) cerr << x
#define debug(x) show(#x << ": " << (x) << endl)
struct _ { ios_base::Init i; _() { cin.sync_with_stdio(0); cin.tie(0); } } _;
int f[2000];
int main()
{
    int xy,y,n,k;
    vi ans;
    cin>>y>>k>>n;
    for(xy=k;xy/k<=100000;xy+=k)
    {
        if(xy-y>0&&xy<=n)ans.pb(xy-y);
        if(xy>n)break;
    }
    if(ans.sz()==0)cout<<-1;
    else
    {
        cout<<ans[0];
        for(int i=1;i<ans.sz();++i)cout<<" "<<ans[i];
    }
    return 0;
}


#include<bits/stdc++.h>
using namespace std;
#define lp(i,n) for(int i=0;i<n;++i)
#define lp2(i,a,b) for(int i=a;i<=b;++i)
#define lpn(i,n) for(int i=n-1;i>=0;--i)
#define lpn2(i,a,b) for(int i=a;i>=b;--i)
#define ll long long
#define ii pair<int,int>
#define vi vector<int>
#define vs vector<short>
#define vd vector<double>
#define vll vector<ll>
#define vii vector<ii>
#define vvi vector<vi>
#define vvll vector<vll>
#define sz size
#define F first
#define S second
#define mp(x,y) make_pair(x,y)
#define pb push_back
#define Max(a,b) (((a)>=(b))?(a):(b))
#define Min(a,b) (((a)<=(b))?(a):(b))
#define show(x) cerr << x
#define debug(x) show(#x << ": " << (x) << endl)
struct _ { ios_base::Init i; _() { cin.sync_with_stdio(0); cin.tie(0); } } _;
int f[2000];
int main()
{
    int x,y,n,k;
    vi ans;
    cin>>y>>k>>n;
    for(x=1;(x+y)/k<=100000;x++)
    {
        if(x+y<=n&&(x+y)%k==0)ans.pb(x);
    }
    if(ans.sz()==0)cout<<-1;
    else
    {
        cout<<ans[0];
        for(int i=1;i<ans.sz();++i)cout<<" "<<ans[i];
    }
    return 0;
}


//~In The Name Of Allah~//
#define _CRT_SECURE_NO_WARNINGS
#include <iostream>
#include <string>
#include <vector>
#include <map>
#include <iomanip>
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <algorithm>
#include <cmath>
#include <string.h>
#include <sstream>
#include <cstring>
#include <fstream>
#include <functional>
#include <cstdio>
#include <stack>
#include <utility>
#include <set>
#include <list>
#include <queue>
#include <bitset>
using namespace std;

#define all(S) S.begin(), S.end()
#define sortb(S) sort(S.rbegin(), S.rend())
#define sorta(S) sort(all(S))
#define cinp(N) cin>>N.first>>N.second
#define coutp(N) cout<<N.first<<" "<<N.second<<endl
#define co(x) cout<<x<<endl
#define mem(C, V) memset(C, V, sizeof C)
#define clr(S, V) fill(all(S), V)
#define ssum(N) (ll)N*(N+1)/2
#define gt(S) getline(cin, S)
#define sp(N) setprecision(N)<<fixed
#define siz(S) S.size()
#define mk make_pair
#define go continue
#define rep(i, j) for (int i = 0; i < int(j); i++)
#define rrep(i, j) for (int i = (int)j - 1; i > -1; i--)
#define Rep(i, j, k) for (int i = (int)j; i < (int)k; i++)
#define RRep(i, j, k) for (int i = (int)k-1; i >= (int)j; i--)
#define srep(S) for (auto it:S)
#define tester int tes; scanf("%d", &tes); Rep(casa, 1, tes+1)
#define getdis(x1, y1, x2, y2) double(sqrt((x1 - x2)*(x1 - x2) + (y1 - y2)*(y1 - y2)))
#define pi 3.1415926535897932384626433832795
#define ex 2.7182818284
#define mod 1000000007
#define soo s(1e5+1, '9')
#define oo 2e9+1

typedef stringstream ss;
typedef string s;
typedef long long ll;
typedef long double ld;
typedef unsigned long long ull;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
typedef vector<int> vi;
typedef vector<double> vd;
typedef vector<vi> vii;
typedef vector<pii> vpii;
typedef vector<pll> vpll;
typedef vector<ll> vll;
typedef vector<bool> vb;
typedef vector<s> vs;
typedef map<ll, ll> mll;
typedef map<int, int> mii;
typedef map<char, ll> mci;
typedef map<s, ll> msi;

int di[] = { 0, 1, 0, -1 };
int dj[] = { 1, 0, -1, 0 };
int dik[] = { 1, 1, 2, 2, -1, -1, -2, -2 };
int djk[] = { 2, -2, 1, -1, -2, 2, -1, 1 };

ll gcd(ll x, ll y){ return !y ? x : gcd(y, x%y); }

int main(){
    /*freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);*/
    ll y, k, n, tmp, len;
    vi ans;
    cin >> y >> k >> n;
    tmp = gcd(y, k);
    while (tmp + y <= n) ans.push_back(tmp), tmp += k;
    if (!siz(ans)) cout << -1 << endl;
    else{
        rep(i, siz(ans)) cout << ans[i] << " ";
        cout << endl;
    }
    return 0;
}


//~In The Name Of Allah~//
#define _CRT_SECURE_NO_WARNINGS
#include <iostream>
#include <string>
#include <vector>
#include <map>
#include <iomanip>
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <algorithm>
#include <cmath>
#include <string.h>
#include <sstream>
#include <cstring>
#include <fstream>
#include <functional>
#include <cstdio>
#include <stack>
#include <utility>
#include <set>
#include <list>
#include <queue>
#include <bitset>
using namespace std;

#define all(S) S.begin(), S.end()
#define sortb(S) sort(S.rbegin(), S.rend())
#define sorta(S) sort(all(S))
#define cinp(N) cin>>N.first>>N.second
#define coutp(N) cout<<N.first<<" "<<N.second<<endl
#define co(x) cout<<x<<endl
#define mem(C, V) memset(C, V, sizeof C)
#define clr(S, V) fill(all(S), V)
#define ssum(N) (ll)N*(N+1)/2
#define gt(S) getline(cin, S)
#define sp(N) setprecision(N)<<fixed
#define siz(S) S.size()
#define mk make_pair
#define go continue
#define rep(i, j) for (int i = 0; i < int(j); i++)
#define rrep(i, j) for (int i = (int)j - 1; i > -1; i--)
#define Rep(i, j, k) for (int i = (int)j; i < (int)k; i++)
#define RRep(i, j, k) for (int i = (int)k-1; i >= (int)j; i--)
#define srep(S) for (auto it:S)
#define tester int tes; scanf("%d", &tes); Rep(casa, 1, tes+1)
#define getdis(x1, y1, x2, y2) double(sqrt((x1 - x2)*(x1 - x2) + (y1 - y2)*(y1 - y2)))
#define pi 3.1415926535897932384626433832795
#define ex 2.7182818284
#define mod 1000000007
#define soo s(1e5+1, '9')
#define oo 2e9+1

typedef stringstream ss;
typedef string s;
typedef long long ll;
typedef long double ld;
typedef unsigned long long ull;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
typedef vector<int> vi;
typedef vector<double> vd;
typedef vector<vi> vii;
typedef vector<pii> vpii;
typedef vector<pll> vpll;
typedef vector<ll> vll;
typedef vector<bool> vb;
typedef vector<s> vs;
typedef map<ll, ll> mll;
typedef map<int, int> mii;
typedef map<char, ll> mci;
typedef map<s, ll> msi;

int di[] = { 0, 1, 0, -1 };
int dj[] = { 1, 0, -1, 0 };
int dik[] = { 1, 1, 2, 2, -1, -1, -2, -2 };
int djk[] = { 2, -2, 1, -1, -2, 2, -1, 1 };

ll gcd(ll x, ll y){ return !y ? x : gcd(y, x%y); }

int main(){
    /*freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);*/
    int y, k, n;
    vi ans;
    scanf("%d%d%d", &y, &k, &n);
    for (int i = k; i <= n; i += k)
    if (i > y) ans.push_back(i - y);
    if (!siz(ans)) printf("-1\n");
    else{
        printf("%d", ans[0]);
        Rep(i, 1, siz(ans)) printf(" %d", ans[i]);
        printf("\n");
    }
    return 0;
}


//~In The Name Of Allah~//
#define _CRT_SECURE_NO_WARNINGS
#include <iostream>
#include <string>
#include <vector>
#include <map>
#include <iomanip>
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <algorithm>
#include <cmath>
#include <string.h>
#include <sstream>
#include <cstring>
#include <fstream>
#include <functional>
#include <cstdio>
#include <stack>
#include <utility>
#include <set>
#include <list>
#include <queue>
#include <bitset>
using namespace std;

#define all(S) S.begin(), S.end()
#define sortb(S) sort(S.rbegin(), S.rend())
#define sorta(S) sort(all(S))
#define cinp(N) cin>>N.first>>N.second
#define coutp(N) cout<<N.first<<" "<<N.second<<endl
#define co(x) cout<<x<<endl
#define mem(C, V) memset(C, V, sizeof C)
#define clr(S, V) fill(all(S), V)
#define ssum(N) (ll)N*(N+1)/2
#define gt(S) getline(cin, S)
#define sp(N) setprecision(N)<<fixed
#define siz(S) S.size()
#define mk make_pair
#define go continue
#define rep(i, j) for (int i = 0; i < int(j); i++)
#define rrep(i, j) for (int i = (int)j - 1; i > -1; i--)
#define Rep(i, j, k) for (int i = (int)j; i < (int)k; i++)
#define RRep(i, j, k) for (int i = (int)k-1; i >= (int)j; i--)
#define srep(S) for (auto it:S)
#define tester int tes; scanf("%d", &tes); Rep(casa, 1, tes+1)
#define getdis(x1, y1, x2, y2) double(sqrt((x1 - x2)*(x1 - x2) + (y1 - y2)*(y1 - y2)))
#define pi 3.1415926535897932384626433832795
#define ex 2.7182818284
#define mod 1000000007
#define soo s(1e5+1, '9')
#define oo 2e9+1

typedef stringstream ss;
typedef string s;
typedef long long ll;
typedef long double ld;
typedef unsigned long long ull;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
typedef vector<int> vi;
typedef vector<double> vd;
typedef vector<vi> vii;
typedef vector<pii> vpii;
typedef vector<pll> vpll;
typedef vector<ll> vll;
typedef vector<bool> vb;
typedef vector<s> vs;
typedef map<ll, ll> mll;
typedef map<int, int> mii;
typedef map<char, ll> mci;
typedef map<s, ll> msi;

int di[] = { 0, 1, 0, -1 };
int dj[] = { 1, 0, -1, 0 };
int dik[] = { 1, 1, 2, 2, -1, -1, -2, -2 };
int djk[] = { 2, -2, 1, -1, -2, 2, -1, 1 };

ll gcd(ll x, ll y){ return !y ? x : gcd(y, x%y); }

int main(){
    /*freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);*/
    ll y, k, n;
    vi ans;
    cin >> y >> k >> n;
    for (int i = k; i <= n; i += k)
    if (i > y) ans.push_back(i - y);
    if (!siz(ans)) cout << -1 << endl;
    else{
        rep(i, siz(ans)) cout << ans[i] << " ";
        cout << endl;
    }
    return 0;
}


#include <cstdio>
#include <iostream>

#include <vector>
#include <list>
#include <string>

#include <algorithm>
#include <functional>
#include <cmath>

using namespace std;

typedef long long int64;
typedef unsigned long long uint64;

int main()
{
    ios_base::sync_with_stdio(false);

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

    int x = k - y % k;

    if(x + y > n) {
        cout << -1;
    }

    while(x + y <= n) {
        cout << x << ' ';
        x += k;
    }

    cout << endl;

    return 0;
}


#include <cstdio>

int ceil(int num, int d) {
  return (num + d - 1) / d * d;
}

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

  int s = ceil(y + 1, k);
  if (s > n) {
    std::printf("%d\n", -1);
    return 0;
  }

  for (int t = s; t <= n; t += k) {
    std::printf("%d ", t - y);
  }
  return 0;
}


#include <bits/stdc++.h>
#define FWD(a,b,c) for(int a=(b); a<(c); ++a)
#define BCK(a,b,c) for(int a=(b); a>(c); --a)
#define x first
#define y second

using namespace std;

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

const int MAXN = 100010;
const int MAXV = 2000010;

int y, n, k;

int main(){
	scanf("%d %d %d", &y, &k, &n);
	for(int s=y+(k-y%k); s<=n; s+=k)
		printf("%d ", s-y);
	if(y+(k-y%k)>n) printf("-1");
	printf("\n");
	return 0;
}


#include <bits/stdc++.h>
#define FWD(a,b,c) for(int a=(b); a<(c); ++a)
#define BCK(a,b,c) for(int a=(b); a>(c); --a)
#define x first
#define y second

using namespace std;

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

const int MAXN = 100010;
const int MAXV = 2000010;

int y, n, k;

int main(){
	for(int s=y+(k-y%k)%k; s<=n; s+=k)
		printf("%d ", s-y);
	if(y+(k-y%k)%k>n) printf("-1");
	printf("\n");
	return 0;
}


#include <bits/stdc++.h>
#define FWD(a,b,c) for(int a=(b); a<(c); ++a)
#define BCK(a,b,c) for(int a=(b); a>(c); --a)
#define x first
#define y second

using namespace std;

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

const int MAXN = 100010;
const int MAXV = 2000010;

int y, n, k;

int main(){
	scanf("%d %d %d", &y, &k, &n);
	for(int s=y+(k-y%k); s<=n; s+=k)
		printf("%d ", s-y);
	if(y+(k-y%k)%k>n) printf("-1");
	printf("\n");
	return 0;
}


#include <iostream>
#include <string>
#include <vector>
#include <sstream>
#include <cstdio>

using namespace std;
int main()
{
    long long  y , k , n  , c=0 , x , check=0;
    cin >> y >> k >> n ;
    for (int i = y+1 ; i<=n ; i++ )
    {
        if ( i < k ) { i += (k - y) - 2 ; c += (k-y )-1 ;}
        else {
          c++;
        if ( i % k == 0 )
        {
           check=1; break ;
        }
     }
    }
    if (check==1)
    {
        for(int i = c ; i <= n-y ; i += k )
            cout<<i<<" ";
    }
    if (check == 0) cout<<-1;
}


#include <iostream>
#include <string>
#include <vector>
#include <sstream>
#include <cstdio>
using namespace std;
int main()
{
    long long  y , k , n  , c=0 , x , check=0;
    cin >> y >> k >> n ;
    for (int i = y+1 ; i<=n ; i++ )
    {
        if (i<k) { i += (k-y)-2 ; c += (k-y ) ;}
        else {
        if ( i % k == 0 )
        {
           check=1; break ;
        }
         c++;
    }
    }
    if (check==1)
    {
        for(int i = c ; i <= n-y ; i += k )
            cout<<i<<" ";
    }
    if (check == 0) cout<<-1;
}


#include <iostream>
#include <string>
#include <vector>
#include <sstream>
#include <cstdio>

using namespace std;
int main()
{
    long long  y , k , n  , c = 0  , check=0;
    cin >> y >> k >> n ;
    for (int i = y+1 ; i<=n ; i++ )
    {
        if ( i < k ) { i += (k - y) - 2 ; c += (k-y )-1 ;}
        else if ((i-1)==k) {i += k-2 ; c += k-1 ; }
        else {
        c++;
        if ( i % k == 0 )
        {
           check=1; break ;
        }
     }

    }
    if (check==1)
    {
        for(int i = c ; i <= n-y ; i += k )
            cout<<i<<" ";
    }
    if (check == 0) cout<<-1;
}


#include <iostream>
#include <string>
#include <vector>
#include <sstream>
#include <cstdio>

using namespace std;
int main()
{
    long long  y , k , n  , c = 0  ;
    cin >> y >> k >> n ;
      c =  k - ( y % k ) ;
  if (c + y > n) cout<<-1 ;
  else {
        for(int i = c ; i <= n-y ; i += k )
            cout<<i<<" ";
    }
}


#include <iostream>
#include <string>
#include <vector>
#include <sstream>
#include <cstdio>
using namespace std;
int main()
{
    long long  y , k , n  , c=0 , x , check=0;
    cin >> y >> k >> n ;
    for (int i = y ; i<=n ; i++ )
    {
        if (i<k) { i += (k-y)-1 ; c += (k-y ) ;}
        else {
        if ( i % k == 0 )
        {
           check=1; break ;
        }
         c++;
    }
    }
    if (check==1)
    {
        for(int i = c ; i <= n-y ; i += k )
            cout<<i<<" ";
    }
    if (check == 0) cout<<-1;
}


#include <iostream>
#include <string>
#include <vector>
#include <sstream>
#include <cstdio>
using namespace std;
int main()
{
    long long  y , k , n  , c=0 , x , check=0;
    cin >> y >> k >> n ;
    for (int i = y+1 ; i<n ; i++ )
    {
        c++;
        if ( i % k == 0 )
        {
           check=1; break ;
        }
    }
    if (check==1)
    {
        for(int i = c ; i <= n-y ; i += k )
            cout<<i<<" ";
    }
    if (check == 0) cout<<-1;
}


#include<iostream>
#include<map>
using namespace std;

const int N=100100;
int main(){
    long long y,k,n;
    long long ans[N]={0},fact[N]={0},siz=0;
    cin>>y>>k>>n;
    for(int i=0;i<=(n/k);i++) fact[i]=(i)*k;
    for(int i=0;(fact[i])<n;i++){
        if(y>fact[i]) continue;
        if(fact[i]>=y) ans[siz++]=fact[i]-y;
    }
    for(int i=0;i<siz;i++) cout<<ans[i]<<" ";
    if(siz==0) cout<<"-1";

return 0;
}


#include<iostream>
#include<map>
using namespace std;

const int N=100100;
int main(){
    long long y,k,n;
    long long ans[N]={0},fact[N]={0},siz=0;
    cin>>y>>k>>n;
    for(int i=0;i<(n/k);i++) fact[i]=(i+1)*k;
    for(int i=0;(fact[i])<=n;i++){
        if(y>=fact[i]) continue;
        if(fact[i]>=y) ans[siz++]=fact[i]-y;
    }
    for(int i=0;i<siz;i++) cout<<ans[i]<<" ";
    if(siz==0) cout<<"-1";

return 0;
}


#include<iostream>
#include<map>
using namespace std;

const int N=100100;
int main(){
    long long y,k,n;
    long long ans[N]={0},fact[N]={0},siz=0;
    cin>>y>>k>>n;
    for(int i=0;i<(n/k);i++) fact[i]=(i+1)*k;
    for(int i=0;fact[i]<n;i++){
        if(y>fact[i]) continue;
        if(fact[i]>=y) ans[siz++]=fact[i]-y;
    }
    for(int i=0;i<siz;i++) cout<<ans[i]<<" ";
    if(siz==0) cout<<"-1";

return 0;
}


#include <iostream>

int main(void)
{
    int y, n, k, f = 1, res = 0;
    std::cin >> y >> k >> n;
    int q = (y + 1) / k;
    for (int i = k * q -  y; i + y <= n; i += k)
    {
        if ((i  + y) % k == 0 && (i >= 1))
        {
            ++res;
            std::cout << i << ' ';
        }
    }
    if (!res)
        std::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 long x,y,n,k;
    cin>>y>>k>>n;
    x=floor(n/k)*k;
    vector<long long>v;
    if(x-y<=0){cout<<-1<<endl;return 0;}
    for(int i=x;i>y;i-=k)
    {
        v.push_back(i-y);
    }
    x=v.size();
    sort(v.begin(),v.end());
    for(int i=0;i<x;i++)
    {
        cout<<v[i]<<endl;
    }

}


//4057974   Jul 13, 2013 9:21:57 AM	fuwutu	 239A - Two Bags of Potatoes	 GNU C++0x	Accepted	62 ms	0 KB
#include <cstdio>

int main()
{
    int y, k, n;
    scanf("%d%d%d", &y, &k, &n);
    int x = k - y % k;
    int top = n - y;
    if (x <= top)
    {
        printf("%d", x);
        x += k;
        while (x <= top)
        {
            printf(" %d", x);
            x += k;
        }
        printf("\n");
    }
    else
    {
        printf("-1\n");
    }
    return 0;
}


#include<iostream>
using namespace std;

int main()
{
	int y, k, n, x1, x2;
	cin >> y >> k >> n;
	x1 = k - y % k;
	x2 = n - y;

	if (x1 <= x2){
		cout << x1<<" ";
		x1 += k;
		while (x1 <= x2)
		{
			cout << x1 << " ";
			x1 += k;

		}
	}
	else
		cout << "-1";

	return 0;
}


#include <iostream>

using namespace std;

int main()
{
    int y, k, n;
    cin >> y >> k >> n;
    int res = k - y % k;

    if (res + y > n)
        cout << -1;

    while (res + y <= n)
    {
        cout << res << " ";
        res += k;
    }

    cout << endl;
    return 0;
}


#pragma comment(linker, "/STACK:16777216")
#include <ctime>
#define _USE_MATH_DEFINES
#include <cmath>
#include <iostream>
#include <string>
#include <vector>
#include <map>
#include <set>
#include <algorithm>
#include <list>
#include <cstdlib>
#include <stack>
#include <deque>
#include <stdio.h>
#include <stdlib.h>
#include <queue>
#include <sstream>
#define pb push_back
#define mp make_pair
typedef long long int64;
#define int16 short
using namespace std;
const int MAXN = 100*100+100;
const int INF = 1000*1000*1000;
typedef unsigned char uchar;
const double eps = 1e-9;

int main (int argc, const char * argv[]) {
#ifndef ONLINE_JUDGE
    freopen("input.txt", "rt", stdin);
    freopen("output.txt", "wt", stdout);
    clock_t startTime = clock();
#endif
    //------------------------------------------
	int y, k, n;
	scanf("%d%d%d", &y, &k, &n);
	vector<int> ans;
	int x = n-y;
	while(x+y > k && x > 0 && (x+y)%k != 0) x--;
	for(int i = x; i > 0; i-=k) {
		//if((i+y)%k == 0)
			ans.push_back(i);
	}
	if(ans.size() == 0)
		puts("-1");
	else
		for(int i = ans.size() - 1; i >= 0; i--)
			printf("%d ", ans[i]);
    //------------------------------------------
endcode:
#ifndef ONLINE_JUDGE
    clock_t endTime = clock();
    printf("\n%lf", double(endTime-startTime)/CLOCKS_PER_SEC);
    fclose(stdout);
#endif
    return 0;
}


#pragma comment(linker, "/STACK:16777216")
#include <ctime>
#define _USE_MATH_DEFINES
#include <cmath>
#include <iostream>
#include <string>
#include <vector>
#include <map>
#include <set>
#include <algorithm>
#include <list>
#include <cstdlib>
#include <stack>
#include <deque>
#include <stdio.h>
#include <stdlib.h>
#include <queue>
#include <sstream>
#define pb push_back
#define mp make_pair
typedef long long int64;
#define int16 short
using namespace std;
const int MAXN = 100*100+100;
const int INF = 1000*1000*1000;
typedef unsigned char uchar;
const double eps = 1e-9;

int main (int argc, const char * argv[]) {
#ifndef ONLINE_JUDGE
    freopen("input.txt", "rt", stdin);
    freopen("output.txt", "wt", stdout);
    clock_t startTime = clock();
#endif
    //------------------------------------------
	int y, k, n;
	scanf("%d%d%d", &y, &k, &n);
	vector<int> ans;
	int x = n-y;
	while(x > 0 && (x+y)%k != 0) x--;
	for(int i = x; i > 0; i-=k) {
		//if((i+y)%k == 0)
			ans.push_back(i);
	}
	if(ans.size() == 0)
		puts("-1");
	else
		for(int i = ans.size() - 1; i >= 0; i--)
			printf("%d ", ans[i]);
    //------------------------------------------
endcode:
#ifndef ONLINE_JUDGE
    clock_t endTime = clock();
    printf("\n%lf", double(endTime-startTime)/CLOCKS_PER_SEC);
    fclose(stdout);
#endif
    return 0;
}


#pragma comment(linker, "/STACK:16777216")
#include <ctime>
#define _USE_MATH_DEFINES
#include <cmath>
#include <iostream>
#include <string>
#include <vector>
#include <map>
#include <set>
#include <algorithm>
#include <list>
#include <cstdlib>
#include <stack>
#include <deque>
#include <stdio.h>
#include <stdlib.h>
#include <queue>
#include <sstream>
#define pb push_back
#define mp make_pair
typedef long long int64;
#define int16 short
using namespace std;
const int MAXN = 100*100+100;
const int INF = 1000*1000*1000;
typedef unsigned char uchar;
const double eps = 1e-9;

int main (int argc, const char * argv[]) {
#ifndef ONLINE_JUDGE
    freopen("input.txt", "rt", stdin);
    freopen("output.txt", "wt", stdout);
    clock_t startTime = clock();
#endif
    //------------------------------------------
	int y, k, n;
	scanf("%d%d%d", &y, &k, &n);
	vector<int> ans;
	int x = n-y;
	while(x+y >= k && x > 0 && (x+y)%k != 0) x--;
	for(int i = x; i > 0; i-=k) {
		//if((i+y)%k == 0)
			ans.push_back(i);
	}
	if(ans.size() == 0)
		puts("-1");
	else
		for(int i = ans.size() - 1; i >= 0; i--)
			printf("%d ", ans[i]);
    //------------------------------------------
endcode:
#ifndef ONLINE_JUDGE
    clock_t endTime = clock();
    printf("\n%lf", double(endTime-startTime)/CLOCKS_PER_SEC);
    fclose(stdout);
#endif
    return 0;
}


#pragma comment(linker, "/STACK:16777216")
#include <ctime>
#define _USE_MATH_DEFINES
#include <cmath>
#include <iostream>
#include <string>
#include <vector>
#include <map>
#include <set>
#include <algorithm>
#include <list>
#include <cstdlib>
#include <stack>
#include <deque>
#include <stdio.h>
#include <stdlib.h>
#include <queue>
#include <sstream>
#define pb push_back
#define mp make_pair
typedef long long int64;
#define int16 short
using namespace std;
const int MAXN = 100*100+100;
const int INF = 1000*1000*1000;
typedef unsigned char uchar;
const double eps = 1e-9;

int main (int argc, const char * argv[]) {
#ifndef ONLINE_JUDGE
    freopen("input.txt", "rt", stdin);
    freopen("output.txt", "wt", stdout);
    clock_t startTime = clock();
#endif
    //------------------------------------------
	int y, k, n;
	scanf("%d%d%d", &y, &k, &n);
	vector<int> ans;
	int x = n-y;
	while(x+y >= k && x > 0 && (x+y)%k != 0) x--;
	if((x+y)%k == 0)
		for(int i = x; i > 0; i-=k) {
			//if((i+y)%k == 0)
				ans.push_back(i);
		}
	if(ans.size() == 0)
		puts("-1");
	else
		for(int i = ans.size() - 1; i >= 0; i--)
			printf("%d ", ans[i]);
    //------------------------------------------
endcode:
#ifndef ONLINE_JUDGE
    clock_t endTime = clock();
    printf("\n%lf", double(endTime-startTime)/CLOCKS_PER_SEC);
    fclose(stdout);
#endif
    return 0;
}


#include<bits/stdc++.h>
#define pb push_back
#define SZ(a) (int)(a.size())
#define sorta(a) sort(a.begin(),a.end())
#define sortrev(a) sort(a.rbegin(),a.rend())
#define mp make_pair
#define rep(i,a,b) for(int i=a;i<b;i++)
#define VI vector<int>
typedef long long LL;
using namespace std;
LL powmod(LL a, LL p, LL mod)
{
	LL ret = 1;while(p){if(p&1)ret = (ret*a)%mod;a=(a*a)%mod;p/=2;}return ret;
}
int pow(int a, int p)
{
	int ret = 1;while(p){if(p&1)ret = (ret*a);a=(a*a);p/=2;}return ret;
}
int main()
{
	cin.sync_with_stdio(0);
	cin.tie(0);
	int y,k,n;
	cin>>y>>k>>n;
	int i=y+1;
	while(1)
	{
		if(i%k==0)
			break;
		i++;
	}
	if(i>n)
	{
		cout<<"-1"<<endl;
		return 0;
	}
	int j=i-y;
	VI z;
	while(1)
	{
		if(j+y<=n)
		{
			z.pb(j);
			j=j+k;
		}
		else
			break;
	}
	for(int j=0;j<z.size();j++)
	{
		if(j==0)
			cout<<z[j];
		else
			cout<<" "<<z[j];
	}
	cout<<endl;
	return 0;
}


#include<bits/stdc++.h>
#define pb push_back
#define SZ(a) (int)(a.size())
#define sorta(a) sort(a.begin(),a.end())
#define sortrev(a) sort(a.rbegin(),a.rend())
#define mp make_pair
#define rep(i,a,b) for(int i=a;i<b;i++)
#define VI vector<int>
typedef long long LL;
using namespace std;
LL powmod(LL a, LL p, LL mod)
{
	LL ret = 1;while(p){if(p&1)ret = (ret*a)%mod;a=(a*a)%mod;p/=2;}return ret;
}
int pow(int a, int p)
{
	int ret = 1;while(p){if(p&1)ret = (ret*a);a=(a*a);p/=2;}return ret;
}
int main()
{
	cin.sync_with_stdio(0);
	cin.tie(0);
	int y,k,n;
	cin>>y>>k>>n;
	if(k==n)
	{
		cout<<n-y<<endl;
		return 0;
	}
	int i=y+1;
	while(1)
	{
		if(i%k==0)
			break;
		i++;
	}
	if(i>n)
	{
		cout<<"-1"<<endl;
		return 0;
	}
	int j=i-y;
	VI z;
	while(1)
	{
		if(j+y<=n)
		{
			if(j==i-y)
				cout<<j;
			else
				cout<<" "<<j;
			j=j+k;
		}
		else
			break;
	}
	cout<<endl;
	return 0;
}


#include<bits/stdc++.h>
#define pb push_back
#define SZ(a) (int)(a.size())
#define sorta(a) sort(a.begin(),a.end())
#define sortrev(a) sort(a.rbegin(),a.rend())
#define mp make_pair
#define rep(i,a,b) for(int i=a;i<b;i++)
#define VI vector<int>
typedef long long LL;
using namespace std;
LL powmod(LL a, LL p, LL mod)
{
	LL ret = 1;while(p){if(p&1)ret = (ret*a)%mod;a=(a*a)%mod;p/=2;}return ret;
}
int pow(int a, int p)
{
	int ret = 1;while(p){if(p&1)ret = (ret*a);a=(a*a);p/=2;}return ret;
}
int main()
{
	cin.sync_with_stdio(0);
	cin.tie(0);
	int y,k,n;
	cin>>y>>k>>n;
	if(k>y)
	{
		int v=k-y;
		if(v+y<=n)
			cout<<v;
		else
		{
			cout<<"-1"<<endl;
			return 0;
		}
		while(1)
		{
			v+=k;
			if(v+y<=n)
				cout<<" "<<v;
			else
				break;
		}
		cout<<endl;
		return 0;
	}
	if(k==y)
	{
		int w=y;
		if(w+y<=n)
			cout<<w;
		else
		{
			cout<<"-1"<<endl;
			return 0;
		}
		while(1)
		{
			w+=y;
			if(w+y<=n)
				cout<<" "<<w;
			else
				break;
		}
		cout<<endl;
		return 0;
	}
	if(k<y)
	{
		int z=(((y/k)+1)*k)-y;
		if(z+y<=n)
			cout<<z;
		else
		{
			cout<<"-1"<<endl;
			return 0;
		}
		while(1)
		{
			z+=k;
			if(z+y<=n)
				cout<<" "<<z;
			else
				break;
		}
		cout<<endl;
		return 0;
	}

}


#include<bits/stdc++.h>
#define pb push_back
#define SZ(a) (int)(a.size())
#define sorta(a) sort(a.begin(),a.end())
#define sortrev(a) sort(a.rbegin(),a.rend())
#define mp make_pair
#define rep(i,a,b) for(int i=a;i<b;i++)
#define VI vector<int>
typedef long long LL;
using namespace std;
LL powmod(LL a, LL p, LL mod)
{
	LL ret = 1;while(p){if(p&1)ret = (ret*a)%mod;a=(a*a)%mod;p/=2;}return ret;
}
int pow(int a, int p)
{
	int ret = 1;while(p){if(p&1)ret = (ret*a);a=(a*a);p/=2;}return ret;
}
int main()
{
	cin.sync_with_stdio(0);
	cin.tie(0);
	int y,k,n;
	cin>>y>>k>>n;
	int i=y+1;
	while(1)
	{
		if(i%k==0)
			break;
		i++;
	}
	if(i>n)
	{
		cout<<"-1"<<endl;
		return 0;
	}
	int j=i-y;
	VI z;
	while(1)
	{
		if(j+y<=n)
		{
			if(j==i-y)
				cout<<j;
			else
				cout<<" "<<j;
			j=j+k;
		}
		else
			break;
	}
	cout<<endl;
	return 0;
}


#include <set>
#include <map>
#include <cmath>
#include <ctime>
#include <queue>
#include <stack>
#include <vector>
#include <string>
#include <cctype>
#include <cstdio>
#include <iomanip>
#include <sstream>
#include <cstdlib>
#include <cassert>
#include <climits>
#include <complex>
#include <numeric>
#include <valarray>
#include <iostream>
#include <string.h>
#include <algorithm>
using namespace std;

typedef long long ll;
typedef vector<ll> vi;
typedef vector<vi> vvi;
typedef vector<string> vs;

#define inf 1061109567
#define pb push_back
#define mp make_pair
#define all(a) a.begin(),a.end()
#define mem(x,a) memset(x,a,sizeof(x))
#define rep(i,n) for(int i(0),_n(n);i<_n;++i)
#define repi(i,a,b) for(int i(a),_b(b);i<_b;++i)
#define repe(it,c) for(__typeof((c).begin()) it=(c).begin();it!=(c).end();++it)
#define len(x) ((int)(x.size()))

ll n,y,k,t1,t2;

vi v;

int main(){
    ios_base::sync_with_stdio(0);

    cin>>y>>k>>n;

    repi(i,1,100001){

        t1=i*k;
        if(t1>y&&t1<=n)v.pb(t1-y);

    }

    sort(all(v));

    if(len(v)==0)cout<<-1;
    else{
        rep(i,len(v))cout<<v[i]<<" ";
    }

}


#include <iostream>

using namespace std;
int vis[1000010];
bool printed=false;
int main()
{
    int y,k,n;
    cin>>y>>k>>n;
    int kk=k;
    while(k<=n){
        int c=k-y;
        if(c>=1&&c<=k)cout<<c<<" ",printed=true;
        k+=kk;
    }
    if(!printed)cout<<-1;
    return 0;
}


#include <iostream>

using namespace std;
int vis[1000010];
bool printed=false;
int main()
{
    int y,k,n;
    cin>>y>>k>>n;
    int kk=k;
    while(k<=n){
        vis[k]=true;
        int c=k-y;
        if(c>=1&&c<=k)cout<<c<<" ",printed=true;
        k+=kk;
    }
    if(!printed)cout<<-1;
    return 0;
}


#include <iostream>
using namespace std;
int main()
{
	typedef unsigned long long int uint;
	uint y, k, n;
	cin >> y >> k >> n;
	if( y >= n ) {
		cout << -1 << endl;
		return 0;
	}
	uint x_max = n - y;
	uint i = 0;
	for(; i < x_max; ++i) {
		if( ((y + i) % k) == 0 )
			break;
	}
	for(uint x = i; x <= x_max; x += k)
		cout << x << " ";
	cout << endl;
	return 0;
}


#include <iostream>
using namespace std;
int main()
{
	typedef unsigned long long int uint;
	uint y, k, n;
	cin >> y >> k >> n;
	if( y >= n ) {
		cout << -1 << endl;
		return 0;
	}
	uint x_max = n - y;
	uint i = y % k;
	for(uint x = i; x <= x_max; x += k)
		cout << x << " ";
	cout << endl;
	return 0;
}


#include <iostream>
using namespace std;
int main()
{
	typedef unsigned long long int uint;
	uint y, k, n;
	cin >> y >> k >> n;
	if( y >= n ) {
		cout << -1 << endl;
		return 0;
	}
	uint x_max = n - y;
	uint i = 1;
	for(; i <= x_max; ++i) {
		if( ((y + i) % k) == 0 )
			break;
	}
	for(uint x = i; x <= x_max; x += k)
		cout << x << " ";
	cout << endl;
	return 0;
}


#include <iostream>
#include <list>
#include <algorithm>
#include <iterator>
typedef unsigned long long int __int64__;
using namespace std;
int main()
{
	list<__int64__> x;
	__int64__ y, k, n;
	cin >> y >> k >> n;
	bool ok = false;
	__int64__ _x = n - y;
	while( _x > 0 && _x <= n )
	{
		if( ok == true ) {
			x.push_back( _x );
			_x -= k;
		} else if( ((_x + y) % k) == 0 ) {
			ok = true;
			x.push_back( _x );
			_x -= k;
		} else {
			--_x;
		}
	}
	if( ok == false ) {
		cout << -1 << endl;
	} else {
		copy( x.rbegin(),
			x.rend(),
			ostream_iterator<__int64__>(cout, " ")
		);
		cout << endl;
	}
	return 0;
}


#include <iostream>
using namespace std;
int main()
{
	typedef unsigned long long int uint;
	uint y, k, n;
	cin >> y >> k >> n;
	if( y >= n ) {
		cout << -1 << endl;
		return 0;
	}
	uint x_max = n - y;
	uint i = 0;
	if( y > k )
		i = k - y % k;
	else
		i = k - y;
	bool ok = false;
	if( i == 0 )
		i += k;
	for(uint x = i; x <= x_max; x += k) {
		cout << x << " ";
		ok = true;
	}
	if( ok == false )
		cout << -1;
	cout << endl;
	return 0;
}


#include <iostream>
#include <list>
#include <algorithm>
#include <iterator>
typedef unsigned long long int __int64__;
using namespace std;
int main()
{
	list<__int64__> x;
	__int64__ y, k, n;
	cin >> y >> k >> n;
	bool ok = false;
	if( ( y % k ) == 0 ) {
		if(y != n) {
			ok = true;
			for(int i = y + k; i <= n; i += k)
				x.push_front( i - y );
		}
	} else {
		__int64__ _x = n - y;
		while( _x > 0 && _x <= n )
		{
			if( ok == true ) {
				x.push_back( _x );
				_x -= k;
			} else if( ((_x + y) % k) == 0 ) {
				ok = true;
				x.push_back( _x );
				_x -= k;
			} else {
				--_x;
			}
		}
	}
	if( ok == false ) {
		cout << -1 << endl;
	} else {
		copy( x.rbegin(),
			x.rend(),
			ostream_iterator<__int64__>(cout, " ")
		);
		cout << endl;
	}
	return 0;
}


#include <iostream>
using namespace std;
int main()
{
	typedef unsigned long long int uint;
	uint y, k, n;
	cin >> y >> k >> n;
	if( y >= n ) {
		cout << -1 << endl;
		return 0;
	}
	uint x_max = n - y;
	uint i = k - y % k;
	if( i == 0 )
		i += k;
	for(uint x = i; x <= x_max; x += k)
		cout << x << " ";
	cout << endl;
	return 0;
}


#include <iostream>
using namespace std;
int main()
{
	typedef unsigned long long int uint;
	uint y, k, n;
	cin >> y >> k >> n;
	if( y >= n ) {
		cout << -1 << endl;
		return 0;
	}
	uint x_max = n - y;
	uint i = y % k;
	if( i == 0 )
		i += k;
	for(uint x = i; x <= x_max; x += k)
		cout << x << " ";
	cout << endl;
	return 0;
}


#include <iostream>
using namespace std;
int main()
{
	typedef unsigned long long int uint;
	uint y, k, n;
	cin >> y >> k >> n;
	if( y >= n ) {
		cout << -1 << endl;
		return 0;
	}
	uint x_max = n - y;
	uint i = 0;
	if( y > k )
		i = k - y % k;
	else
		i = k - y;
	if( i == 0 )
		i += k;
	for(uint x = i; x <= x_max; x += k)
		cout << x << " ";
	cout << endl;
	return 0;
}


#include <iostream>
#include <vector>
#include <algorithm>
#include <iterator>
typedef unsigned long long int __int64__;
using namespace std;
int main()
{
	vector<__int64__> x;
	__int64__ y, k, n;
	cin >> y >> k >> n;
	x.reserve( n / 2 );
	bool ok = false;
	__int64__ _x = n - y;
	while( _x > 0 && _x <= n )
	{
		if( ok == true ) {
			x.push_back( _x );
			_x -= k;
		} else if( ((_x + y) % k) == 0 ) {
			ok = true;
			x.push_back( _x );
			_x -= k;
		} else {
			--_x;
		}
	}
	if( ok == false ) {
		cout << -1 << endl;
	} else {
		copy( x.rbegin(),
			x.rend(),
			ostream_iterator<__int64__>(cout, " ")
		);
		cout << endl;
	}
	return 0;
}


#include <iostream>
#include <list>
#include <algorithm>
#include <iterator>
typedef unsigned long long int __int64__;
using namespace std;
int main()
{
	list<__int64__> x;
	__int64__ y, k, n;
	cin >> y >> k >> n;
	bool ok = false;
	if( ( y % k ) == 0 ) {
		ok = true;
		for(int i = y + k; i <= n; i += k)
			x.push_front( i - y );
	} else {
		__int64__ _x = n - y;
		while( _x > 0 && _x <= n )
		{
			if( ok == true ) {
				x.push_back( _x );
				_x -= k;
			} else if( ((_x + y) % k) == 0 ) {
				ok = true;
				x.push_back( _x );
				_x -= k;
			} else {
				--_x;
			}
		}
	}
	if( ok == false ) {
		cout << -1 << endl;
	} else {
		copy( x.rbegin(),
			x.rend(),
			ostream_iterator<__int64__>(cout, " ")
		);
		cout << endl;
	}
	return 0;
}


#include <iostream>
using namespace std;
int main()
{
	typedef unsigned long long int uint;
	uint y, k, n;
	cin >> y >> k >> n;
	if( y >= n ) {
		cout << -1 << endl;
		return 0;
	}
	uint x_max = n - y;
	uint i = 0;
	for(; i <= x_max; ++i) {
		if( ((y + i) % k) == 0 )
			break;
	}
	for(uint x = i; x <= x_max; x += k)
		cout << x << " ";
	cout << endl;
	return 0;
}


#include <iostream>
#include <cstdio>
#include <vector>

using namespace std;

vector<int> a;

int main() {
    int y, k, n;

    cin >> y >> k >> n;
    for (int i = 1; i <= 100000; ++i) {
        if ((i + y) <= n && (i + y) % k == 0) {
            a.push_back(i);
        }
    }
    if (a.size() == 0) {
        puts("-1");
        return 0;
    }
    for (size_t i = 0; i < a.size(); ++i) {
        printf("%d ", a[i]);
    }
}


#include <iostream>
#include <cstdio>
#include <vector>

using namespace std;

vector<int> a;

int main() {
    long long y, k, n;

    cin >> y >> k >> n;
    long long t = k;
    while (k <= n) {
        int x = k - y;
        if (x >= 1 && x + y <= n) {
            a.push_back(x);
        }
        k += t;
    }
    if (a.size() == 0) {
        puts("-1");
        return 0;
    }
    for (size_t i = 0; i < a.size(); ++i) {
        printf("%d ", a[i]);
    }
}


#include<bits/stdc++.h>
using namespace std;
int main(){
    long long a, b ,c, f = 0;
    cin >> a >> b >> c;
    for(int i =  b;  i <= c; i+=b){
        if(i < a )continue;
        else{
            if(i <= c && i - a > 0){
                f = 1;
                cout << i - a << " ";
            }
        }
    }
    if(!f)cout << "-1"<<endl;
    else cout << endl;

}


#include <iostream>
#include <vector>
#include <string>
#include <algorithm>

using namespace std;

int y, k, n;

int main() {
    cin >> y >> k >> n;
    int oldy = y;
    if (y + y%k <= n && y+1 <= n)
        y += k-y%k;
    else {
        cout << -1 << endl;
        return 0;
    }

    while (y <= n) {
        cout << y - oldy << " ";
        y += k;
    }
}


#include <iostream>
#include <vector>
#include <string>
#include <algorithm>

using namespace std;

int y, k, n;

int main() {
    cin >> y >> k >> n;
    int oldy = y;
    if (y + y%k <= n && y+1 <= n && k <= n)
        y += k-y%k;
    else {
        cout << -1 << endl;
        return 0;
    }

    while (y <= n) {
        cout << y - oldy << " ";
        y += k;
    }
}


#include <iostream>
#include <vector>
#include <string>
#include <algorithm>

using namespace std;

int y, k, n;

int main() {
    cin >> y >> k >> n;
    int oldy = y;
    if (y + k-y%k <= n && y+1 <= n && k <= n)
        y += k-y%k;
    else {
        cout << -1 << endl;
        return 0;
    }

    while (y <= n) {
        cout << y - oldy << " ";
        y += k;
    }
}


#include<stdio.h>
int main(){
	int n,k,y;
	scanf("%d%d%d",&y,&k,&n);
	int x=(k-(y%k));
	if(x>(n-y))
		printf("-1\n");
	else{
	while(x<=(n-y)){
		printf("%d ",x);
		x+=k;
	}
	}
	return 0;
}


#include <cmath>
#include <cstdlib>
#include <cstdio>
#include <iostream>
#include <iomanip>
#include <map>
#include <queue>
#include <set>
#include <unordered_map>
#include <unordered_set>
#include <string>
#include <bitset>
#include <algorithm>
#include <cstring>

using namespace std;

#define rep(i,a,b) for(int i = (a); i < int(b); ++i)
#define rrep(i, a, b) for(int i = (a) - 1; i >= b; --i)
#define trav(it, v) for(__typeof((v).begin()) it = (v).begin(); it != (v).end(); ++it)
#define all(v) (v).begin(), (v).end()

typedef double fl;
typedef long long ll;
typedef pair<int, int> pii;
typedef vector<int> vi;
typedef vector<pii> vpi;

template<typename T>
istream& operator>>(istream& in, vector<T> &v) {
    rep(i,0,v.size()) in >> v[i];
    return in;
}

template<typename A, typename B>
istream& operator>>(istream& in, pair<A, B> &p) {
    in >> p.first >> p.second;
    return in;
}

template<typename T>
ostream& operator<<(ostream& out, vector<T> &v) {
    if(v.size()) out << v[0];
    rep(i,1,v.size()) out << ' ' << v[i];
    return out;
}

template<typename A, typename B>
ostream& operator<<(ostream& out, pair<A, B> &p){
    out << p.first << ' ' << p.second;
    return out;
}

int main(){
    int y, k, n;
    cin >> y >> k >> n;
    bool found = false;
    for(int i = (y+k)/k*k; i <= n; i += k){
        cout << i - y << ' ';
        found = true;
    }
    if(!found) cout << -1 << endl;
    cout << endl;
}


#include<stdio.h>
int main(){
    int n,k,y;
    scanf("%d%d%d",&y,&k,&n);
    int x=(k-(y%k));
    if(x>(n-y))
        printf("-1\n");
    else{
    while(x<=(n-y)){
        printf("%d ",x);
        x+=k;
    }
    }
    return 0;
}


#include <iostream>
#include <cmath>
#include <cstdio>
#include <iomanip>
#include <algorithm>
#include <cstdio>
#include <vector>
#include <map>
#include <sstream>
#include <queue>
#include <stack>
#include <set>
#include <string>
#include <string.h>
using namespace std;
#define all(x) x.begin(),x.end()
typedef long long ll;
typedef unsigned long long ull;
int gcd(int a, int b) {
    while (a %= b ^= a ^= b ^= a);
    return b;
}
int lcm(int a, int b) {
    return (a*b) / gcd(a, b);
}
ll power(ll a, ll b) {
    if (b == 0) {
        return 1;
    }
    if (b == 1) {
        return a;
    }
    if (b % 2 == 0) {
        return power(a*a, b / 2);
    }
    else {
        return (a * power(a*a, (b - 1) / 2));
    }
}
ull choose(ull n, ull k) {
    if (k > n) {
        return 0;
    }
    ull r = 1;
    for (ull d = 1; d <= k; ++d) {
        r *= n--;
        r /= d;
    }
    return r;
}
int main() {
    int n, y, k;
    cin >> y >> k >> n;
    int c = gcd(k, n);
    if (c == 1) {
        cout << -1 << endl;
        return 0;
    }
    bool ok = false;
    for (int i = c; i <= n - y; i += c) {
        if ((y + i) % k == 0) {
            cout << i << " ";
            ok = true;
        }
        if ((y + i) / k > 1e5) {
            break;
        }
    }
    cout << endl;
    if (!ok) {
        cout << -1 << endl;
    }
    return 0;
}


#include <iostream>
#include <vector>
using namespace std;
int main() {
    int y, n, k, counter = 0; cin >> y >> k >> n;
    vector<int>res;
    for (int x = 1; x <= n - y; x++) {
        if ((x + y) % k == 0) res.push_back(x);
    }
    if (res.size()) {
        for (int i = 0; i < res.size(); i++) {
            if (i) cout << " ";
            cout << res[i];
        }
        cout << endl;
    }
    else cout << -1 << endl;
    return 0;
}


#include <iostream>
#include <vector>
using namespace std;
void print(vector<int>x) {
    for (int i = 0; i < x.size(); i++) {
        if (i) cout << " ";
        cout << x[i];
    }
    cout << endl;
}
int main() {
    int y, n, k, counter = 0; cin >> y >> k >> n;
    vector<int>res;
    for (int x = 1; x <= n - y; x++) {
        if ((x + y) % k == 0) res.push_back(x);
    }
    (res.size() == 0) ? cout << "-1\n" : print(res);
    return 0;
}


#include <iostream>
#include <cmath>
#include <cstdio>
#include <iomanip>
#include <algorithm>
#include <cstdio>
#include <vector>
#include <map>
#include <sstream>
#include <queue>
#include <stack>
#include <set>
#include <string>
#include <string.h>
using namespace std;
#define all(x) x.begin(),x.end()
typedef long long ll;
typedef unsigned long long ull;
int gcd(int a, int b) {
    while (a %= b ^= a ^= b ^= a);
    return b;
}
int lcm(int a, int b) {
    return (a*b) / gcd(a, b);
}
ll power(ll a, ll b) {
    if (b == 0) {
        return 1;
    }
    if (b == 1) {
        return a;
    }
    if (b % 2 == 0) {
        return power(a*a, b / 2);
    }
    else {
        return (a * power(a*a, (b - 1) / 2));
    }
}
ull choose(ull n, ull k) {
    if (k > n) {
        return 0;
    }
    ull r = 1;
    for (ull d = 1; d <= k; ++d) {
        r *= n--;
        r /= d;
    }
    return r;
}
int main() {
    int n, y, k;
    cin >> y >> k >> n;
    int c = gcd(k, n);
    bool ok = false;
    for (int i = c; i <= n - y; i += c) {
        if ((y + i) % k == 0) {
            cout << i << " ";
            ok = true;
        }
        if ((y + i) / k > 1e5) {
            break;
        }
    }
    cout << endl;
    if (!ok) {
        cout << -1 << endl;
    }
    return 0;
}


#include <iostream>
#include <cmath>
#include <cstdio>
#include <iomanip>
#include <algorithm>
#include <cstdio>
#include <vector>
#include <map>
#include <sstream>
#include <queue>
#include <stack>
#include <set>
#include <string>
#include <string.h>
using namespace std;
#define PI 3.141592653
#define all(x) x.begin(),x.end()
#define set(a,b) memset(a,b,sizeof(a))
#define mp(a,b) make_pair(a,b)
#define pb(a) push_back(a)
typedef pair<int, int> pii;
typedef long long ll;
typedef unsigned long long ull;
int main() {
    int y, k, n;
    cin >> y >> k >> n;
    vector<int> out;
    for (int i = 1; (i*k) - (y%k) + y <= n; i++) {
        out.push_back((i*k) - (y%k));
    }
    if (out.size() == 0) {
        cout << -1 << endl;
    }
    else {
        for (int i = 0; i < out.size(); i++) {
            if (i) {
                cout << " ";
            }
            cout << out[i];
        }
        cout << endl;
    }
    return 0;
}


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

int main ()
{
	ios_base::sync_with_stdio(0); cin.tie(0);

	int y, k, n;

	while(cin >> y >> k >> n)
	{
		bool found = false;

		for (long long i = 0; i * k <=n ; ++i)
		{
			if(i * k > y)
			{
				found = true;
				cout << i*k - y << " ";
			}
		}

		if (!found) cout << -1;
		cout << endl;
	}

	return 0;
}


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

int main ()
{
	ios_base::sync_with_stdio(0); cin.tie(0);

	int y, k, n;

	while(cin >> y >> k >> n)
	{
		if (y<n)
		{
			long long start;

			for (long long x = 1; ; ++x)
			{
				if ((x + y)%k == 0)
				{
					start = x;
					break;
				}
			}

			for (long long x = start; y + x <= n; x+=k)
			{
				cout << x << " ";
			}
			cout << endl;
		}
		else
		{
			cout << -1 << endl;
		}
	}

	return 0;
}


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

int main ()
{
	ios_base::sync_with_stdio(0); cin.tie(0);

	int y, k, n;

	while(cin >> y >> k >> n)
	{
		if (y < n)
		{
			long long start;
			long long d;

			for ( d = 1; ; ++d)
			{
				if (d * k > y) break;
			}

			start = (d * k) - y;

			if (y + start <= n)
			{
				for (long long x = start; y + x <= n; x+=k)
					cout << x << " ";
			}
			else cout << -1;
			cout << endl;
		}
		else
		{
			cout << -1 << endl;
		}
	}

	return 0;
}


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

int main ()
{
	ios_base::sync_with_stdio(0); cin.tie(0);

	int y, k, n;

	while(cin >> y >> k >> n)
	{
		bool found = false;
		for (long long x = 1; (x + y) <= n; ++x)
		{
			if ((x+y) % k == 0)
			{
				found = true;
				cout << x << " ";
			}
		}

		if (!found) cout << -1;

		cout << endl;

	}

	return 0;
}


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

int main ()
{
	ios_base::sync_with_stdio(0); cin.tie(0);

	int y, k, n;

	while(cin >> y >> k >> n)
	{
		if (y < n)
		{
			long long start;
			long long d;

			for ( d = 1; ; ++d)
			{
				if (d * k > y) break;
			}

			start = (d * k) - y;

			for (long long x = start; y + x <= n; x+=k)
			{
				cout << x << " ";
			}
			cout << endl;
		}
		else
		{
			cout << -1 << endl;
		}
	}

	return 0;
}


#include <cstdio>

int main() {
	int y, k, n;
	scanf("%d%d%d", &y, &k, &n);
	bool ok = false;
	int i = (y + k - 1) / k * k;
	for (; i <= n; i += k) if (i - y >= 1) printf("%d ", i - y), ok = true;
	if (!ok) printf("-1");
	printf("\n");

	return 0;
}


#include <iostream>
#include <cstdio>
#include <math.h>
#include <vector>
#include <map>
#include <stdio.h>
#include <string>
#include <algorithm>
#include <stack>
#include <set>
#include <queue>
#include <sstream>
#include <iomanip>
#define Read(n,to) for(int i=0;i<n;++i) cin>>to[i];
using namespace std;

double S(long long a, long long b, long long c)
{
    if(a+b<c)
        return 0;
    double p=(a+b+c)/2.0;
    double res=sqrt(p*(p-a)*(p-b)*(p-c));
    return res;
}

int main()
{
#ifdef _DEBUG
    freopen("Input.txt","r",stdin);
    freopen("Output.txt","w",stdout);
#endif

    int y,k,n;
    cin>>y>>k>>n;
    vector<int> ans(0);
    for(int t=1;t<=100000;++t)
        if(k*t<n && k*t>y)
        {
            ans.push_back(k*t-y);
        }
        if(ans.size()==0)
            cout<<-1;
        else
            for(int i=0;i<ans.size();++i)
                printf("%d ",ans[i]);
    return 0;
}


#include <iostream>
#include <cstdio>
#include <math.h>
#include <vector>
#include <map>
#include <stdio.h>
#include <string>
#include <algorithm>
#include <stack>
#include <set>
#include <queue>
#include <sstream>
#include <iomanip>
#define Read(n,to) for(int i=0;i<n;++i) cin>>to[i];
using namespace std;

double S(long long a, long long b, long long c)
{
    if(a+b<c)
        return 0;
    double p=(a+b+c)/2.0;
    double res=sqrt(p*(p-a)*(p-b)*(p-c));
    return res;
}

int main()
{
#ifdef _DEBUG
    freopen("Input.txt","r",stdin);
    freopen("Output.txt","w",stdout);
#endif

    long long y,k,n;
    cin>>y>>k>>n;
    vector<long long> ans(0);
    for(long long t=1;t<=100000;++t)
        if(k*t<=n && k*t>y)
        {
            ans.push_back(k*t-y);
        }
        if(ans.size()==0)
            cout<<-1;
        else
            for(int i=0;i<ans.size();++i)
                printf("%d ",ans[i]);
    return 0;
}


#include <iostream>
#include <cstdio>
#include <math.h>
#include <vector>
#include <map>
#include <stdio.h>
#include <string>
#include <algorithm>
#include <stack>
#include <set>
#include <queue>
#include <sstream>
#include <iomanip>
#define Read(n,to) for(int i=0;i<n;++i) cin>>to[i];
using namespace std;

double S(long long a, long long b, long long c)
{
    if(a+b<c)
        return 0;
    double p=(a+b+c)/2.0;
    double res=sqrt(p*(p-a)*(p-b)*(p-c));
    return res;
}

int main()
{
#ifdef _DEBUG
    freopen("Input.txt","r",stdin);
    freopen("Output.txt","w",stdout);
#endif

    int y,k,n;
    cin>>y>>k>>n;
    vector<int> ans(0);
    for(int t=1;t<=100000;++t)
        if(k*t<=n && k*t>y)
        {
            ans.push_back(k*t-y);
        }
        if(ans.size()==0)
            cout<<-1;
        else
            for(int i=0;i<ans.size();++i)
                printf("%d ",ans[i]);
    return 0;
}


#include<stdio.h>
int a[1001000];
int main()
{
    __int64 x,y,z;
    __int64 i,sum;
    while(scanf("%I64d %I64d %I64d",&x,&y,&z)!=EOF)
    {
        for(i=0;i<10010;i++) a[i]=0;
        sum=x/y+1;
        if(x>=z||z/y<sum) printf("-1");
        else for(i=sum;i<=z/y;i++)
        {
           a[i]=i*y-x;
           if(i==z/y) printf("%d",a[i]);
           else printf("%d ",a[i]);
        }
        printf("\n");
    }
    return 0;
}


#include<stdio.h>
int a[10010];
int main()
{
    __int64 x,y,z;
    __int64 i,sum;
    while(scanf("%I64d %I64d %I64d",&x,&y,&z)!=EOF)
    {
        for(i=0;i<10010;i++) a[i]=0;
        sum=x/y+1;
        if(x>=z||z/y<sum) printf("-1");
        else for(i=sum;i<=z/y;i++)
        {
           a[i]=i*y-x;
           if(i==z/y) printf("%d",a[i]);
           else printf("%d ",a[i]);
        }
        printf("\n");
    }
    return 0;
}


#include <cstdio>

int main(){

    long y, k, n; scanf("%ld %ld %ld", &y, &k, &n);
    long a = (y % k); a = (k - a) % k;
    if(a == 0){a = k;}
    if(y + a > n){puts("-1");}
    else{while(y + a <= n){printf("%ld ", a); a += k;}}

    return 0;
}


#include <cstdio>

int main(){

    long y, k, n; scanf("%ld %ld %ld", &y, &k, &n);
    long a = (y % k); a = (k - a) % k;
    if(y + a > n || (a == 0 && y == n)){puts("-1");}
    else{while(y + a <= n){printf("%ld ", a); a += k;}}

    return 0;
}


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

typedef long long ll;
typedef unsigned long long ull;
typedef vector<int> vi;
typedef vector<ll> vll;
typedef vector<vi> vvi;
typedef pair<int,int> pii;
typedef vector<pii > vii;
typedef pair<ll,ll> pll;
typedef vector<string> vs;

#define MOD 1000000007
#define pb push_back
#define mp make_pair
#define X first
#define Y second
#define MEM(a,b) memset(a,(b),sizeof(a))
#define pr(a) cout<<#a<<" = "<<(a)<<endl
#define cin(n) long long (n); scanf("%lld", &(n))
#define cin2(n,m) long long  (n),(m); scanf("%lld%lld",&(n),&(m))
#define sz(a) int((a).size())
#define all(a) a.begin(),a.end()
#define loop(x,a,b) for(int (x) = (a);(x)<(b);(x)++)
#define rep(x,n)   for(int (x)=0;(x)<(n);(x)++)
#define tr(c,it) for(typeof((c).begin()) it = (c).begin(); it != (c).end(); it++)
#define prc(a) tr(a, it) cout<<*(it)<<" "; cout<<endl
#define pra(a,n) for(int i=0; i<(n); i++) printf("%d ",((a)[i])); printf("\n")
#define present(c,x) ((c).find(x) != (c).end())
#define cpresent(c,x) (find(all(c),x) != (c).end())
#define ain(a,n) int ((a)[(n)]); for(int i=0; i<(n); i++) scanf("%d",&((a)[i]))
#define vin(a,n) vector<int> (a); (a).resize((n)); for(int i=0; i<(n); i++) scanf("%d",&((a)[i]))
#define TEST cin(test); while(test--)
#define FILE
int main()
{
    cin(y);
    cin2(k,n);
    int x=y%k;
    x=k-x;
    if(x+y<=n)
        while(x+y<=n)
        {
            cout<<x<<" ";
            x+=k;
        }
    else
        cout<<"-1";
    return 0;
}


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

typedef long long ll;
typedef unsigned long long ull;
typedef vector<int> vi;
typedef vector<ll> vll;
typedef vector<vi> vvi;
typedef pair<int,int> pii;
typedef vector<pii > vii;
typedef pair<ll,ll> pll;
typedef vector<string> vs;

#define MOD 1000000007
#define pb push_back
#define mp make_pair
#define X first
#define Y second
#define MEM(a,b) memset(a,(b),sizeof(a))
#define pr(a) cout<<#a<<" = "<<(a)<<endl
#define cin(n) long long (n); scanf("%lld", &(n))
#define cin2(n,m) long long  (n),(m); scanf("%lld%lld",&(n),&(m))
#define sz(a) int((a).size())
#define all(a) a.begin(),a.end()
#define loop(x,a,b) for(int (x) = (a);(x)<(b);(x)++)
#define rep(x,n)   for(int (x)=0;(x)<(n);(x)++)
#define tr(c,it) for(typeof((c).begin()) it = (c).begin(); it != (c).end(); it++)
#define prc(a) tr(a, it) cout<<*(it)<<" "; cout<<endl
#define pra(a,n) for(int i=0; i<(n); i++) printf("%d ",((a)[i])); printf("\n")
#define present(c,x) ((c).find(x) != (c).end())
#define cpresent(c,x) (find(all(c),x) != (c).end())
#define ain(a,n) int ((a)[(n)]); for(int i=0; i<(n); i++) scanf("%d",&((a)[i]))
#define vin(a,n) vector<int> (a); (a).resize((n)); for(int i=0; i<(n); i++) scanf("%d",&((a)[i]))
#define TEST cin(test); while(test--)
#define FILE
int main()
{
    cin(y);
    cin2(k,n);
    int x=y%k;
    x=k-x;
    if(x+y<n)
        while(x+y<n)
        {
            cout<<x<<" ";
            x+=k;
        }
    else
        cout<<"-1";
    return 0;
}


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

typedef long long ll;
typedef unsigned long long ull;
typedef vector<int> vi;
typedef vector<ll> vll;
typedef vector<vi> vvi;
typedef pair<int,int> pii;
typedef vector<pii > vii;
typedef pair<ll,ll> pll;
typedef vector<string> vs;

#define MOD 1000000007
#define pb push_back
#define mp make_pair
#define X first
#define Y second
#define MEM(a,b) memset(a,(b),sizeof(a))
#define pr(a) cout<<#a<<" = "<<(a)<<endl
#define cin(n) long long (n); scanf("%lld", &(n))
#define cin2(n,m) long long  (n),(m); scanf("%lld%lld",&(n),&(m))
#define sz(a) int((a).size())
#define all(a) a.begin(),a.end()
#define loop(x,a,b) for(int (x) = (a);(x)<(b);(x)++)
#define rep(x,n)   for(int (x)=0;(x)<(n);(x)++)
#define tr(c,it) for(typeof((c).begin()) it = (c).begin(); it != (c).end(); it++)
#define prc(a) tr(a, it) cout<<*(it)<<" "; cout<<endl
#define pra(a,n) for(int i=0; i<(n); i++) printf("%d ",((a)[i])); printf("\n")
#define present(c,x) ((c).find(x) != (c).end())
#define cpresent(c,x) (find(all(c),x) != (c).end())
#define ain(a,n) int ((a)[(n)]); for(int i=0; i<(n); i++) scanf("%d",&((a)[i]))
#define vin(a,n) vector<int> (a); (a).resize((n)); for(int i=0; i<(n); i++) scanf("%d",&((a)[i]))
#define TEST cin(test); while(test--)
#define FILE
int main()
{
    cin(y);
    cin2(k,n);
    int x=y%k;
    x=k-x;
    if(x+y<n)
        while(x+y<=n)
        {
            cout<<x<<" ";
            x+=k;
        }
    else
        cout<<"-1";
    return 0;
}


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

typedef long long ll;
typedef unsigned long long ull;
typedef vector<int> vi;
typedef vector<ll> vll;
typedef vector<vi> vvi;
typedef pair<int,int> pii;
typedef vector<pii > vii;
typedef pair<ll,ll> pll;
typedef vector<string> vs;

#define MOD 1000000007
#define pb push_back
#define mp make_pair
#define X first
#define Y second
#define MEM(a,b) memset(a,(b),sizeof(a))
#define pr(a) cout<<#a<<" = "<<(a)<<endl
#define cin(n) long long (n); scanf("%lld", &(n))
#define cin2(n,m) long long  (n),(m); scanf("%lld%lld",&(n),&(m))
#define sz(a) int((a).size())
#define all(a) a.begin(),a.end()
#define loop(x,a,b) for(int (x) = (a);(x)<(b);(x)++)
#define rep(x,n)   for(int (x)=0;(x)<(n);(x)++)
#define tr(c,it) for(typeof((c).begin()) it = (c).begin(); it != (c).end(); it++)
#define prc(a) tr(a, it) cout<<*(it)<<" "; cout<<endl
#define pra(a,n) for(int i=0; i<(n); i++) printf("%d ",((a)[i])); printf("\n")
#define present(c,x) ((c).find(x) != (c).end())
#define cpresent(c,x) (find(all(c),x) != (c).end())
#define ain(a,n) int ((a)[(n)]); for(int i=0; i<(n); i++) scanf("%d",&((a)[i]))
#define vin(a,n) vector<int> (a); (a).resize((n)); for(int i=0; i<(n); i++) scanf("%d",&((a)[i]))
#define TEST cin(test); while(test--)
#define FILE
int main()
{
    cin(y);
    cin2(k,n);
    int x=y%k;
    x=k-x;
    while(x+y<n)
    {
        cout<<x<<" ";
        x+=k;
    }
    return 0;
}


#include <iostream>
using namespace std;
int main()
{

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

}


#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!=0){

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

  }

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

  return 0;

}


#include <bits/stdc++.h>
#define all(a) (a).begin(),(a).end()
#define ld long double
#define ll long long
#define sqr(a) (a)*(a)
#define mp make_pair
#define pb push_back
#define x first
#define y second
#define inf (int)1e9
#define pi pair<int,int>
#define y1 fdfs
using namespace std;
const int N=1e5+2;
int a[N],n,m,q,l[N],r[N],d[N],x,y,c[N],z;
ll sum,s[N];
int main()
{
    /*freopen(".in","r",stdin);
    freopen(".out","w",stdout);*/
    //ios_base::sync_with_stdio(0);
    cin.tie(0);
    cin>>n>>m>>q;
    for(int i=1;i<=n;++i)
        cin>>a[i];
    for(int i=1;i<=m;++i)
        cin>>l[i]>>r[i]>>d[i];
    while(q--)
    {
        cin>>x>>y;
        ++c[x];
        --c[y+1];
    }
    for(int i=1;i<=m;++i)
    {
        z+=c[i];
        s[l[i]]+=z*1ll*d[i];
        s[r[i]+1]-=z*1ll*d[i];
    }
    for(int i=1;i<=n;++i)
    {
        sum+=s[i];
        printf("%I64d ",sum+a[i]);
    }
}


#include <bits/stdc++.h>
#define all(a) (a).begin(),(a).end()
#define ld long double
#define ll long long
#define sqr(a) (a)*(a)
#define mp make_pair
#define pb push_back
#define x first
#define y second
#define inf (int)1e9
#define pi pair<int,int>
#define y1 fdfs
using namespace std;
const int N=1e5+1;
int a[N],n,m,q,l[N],r[N],d[N],x,y,c[N],ww[N];
ll sum,s[N];
int main()
{
    /*freopen(".in","r",stdin);
    freopen(".out","w",stdout);*/
    ios_base::sync_with_stdio(0);
    cin>>n>>m>>q;
    for(int i=1;i<=n;i++)
        cin>>a[i];
    for(int i=1;i<=m;i++)
        cin>>l[i]>>r[i]>>d[i];
    while(q--)
    {
        cin>>x>>y;
        c[x]++;
        c[y+1]--;
    }
    for(int i=1;i<=m;i++)
    {
        sum+=c[i];
        ww[i]=sum;
        s[l[i]]+=ww[i]*1ll*d[i];
        s[r[i]+1]-=ww[i]*1ll*d[i];
    }
    sum=0;
    for(int i=1;i<=n;i++)
    {
        sum+=s[i];
        printf("%I64d ",sum+a[i]);
    }
}


#include <bits/stdc++.h>
#define all(a) (a).begin(),(a).end()
#define ld long double
#define ll long long
#define sqr(a) (a)*(a)
#define mp make_pair
#define pb push_back
#define x first
#define y second
#define inf (int)1e9
#define pi pair<int,int>
#define y1 fdfs
using namespace std;
const int N=1e5+1;
int a[N],n,m,q,l[N],r[N],d[N],x,y,c[N],z;
ll sum,s[N];
int main()
{
    /*freopen(".in","r",stdin);
    freopen(".out","w",stdout);*/
    ios_base::sync_with_stdio(0);
    cin>>n>>m>>q;
    for(int i=1;i<=n;++i)
        cin>>a[i];
    for(int i=1;i<=m;++i)
        cin>>l[i]>>r[i]>>d[i];
    while(q--)
    {
        cin>>x>>y;
        ++c[x];
        --c[y+1];
    }
    for(int i=1;i<=m;++i)
    {
        z+=c[i];
        s[l[i]]+=z*1ll*d[i];
        s[r[i]+1]-=z*1ll*d[i];
    }
    for(int i=1;i<=n;++i)
    {
        sum+=s[i];
        printf("%I64d ",sum+a[i]);
    }
}


#include <bits/stdc++.h>
#define all(a) (a).begin(),(a).end()
#define ld long double
#define ll long long
#define sqr(a) (a)*(a)
#define mp make_pair
#define pb push_back
#define x first
#define y second
#define inf (int)1e9
#define pi pair<int,int>
#define y1 fdfs
using namespace std;
const int N=1e5+2;
int a[N],n,m,q,l[N],r[N],d[N],x,y,c[N],z;
ll sum,s[N];
int main()
{
    /*freopen(".in","r",stdin);
    freopen(".out","w",stdout);*/
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    cin>>n>>m>>q;
    for(int i=1;i<=n;++i)
        cin>>a[i];
    for(int i=1;i<=m;++i)
        cin>>l[i]>>r[i]>>d[i];
    while(q--)
    {
        cin>>x>>y;
        ++c[x];
        --c[y+1];
    }
    for(int i=1;i<=m;++i)
    {
        z+=c[i];
        s[l[i]]+=z*1ll*d[i];
        s[r[i]+1]-=z*1ll*d[i];
    }
    for(int i=1;i<=n;++i)
    {
        sum+=s[i];
        printf("%I64d ",sum+a[i]);
    }
}


#include <bits/stdc++.h>
#define all(a) (a).begin(),(a).end()
#define ld long double
#define ll long long
#define sqr(a) (a)*(a)
#define mp make_pair
#define pb push_back
#define x first
#define y second
#define inf (int)1e9
#define pi pair<int,int>
#define y1 fdfs
using namespace std;
const int N=1e5+2;
int a[N],n,m,q,l[N],r[N],d[N],x,y,c[N],z;
ll sum,s[N];
int main()
{
    /*freopen(".in","r",stdin);
    freopen(".out","w",stdout);*/
    //ios_base::sync_with_stdio(0);
    //cin.tie(0);
    //cin>>n>>m>>q;
    scanf("%d%d%d",&n,&m,&q);
    for(int i=1;i<=n;++i)
        //cin>>a[i];
        scanf("%d",&a[i]);
    for(int i=1;i<=m;++i)
        scanf("%d%d%d",&l[i],&r[i],&d[i]);
        //cin>>l[i]>>r[i]>>d[i];
    while(q--)
    {
        scanf("%d%d",&x,&y);
        //cin>>x>>y;
        ++c[x];
        --c[y+1];
    }
    for(int i=1;i<=m;++i)
    {
        z+=c[i];
        s[l[i]]+=z*1ll*d[i];
        s[r[i]+1]-=z*1ll*d[i];
    }
    for(int i=1;i<=n;++i)
    {
        sum+=s[i];
        printf("%I64d ",sum+a[i]);
    }
}


#include <iostream>
#include <cmath>
#include <algorithm>
#include <vector>
#include <string>
#include <climits>
#include <set>
#include <map>
#include <cstring>
using namespace std;

long long op[100002][3];
long long a[100002];
long long applyCount[100002];
long long finalAdd[100002];

int main()
{
    ios_base::sync_with_stdio(0);
    memset(finalAdd, 0, sizeof(finalAdd));

    int n, m, k;
    cin >> n >> m >> k;

    for (int i=0; i<n; i++)
        cin >> a[i];

    for (int i=0; i<m; i++)
        cin >> op[i][0] >> op[i][1] >> op[i][2];

    for (int i=0; i<k; i++)
    {
        int x, y;
        cin >> x >> y;

        applyCount[x-1]++;
        applyCount[y]--;
    }

    long long curApply=0;
    for (int i=0; i<m; i++)
    {
        curApply += applyCount[i];
        finalAdd[op[i][0]-1] += op[i][2]*curApply;
        finalAdd[op[i][1]] -= op[i][2]*curApply;
    }

    long long curSum=0;
    for (int i=0; i<n; i++)
    {
        curSum += finalAdd[i];
        a[i] += curSum;
    }

    for (int i=0; i<n; i++)
        cout << a[i] << ' ';

    return 0;
}


#include <iostream>
#include <cmath>
#include <algorithm>
#include <vector>
#include <string>
#include <climits>
#include <set>
#include <map>
#include <cstring>
using namespace std;

int op[100000][3];
int a[100000];
int applyCount[100001];
int finalAdd[100001];

int main()
{
    ios_base::sync_with_stdio(0);
    memset(finalAdd, 0, sizeof(finalAdd));

    int n, m, k;
    cin >> n >> m >> k;

    for (int i=0; i<n; i++)
        cin >> a[i];

    for (int i=0; i<m; i++)
        cin >> op[i][0] >> op[i][1] >> op[i][2];

    for (int i=0; i<k; i++)
    {
        int x, y;
        cin >> x >> y;

        applyCount[x-1]++;
        applyCount[y]--;
    }

    int curApply=0;
    for (int i=0; i<m; i++)
    {
        curApply += applyCount[i];
        finalAdd[op[i][0]-1] += op[i][2]*curApply;
        finalAdd[op[i][1]] -= op[i][2]*curApply;
    }

    int curSum=0;
    for (int i=0; i<n; i++)
    {
        curSum += finalAdd[i];
        a[i] += curSum;
    }

    for (int i=0; i<n; i++)
        cout << a[i] << ' ';

    return 0;
}


#include <iostream>
#include <cmath>
#include <algorithm>
#include <vector>
#include <string>
#include <climits>
#include <set>
#include <map>
#include <cstring>
using namespace std;

int op[100002][3];
int a[100002];
int applyCount[100002];
long long finalAdd[100002];

int main()
{
    ios_base::sync_with_stdio(0);
    memset(finalAdd, 0, sizeof(finalAdd));

    int n, m, k;
    cin >> n >> m >> k;

    for (int i=0; i<n; i++)
        cin >> a[i];

    for (int i=0; i<m; i++)
        cin >> op[i][0] >> op[i][1] >> op[i][2];

    for (int i=0; i<k; i++)
    {
        int x, y;
        cin >> x >> y;

        applyCount[x-1]++;
        applyCount[y]--;
    }

    int curApply=0;
    for (int i=0; i<m; i++)
    {
        curApply += applyCount[i];
        finalAdd[op[i][0]-1] += op[i][2]*curApply;
        finalAdd[op[i][1]] -= op[i][2]*curApply;
    }

    long long curSum=0;
    for (int i=0; i<n; i++)
    {
        curSum += finalAdd[i];
        a[i] += curSum;
    }

    for (int i=0; i<n; i++)
        cout << a[i] << ' ';

    return 0;
}


#include <iostream>
#include <cmath>
#include <algorithm>
#include <vector>
#include <string>
#include <climits>
#include <set>
#include <map>
#include <cstring>
using namespace std;

int op[100001][100000];
int a[100000];

int main()
{
    ios_base::sync_with_stdio(0);

    int n, m, k;
    cin >> n >> m >> k;

    for (int i=0; i<n; i++)
        cin >> a[i];

    for (int i=0; i<n; i++)
        op[0][i] = 0;

    for (int i=1; i<=m; i++)
    {
        int l,r,d;
        cin >> l >> r >> d;

        for (int j=0; j<l-1; j++)
            op[i][j] = op[i-1][j];
        for (int j=l-1; j<r; j++)
            op[i][j] = op[i-1][j] + d;
        for (int j=r; j<n; j++)
            op[i][j] = op[i-1][j];

    }

    for (int i=0; i<k; i++)
    {
        int x, y;
        cin >> x >> y;

        for (int j=0; j<n; j++)
            a[j] = a[j] + op[y][j] - op[x-1][j];
    }

    for (int i=0; i<n; i++)
        cout << a[i] << ' ';

    return 0;
}


#include <iostream>
#include <cmath>
#include <algorithm>
#include <vector>
#include <string>
#include <climits>
#include <set>
#include <map>
#include <cstring>
using namespace std;

int op[100000][3];
int a[100000];
int applyCount[100001];
unsigned long long finalAdd[100001];

int main()
{
    ios_base::sync_with_stdio(0);
    memset(finalAdd, 0, sizeof(finalAdd));

    int n, m, k;
    cin >> n >> m >> k;

    for (int i=0; i<n; i++)
        cin >> a[i];

    for (int i=0; i<m; i++)
        cin >> op[i][0] >> op[i][1] >> op[i][2];

    for (int i=0; i<k; i++)
    {
        int x, y;
        cin >> x >> y;

        applyCount[x-1]++;
        applyCount[y]--;
    }

    int curApply=0;
    for (int i=0; i<m; i++)
    {
        curApply += applyCount[i];
        finalAdd[op[i][0]-1] += op[i][2]*curApply;
        finalAdd[op[i][1]] -= op[i][2]*curApply;
    }

    unsigned long long curSum=0;
    for (int i=0; i<n; i++)
    {
        curSum += finalAdd[i];
        a[i] += curSum;
    }

    for (int i=0; i<n; i++)
        cout << a[i] << ' ';

    return 0;
}


#include <iostream>
#include <cmath>
#include <algorithm>
#include <vector>
#include <string>
#include <climits>
#include <set>
#include <map>
#include <cstring>
using namespace std;

int op[100000][3];
int a[100000];

int main()
{
    ios_base::sync_with_stdio(0);

    int n, m, k;

    cin >> n >> m >> k;

    for (int i=0; i<n; i++)
        cin >> a[i];

    for (int i=0; i<m; i++)
        cin >> op[i][0] >> op[i][1] >> op[i][2];

    for (int i=0; i<k; i++)
    {
        int x, y;
        cin >> x >> y;

        for (int j=x-1; j<y; j++)
            for (int c=op[j][0]-1; c<op[j][1]; c++)
                a[c] += op[j][2];
    }

    for (int i=0; i<n; i++)
        cout << a[i] << ' ';

    return 0;
}


#include <iostream>
#include <iomanip>
#include <fstream>
#include <string>
#include <vector>
#include <algorithm>
#include <map>
#include <cmath>
#include <climits>
#include <unordered_map>
#include <stack>
#include <queue>
#include <set>
#include <list>
#include <iterator>
#include <cctype>

using namespace std;

bool double_less (double a, double b, double e) {
    return abs(a - b) < e || a < b;
}

//#define DEBUG

#define long long int
#define vi vector<int>
#define vii vector<pair<int, int>>
#define ii pair<int, int>
#define mp make_pair
#define F first
#define S second
#define mii map<int, int>
#define pb push_back
#define ll long long
#define all(a) a.begin(), a.end()
#define la(i, initial, limit) for (int i = (int)initial; i < limit; i++)
#define ld(i, initial, limit) for (int i = (int)initial; i >= limit; i--)
#define whole(v) v.begin(), v.end()

int arr[100005], d[100005][3], q[100005], w[100005];

int main() {

#if defined(DEBUG)
    freopen("input", "r", stdin);
    freopen("output", "w", stdout);
#else
    /*freopen("joke.in", "r", stdin);
    freopen("joke.out", "w", stdout);*/
#endif
    int n, m, k;
    cin >> n >> m >> k;
    la (i, 0, n) {
        cin >> arr[i];
    }

    la (i, 0, m) {
        cin >> d[i][0] >> d[i][1] >> d[i][2];
    }

    la (i, 0, k) {
        int x, y;
        cin >> x >> y;
        q[x - 1]++;
        q[y]--;
    }
    int curr = 0;
    la (i, 0, m) {
        curr += q[i];
        if (curr) {
            w[d[i][0] - 1] += d[i][2] * curr;
            w[d[i][1]] -= d[i][2] * curr;
        }
    }

    curr = 0;
    la (i, 0, n) {
        curr += w[i];
        arr[i] += curr;
    }

    la (i, 0, n)
            cout << arr[i] << ' ';

    return 0;
}


#include <iostream>
#include <iomanip>
#include <fstream>
#include <string>
#include <vector>
#include <algorithm>
#include <map>
#include <cmath>
#include <climits>
#include <unordered_map>
#include <stack>
#include <queue>
#include <set>
#include <list>
#include <iterator>
#include <cctype>

using namespace std;

bool double_less (double a, double b, double e) {
    return abs(a - b) < e || a < b;
}

//#define DEBUG

#define int long long
#define vi vector<int>
#define vii vector<pair<int, int>>
#define ii pair<int, int>
#define mp make_pair
#define F first
#define S second
#define mii map<int, int>
#define pb push_back
#define ll long long
#define all(a) a.begin(), a.end()
#define la(i, initial, limit) for (int i = (int)initial; i < limit; i++)
#define ld(i, initial, limit) for (int i = (int)initial; i >= limit; i--)
#define whole(v) v.begin(), v.end()

int arr[100005], d[100005][3], q[100005], w[100005];

int main() {

#if defined(DEBUG)
    freopen("input", "r", stdin);
    freopen("output", "w", stdout);
#else
    /*freopen("joke.in", "r", stdin);
    freopen("joke.out", "w", stdout);*/
#endif
    int n, m, k;
    cin >> n >> m >> k;
    la (i, 0, n) {
        cin >> arr[i];
    }

    la (i, 0, m) {
        cin >> d[i][0] >> d[i][1] >> d[i][2];
    }

    la (i, 0, k) {
        int x, y;
        cin >> x >> y;
        q[x - 1]++;
        q[y]--;
    }
    int curr = 0;
    la (i, 0, m) {
        curr += q[i];
        if (curr) {
            w[d[i][0] - 1] += d[i][2] * curr;
            w[d[i][1]] -= d[i][2] * curr;
        }
    }

    curr = 0;
    la (i, 0, n) {
        curr += w[i];
        arr[i] += curr;
    }

    la (i, 0, n)
            cout << arr[i] << ' ';

    return 0;
}


#include <iostream>
#include <iomanip>
#include <fstream>
#include <string>
#include <vector>
#include <algorithm>
#include <map>
#include <cmath>
#include <climits>
#include <unordered_map>
#include <stack>
#include <queue>
#include <set>
#include <list>
#include <iterator>
#include <cctype>

using namespace std;

bool double_less (double a, double b, double e) {
    return abs(a - b) < e || a < b;
}

//#define DEBUG

#define vi vector<int>
#define vii vector<pair<int, int>>
#define ii pair<int, int>
#define mp make_pair
#define F first
#define S second
#define mii map<int, int>
#define pb push_back
#define ll long long
#define all(a) a.begin(), a.end()
#define la(i, initial, limit) for (int i = (int)initial; i < limit; i++)
#define ld(i, initial, limit) for (int i = (int)initial; i >= limit; i--)
#define whole(v) v.begin(), v.end()

ll arr[100005], d[100005][3], q[100005], w[100005];

int main() {

#if defined(DEBUG)
    freopen("input", "r", stdin);
    freopen("output", "w", stdout);
#else
    /*freopen("joke.in", "r", stdin);
    freopen("joke.out", "w", stdout);*/
#endif
    int n, m, k;
    cin >> n >> m >> k;
    la (i, 0, n) {
        cin >> arr[i];
    }

    la (i, 0, m) {
        cin >> d[i][0] >> d[i][1] >> d[i][2];
    }

    la (i, 0, k) {
        int x, y;
        cin >> x >> y;
        q[x - 1]++;
        q[y]--;
    }
    ll curr = 0;
    la (i, 0, m) {
        curr += q[i];
        if (curr) {
            w[d[i][0] - 1] += d[i][2] * curr;
            w[d[i][1]] -= d[i][2] * curr;
        }
    }

    curr = 0;
    la (i, 0, n) {
        curr += w[i];
        arr[i] += curr;
    }

    la (i, 0, n)
            cout << arr[i] << ' ';

    return 0;
}


#include <iostream>
#include <iomanip>
#include <fstream>
#include <string>
#include <vector>
#include <algorithm>
#include <map>
#include <cmath>
#include <climits>
#include <unordered_map>
#include <stack>
#include <queue>
#include <set>
#include <list>
#include <iterator>
#include <cctype>

using namespace std;

bool double_less (double a, double b, double e) {
    return abs(a - b) < e || a < b;
}

//#define DEBUG

#define vi vector<int>
#define vii vector<pair<int, int>>
#define ii pair<int, int>
#define mp make_pair
#define F first
#define S second
#define mii map<int, int>
#define pb push_back
#define ll long long
#define all(a) a.begin(), a.end()
#define la(i, initial, limit) for (int i = (int)initial; i < limit; i++)
#define ld(i, initial, limit) for (int i = (int)initial; i >= limit; i--)
#define whole(v) v.begin(), v.end()

int arr[100005], d[100005][3], q[100005], w[100005];

int main() {

#if defined(DEBUG)
    freopen("input", "r", stdin);
    freopen("output", "w", stdout);
#else
    /*freopen("joke.in", "r", stdin);
    freopen("joke.out", "w", stdout);*/
#endif
    int n, m, k;
    cin >> n >> m >> k;
    la (i, 0, n) {
        cin >> arr[i];
    }

    la (i, 0, m) {
        cin >> d[i][0] >> d[i][1] >> d[i][2];
    }

    la (i, 0, k) {
        int x, y;
        cin >> x >> y;
        q[x - 1]++;
        q[y]--;
    }
    int curr = 0;
    la (i, 0, m) {
        curr += q[i];
        if (curr) {
            w[d[i][0] - 1] += d[i][2] * curr;
            w[d[i][1]] -= d[i][2] * curr;
        }
    }

    curr = 0;
    la (i, 0, n) {
        curr += w[i];
        arr[i] += curr;
    }

    la (i, 0, n)
            cout << arr[i] << ' ';

    return 0;
}


#include <iostream>
#include <iomanip>
#include <fstream>
#include <string>
#include <vector>
#include <algorithm>
#include <map>
#include <cmath>
#include <climits>
#include <unordered_map>
#include <stack>
#include <queue>
#include <set>
#include <list>
#include <iterator>
#include <cctype>

using namespace std;

bool double_less (double a, double b, double e) {
    return abs(a - b) < e || a < b;
}

//#define DEBUG

#define vi vector<int>
#define vii vector<pair<int, int>>
#define ii pair<int, int>
#define mp make_pair
#define F first
#define S second
#define mii map<int, int>
#define pb push_back
#define ll long long
#define all(a) a.begin(), a.end()
#define la(i, initial, limit) for (int i = (int)initial; i < limit; i++)
#define ld(i, initial, limit) for (int i = (int)initial; i >= limit; i--)
#define whole(v) v.begin(), v.end()

int arr[100005], d[100005][3], q[100005], w[100005];

int main() {

#define int long long

#if defined(DEBUG)
    freopen("input", "r", stdin);
    freopen("output", "w", stdout);
#else
    /*freopen("joke.in", "r", stdin);
    freopen("joke.out", "w", stdout);*/
#endif
    int n, m, k;
    cin >> n >> m >> k;
    la (i, 0, n) {
        cin >> arr[i];
    }

    la (i, 0, m) {
        cin >> d[i][0] >> d[i][1] >> d[i][2];
    }

    la (i, 0, k) {
        int x, y;
        cin >> x >> y;
        q[x - 1]++;
        q[y]--;
    }
    int curr = 0;
    la (i, 0, m) {
        curr += q[i];
        if (curr) {
            w[d[i][0] - 1] += d[i][2] * curr;
            w[d[i][1]] -= d[i][2] * curr;
        }
    }

    curr = 0;
    la (i, 0, n) {
        curr += w[i];
        arr[i] += curr;
    }

    la (i, 0, n)
            cout << arr[i] << ' ';

    return 0;
}


#include <bits/stdc++.h>

#define dbg(x) cerr << ">>>> " << x << endl;
#define INF 0x3F3F3F3F
using namespace std;

int main(){
	ios_base::sync_with_stdio(false); cin.tie(NULL);
	long long int n, m, k, l, r, d, x, y;
	long long int sum[100002], a[100002], b[100002], ins[100002][3];
	memset(sum, 0, sizeof(sum));
	memset(b, 0, sizeof(b));
	cin >> n >> m >> k;
	for(int i = 1; i <= n; i++) cin >> a[i];
	for(int j = 1; j <= m; j++){
		cin >> ins[j][0] >> ins[j][1] >> ins[j][2];
	}
	for(int i = 0; i < k; i++){
		cin >> x >> y;
		b[x]++;
		if(y != m) b[y + 1]--;
	}
	for(int i = 1; i <= m; i++){
		if(i != 1) b[i] += b[i - 1];
		sum[ins[i][0]] += b[i]*ins[i][2];
		if(ins[i][1] != n) sum[ins[i][1] + 1] -= b[i]*ins[i][2];
	}
	for(int i = 1; i <= n; i++){
		if(i != 1) sum[i] += sum[i - 1];
		cout << a[i] + sum[i] << " ";
	}
	cout << "\n";
	return 0;
}


#include <bits/stdc++.h>

#define dbg(x) cerr << ">>>> " << x << endl;
#define INF 0x3F3F3F3F
using namespace std;

int main(){
	ios_base::sync_with_stdio(false); cin.tie(NULL);
	int n, m, k, l, r, d, x, y;
	int sum[100001], a[100001], b[100001], ins[100001][3];
	memset(sum, 0, sizeof(sum));
	memset(b, 0, sizeof(b));
	cin >> n >> m >> k;
	for(int i = 1; i <= n; i++) cin >> a[i];
	for(int j = 1; j <= m; j++){
		cin >> ins[j][0] >> ins[j][1] >> ins[j][2];
	}
	for(int i = 0; i < k; i++){
		cin >> x >> y;
		b[x]++;
		if(y != n) b[y + 1]--;
	}
	for(int i = 1; i <= m; i++){
		if(i != 1) b[i] += b[i - 1];
		sum[ins[i][0]] += b[i]*ins[i][2];
		if(ins[i][1] != n) sum[ins[i][1] + 1] -= b[i]*ins[i][2];
	}
	for(int i = 1; i <= n; i++){
		if(i != 1) sum[i] += sum[i - 1];
		cout << a[i] + sum[i] << " ";
	}
	cout << "\n";
	return 0;
}


#include <bits/stdc++.h>

#define dbg(x) cerr << ">>>> " << x << endl;
#define INF 0x3F3F3F3F
using namespace std;

int main(){
	ios_base::sync_with_stdio(false); cin.tie(NULL);
	long long int n, m, k, l, r, d, x, y;
	long long int sum[100001], a[100001], b[100001], ins[100001][3];
	memset(sum, 0, sizeof(sum));
	memset(b, 0, sizeof(b));
	cin >> n >> m >> k;
	for(long long int i = 1; i <= n; i++) cin >> a[i];
	for(long long int j = 1; j <= m; j++){
		cin >> ins[j][0] >> ins[j][1] >> ins[j][2];
	}
	for(long long int i = 0; i < k; i++){
		cin >> x >> y;
		b[x]++;
		if(y != n) b[y + 1]--;
	}
	for(long long int i = 1; i <= m; i++){
		if(i != 1) b[i] += b[i - 1];
		sum[ins[i][0]] += b[i]*ins[i][2];
		if(ins[i][1] != n) sum[ins[i][1] + 1] -= b[i]*ins[i][2];
	}
	for(long long int i = 1; i <= n; i++){
		if(i != 1) sum[i] += sum[i - 1];
		cout << a[i] + sum[i] << " ";
	}
	cout << "\n";
	return 0;
}


#include <bits/stdc++.h>

#define dbg(x) cerr << ">>>> " << x << endl;
#define INF 0x3F3F3F3F
using namespace std;

int main(){
	ios_base::sync_with_stdio(false); cin.tie(NULL);
	long long int n, m, k, l, r, d, x, y;
	long long int sum[100002], a[100002], ins[100002][3];
	memset(sum, 0, sizeof(sum));
	cin >> n >> m >> k;
	for(long long int i = 1; i <= n; i++) cin >> a[i];
	for(long long int j = 1; j <= m; j++){
		cin >> ins[j][0] >> ins[j][1] >> ins[j][2];
	}
	for(long long int i = 0; i < k; i++){
		cin >> x >> y;
		for(long long int j = x; j <= y; j++){
			sum[ins[j][0]] += ins[j][2];
			if(ins[j][1] != n) sum[ins[j][1] + 1] -= ins[j][2];
		}
	}
	for(long long int i = 1; i <= n; i++){
		if(i != 1) sum[i] += sum[i - 1];
		cout << a[i] + sum[i] << " ";
	}
	cout << "\n";
	return 0;
}


#include <bits/stdc++.h>

#define dbg(x) cerr << ">>>> " << x << endl;
#define INF 0x3F3F3F3F
using namespace std;

int main(){
	ios_base::sync_with_stdio(false); cin.tie(NULL);
	int n, m, k, l, r, d, x, y;
	int sum[100002], a[100002], ins[100002][3];
	memset(sum, 0, sizeof(sum));
	cin >> n >> m >> k;
	for(int i = 1; i <= n; i++) cin >> a[i];
	for(int j = 1; j <= m; j++){
		cin >> ins[j][0] >> ins[j][1] >> ins[j][2];
	}
	for(int i = 0; i < k; i++){
		cin >> x >> y;
		for(int j = x; j <= y; j++){
			sum[ins[j][0]] += ins[j][2];
			if(ins[j][1] != n) sum[ins[j][1] + 1] -= ins[j][2];
		}
	}
	for(int i = 1; i <= n; i++){
		if(i != 1) sum[i] += sum[i - 1];
		cout << a[i] + sum[i] << " ";
	}
	cout << "\n";
	return 0;
}


#include <bits/stdc++.h>
///azizul hakim, csedu 20th batch
using namespace std;

typedef long long int LL;
typedef double db;
typedef pair<int,int> pii;
typedef pair<int,pii> ppi;
typedef vector<int> vi;
db PI = acos(-1.0);
int cs=1, test;

#define READ    freopen("in.txt","r",stdin)
#define WRITE   freopen("out.txt","w",stdout)
#define DB(x) cout << #x << " = " << x << endl;
#define fre(i,b)		for(i = 1; i <= b; i++)
#define fr(i,b)			for(i = 0; i < b; i++)
#define mem(t, v)		memset ((t) , v, sizeof(t))
#define all(c)			(c).begin(), (c).end()
#define line			printf("\n")
#define dot			    printf(".")
#define pf 			    printf
#define sf(n)			scanf("%d", &n)
#define sff(a,b)		scanf("%d %d", &a, &b)
#define sfff(a,b,c)		scanf("%d %d %d", &a, &b, &c)
#define clft(idx,st,ed) idx*2, st, (st+ed)/2
#define crht(idx,st,ed) idx*2+1, 1+(st+ed)/2, ed
#define max3(a,b,c)     max(max(a,b),c)
#define min3(a,b,c)     min(min(a,b),c)
#define pb 			    push_back
#define uu  	first
#define vv 	    second
#define eps	    1e-8
#define inf	    INT_MAX
#define MOD	    100007
#define mxx	    100009

struct op{
    int left, right;
    LL d;
}q[mxx];

int a[mxx];
LL bit[mxx], n;
void update(int idx, LL x){
    while(idx<=n){
        bit[idx]+=x;
        idx+=idx&(-idx);
    }
}

LL query(int idx){
    LL sum=0;
    while(idx>0){
        sum+=bit[idx];
        idx -= idx&(-idx);
    }
    return sum;
}

LL qbit[mxx], m;
void update2(int idx, int x){
    while(idx<=n){
        qbit[idx]+=x;
        idx+=idx&(-idx);
    }
}

LL query2(int idx){
    LL sum=0;
    while(idx>0){
        sum+=qbit[idx];
        idx -= idx&(-idx);
    }
    return sum;
}

int main()
{
    //READ;
    int i, j, k, x, y, z, len, count=0, mx=-1, lineflag=0;

    sfff(n,m,k);

    fre(i,n)sf(a[i]);

    fre(i,m){
        sfff(q[i].left, q[i].right, q[i].d );
    }

    fre(i,k)
    {
        sff(x,y);
        update2(x,1);
        update2(y+1, -1);
    }

    fre(i,m){
        LL mul = query2(i);
        LL add = q[i].d * mul;
        if(add==0)continue;

        update(q[i].left, add);
        update(q[i].right+1, -add);
    }

    fre(i,n)pf("%lld ", (LL)query(i) + a[i] );
    line;

    return 0;
}


#include <bits/stdc++.h>
///azizul hakim, csedu 20th batch
using namespace std;

typedef long long int LL;
typedef double db;
typedef pair<int,int> pii;
typedef pair<int,pii> ppi;
typedef vector<int> vi;
db PI = acos(-1.0);
int cs=1, test;

#define READ    freopen("in.txt","r",stdin)
#define WRITE   freopen("out.txt","w",stdout)
#define DB(x) cout << #x << " = " << x << endl;
#define fre(i,b)		for(i = 1; i <= b; i++)
#define fr(i,b)			for(i = 0; i < b; i++)
#define mem(t, v)		memset ((t) , v, sizeof(t))
#define all(c)			(c).begin(), (c).end()
#define line			printf("\n")
#define dot			    printf(".")
#define pf 			    printf
#define sf(n)			scanf("%d", &n)
#define sff(a,b)		scanf("%d %d", &a, &b)
#define sfff(a,b,c)		scanf("%d %d %d", &a, &b, &c)
#define clft(idx,st,ed) idx*2, st, (st+ed)/2
#define crht(idx,st,ed) idx*2+1, 1+(st+ed)/2, ed
#define max3(a,b,c)     max(max(a,b),c)
#define min3(a,b,c)     min(min(a,b),c)
#define pb 			    push_back
#define uu  	first
#define vv 	    second
#define eps	    1e-8
#define inf	    INT_MAX
#define MOD	    100007
#define mxx	    100009

struct op{
    int left, right;
    LL d;
}q[mxx];

int a[mxx];
LL bit[mxx], n;
void update(int idx, LL x){
    while(idx<=n){
        bit[idx]+=x;
        idx+=idx&(-idx);
    }
}

LL query(int idx){
    LL sum=0;
    while(idx>0){
        sum+=bit[idx];
        idx -= idx&(-idx);
    }
    return sum;
}

LL qbit[mxx], m;
void update2(int idx, int x){
    while(idx<=m){
        qbit[idx]+=x;
        idx+=idx&(-idx);
    }
}

LL query2(int idx){
    LL sum=0;
    while(idx>0){
        sum+=qbit[idx];
        idx -= idx&(-idx);
    }
    return sum;
}

int main()
{
    //READ;
    int i, j, k, x, y, z, len, count=0, mx=-1, lineflag=0;

    sfff(n,m,k);

    fre(i,n)sf(a[i]);

    fre(i,m){
        sfff(q[i].left, q[i].right, q[i].d );
    }

    fre(i,k)
    {
        sff(x,y);
        update2(x,1);
        update2(y+1, -1);
    }

    fre(i,m){
        LL mul = query2(i);
        LL add = q[i].d * mul;
        if(add==0)continue;

        update(q[i].left, add);
        update(q[i].right+1, -add);
    }

    fre(i,n)pf("%lld ", (LL)query(i) + a[i] );
    line;

    return 0;
}


#include <bits/stdc++.h>
///azizul hakim, csedu 20th batch
using namespace std;

typedef long long int LL;
typedef double db;
typedef pair<int,int> pii;
typedef pair<int,pii> ppi;
typedef vector<int> vi;
db PI = acos(-1.0);
int cs=1, test;

#define READ    freopen("in.txt","r",stdin)
#define WRITE   freopen("out.txt","w",stdout)
#define DB(x) cout << #x << " = " << x << endl;
#define fre(i,b)		for(i = 1; i <= b; i++)
#define fr(i,b)			for(i = 0; i < b; i++)
#define mem(t, v)		memset ((t) , v, sizeof(t))
#define all(c)			(c).begin(), (c).end()
#define line			printf("\n")
#define dot			    printf(".")
#define pf 			    printf
#define sf(n)			scanf("%d", &n)
#define sff(a,b)		scanf("%d %d", &a, &b)
#define sfff(a,b,c)		scanf("%d %d %d", &a, &b, &c)
#define clft(idx,st,ed) idx*2, st, (st+ed)/2
#define crht(idx,st,ed) idx*2+1, 1+(st+ed)/2, ed
#define max3(a,b,c)     max(max(a,b),c)
#define min3(a,b,c)     min(min(a,b),c)
#define pb 			    push_back
#define uu  	first
#define vv 	    second
#define eps	    1e-8
#define inf	    INT_MAX
#define MOD	    100007
#define mxx	    100009

struct op{
    int left, right;
    LL d;
}q[mxx];

int a[mxx];
LL bit[mxx], n;
void update(int idx, LL x){
    while(idx<=n){
        bit[idx]+=x;
        idx+=idx&(-idx);
    }
}

LL query(int idx){
    LL sum=0;
    while(idx>0){
        sum+=bit[idx];
        idx -= idx&(-idx);
    }
    return sum;
}

LL qbit[mxx], m;
void update2(int idx, int x){
    while(idx<=n){
        qbit[idx]+=x;
        idx+=idx&(-idx);
    }
}

LL query2(int idx){
    LL sum=0;
    while(idx>0){
        sum+=qbit[idx];
        idx -= idx&(-idx);
    }
    return sum;
}

int main()
{
    //READ;
    int i, j, k, x, y, z, len, count=0, mx=-1, lineflag=0;

    sfff(n,m,k);

    fre(i,n)sf(a[i]);

    fre(i,m){
        sfff(q[i].left, q[i].right, q[i].d );
    }

    fre(i,k)
    {
        sff(x,y);
        update2(x,1);
        update2(y+1, -1);
    }

    fre(i,n){
        update(i, a[i]);
        update(i+1, -a[i]);
    }

    fre(i,m){
        LL mul = query2(i);
        LL add = q[i].d * mul;
        if(add==0)continue;

        update(q[i].left, add);
        update(q[i].right+1, -add);
    }

    fre(i,n)pf("%lld ", (LL)query(i));
    line;

    return 0;
}


#include <bits/stdc++.h>
///azizul hakim, csedu 20th batch
using namespace std;

typedef long long int LL;
typedef double db;
typedef pair<int,int> pii;
typedef pair<int,pii> ppi;
typedef vector<int> vi;
db PI = acos(-1.0);
int cs=1, test;

#define READ    freopen("in.txt","r",stdin)
#define WRITE   freopen("out.txt","w",stdout)
#define DB(x) cout << #x << " = " << x << endl;
#define fre(i,b)		for(i = 1; i <= b; i++)
#define fr(i,b)			for(i = 0; i < b; i++)
#define mem(t, v)		memset ((t) , v, sizeof(t))
#define all(c)			(c).begin(), (c).end()
#define line			printf("\n")
#define dot			    printf(".")
#define pf 			    printf
#define sf(n)			scanf("%d", &n)
#define sff(a,b)		scanf("%d %d", &a, &b)
#define sfff(a,b,c)		scanf("%d %d %d", &a, &b, &c)
#define clft(idx,st,ed) idx*2, st, (st+ed)/2
#define crht(idx,st,ed) idx*2+1, 1+(st+ed)/2, ed
#define max3(a,b,c)     max(max(a,b),c)
#define min3(a,b,c)     min(min(a,b),c)
#define pb 			    push_back
#define uu  	first
#define vv 	    second
#define eps	    1e-8
#define inf	    INT_MAX
#define MOD	    100007
#define mxx	    100009

struct op{
    int left, right;
    LL d;
}q[mxx];

int a[mxx];
LL bit[mxx], n;
void update(int idx, LL x){
    while(idx<=n){
        bit[idx]+=x;
        idx+=idx&(-idx);
    }
}

LL query(int idx){
    LL sum=0;
    while(idx>0){
        sum+=bit[idx];
        idx -= idx&(-idx);
    }
    return sum;
}

int qbit[mxx], m;
void update2(int idx, int x){
    while(idx<=n){
        qbit[idx]+=x;
        idx+=idx&(-idx);
    }
}

int query2(int idx){
    int sum=0;
    while(idx>0){
        sum+=qbit[idx];
        idx -= idx&(-idx);
    }
    return sum;
}

int main()
{
    //READ;
    int i, j, k, x, y, z, len, count=0, mx=-1, lineflag=0;

    sfff(n,m,k);

    fre(i,n)sf(a[i]);

    fre(i,m){
        sfff(q[i].left, q[i].right, q[i].d );
    }

    fre(i,k)
    {
        sff(x,y);
        update2(x,1);
        update2(y+1, -1);
    }

    fre(i,n){
        update(i, a[i]);
        update(i+1, -a[i]);
    }

    fre(i,m){
        int mul = query2(i);
        LL add = q[i].d * mul;
        if(add==0)continue;

        update(q[i].left, add);
        update(q[i].right+1, -add);
    }

    fre(i,n)pf("%lld ", (LL)query(i));
    line;

    return 0;
}


#include <bits/stdc++.h>
///azizul hakim, csedu 20th batch
using namespace std;

typedef long long int LL;
typedef double db;
typedef pair<int,int> pii;
typedef pair<int,pii> ppi;
typedef vector<int> vi;
db PI = acos(-1.0);
int cs=1, test;

#define READ    freopen("in.txt","r",stdin)
#define WRITE   freopen("out.txt","w",stdout)
#define DB(x) cout << #x << " = " << x << endl;
#define fre(i,b)		for(i = 1; i <= b; i++)
#define fr(i,b)			for(i = 0; i < b; i++)
#define mem(t, v)		memset ((t) , v, sizeof(t))
#define all(c)			(c).begin(), (c).end()
#define line			printf("\n")
#define dot			    printf(".")
#define pf 			    printf
#define sf(n)			scanf("%d", &n)
#define sff(a,b)		scanf("%d %d", &a, &b)
#define sfff(a,b,c)		scanf("%d %d %d", &a, &b, &c)
#define clft(idx,st,ed) idx*2, st, (st+ed)/2
#define crht(idx,st,ed) idx*2+1, 1+(st+ed)/2, ed
#define max3(a,b,c)     max(max(a,b),c)
#define min3(a,b,c)     min(min(a,b),c)
#define pb 			    push_back
#define uu  	first
#define vv 	    second
#define eps	    1e-8
#define inf	    INT_MAX
#define MOD	    100007
#define mxx	    100009

struct op{
    int left, right;
    LL d;
}q[mxx];

int a[mxx];
LL bit[mxx], n;
void update(int idx, LL x){
    while(idx<=n){
        bit[idx]+=x;
        idx+=idx&(-idx);
    }
}

LL query(int idx){
    LL sum=0;
    while(idx>0){
        sum+=bit[idx];
        idx -= idx&(-idx);
    }
    return sum;
}

int qbit[mxx], m;
void update2(int idx, int x){
    while(idx<=n){
        qbit[idx]+=x;
        idx+=idx&(-idx);
    }
}

int query2(int idx){
    int sum=0;
    while(idx>0){
        sum+=qbit[idx];
        idx -= idx&(-idx);
    }
    return sum;
}

int main()
{
    //READ;
    int i, j, k, x, y, z, len, count=0, mx=-1, lineflag=0;

    sfff(n,m,k);

    fre(i,n)sf(a[i]);

    fre(i,m){
        sfff(q[i].left, q[i].right, q[i].d );
    }

    fre(i,k)
    {
        sff(x,y);
        update2(x,1);
        update2(y+1, -1);
    }

    fre(i,n){
        update(i, a[i]);
        update(i+1, -a[i]);
    }

    fre(i,m){
        int mul = query2(i);
        LL add = q[i].d * mul;

        update(q[i].left, add);
        update(q[i].right+1, -add);
    }

    fre(i,n)pf("%lld ", query(i));
    line;

    return 0;
}


// Woshiluo<woshiluo@woshiluo.site>
// 2020/09/23 22:35:38
// Blog: https://blog.woshiluo.com

#include <cstdio>
#include <cstdlib>
#include <cstring>

#include <algorithm>

template <class T>
T Max( T a, T b ) { return a > b? a: b; }
template <class T>
T Min( T a, T b ) { return a < b? a: b; }
template <class T>
void chk_Max( T &a, T b ) { if( b > a ) a = b; }
template <class T>
void chk_Min( T &a, T b ) { if( b < a ) a = b; }

const int N = 1e4 + 1e3;
const int K = 1e3 + 1e2;
const double eps = 1e-7;

int k, q;
double f[N][K];

double get_p( double a, double b ) { return a / b; }

int main() {
#ifdef woshiluo
	freopen( "d.in", "r", stdin );
	freopen( "d.out", "w", stdout );
#endif
	scanf( "%d%d", &k, &q );
	int p1 = 1;
	f[0][0] = 1;
	while( 1 ) {
		for( int i = 1; i <= k; i ++ ) {
			f[p1][i] += f[ p1 - 1 ][i] * get_p( 1, k ) * i;
			f[p1][i] += f[ p1 - 1 ][ i - 1 ] * get_p( 1, k ) * ( k - i + 1 );
		}
		if( f[p1][k] + eps >= 0.5 ) {
			break;
		}
//		printf( "%d %lf\n", p1, f[p1][k] );
		p1 ++;
	}
	while( q -- ) {
		int a;
		scanf( "%d", &a );
		double gol = get_p( a, 200 );
		int res = 1;
		for( res = 1; res <= p1; res ++ ) {
			if( f[res][k] + eps >= gol ) {
				break;
			}
		}
		printf( "%d\n", res );
	}
}


// Woshiluo<woshiluo@woshiluo.site>
// 2020/09/23 22:35:38
// Blog: https://blog.woshiluo.com

#include <cstdio>
#include <cstdlib>
#include <cstring>

#include <algorithm>

template <class T>
T Max( T a, T b ) { return a > b? a: b; }
template <class T>
T Min( T a, T b ) { return a < b? a: b; }
template <class T>
void chk_Max( T &a, T b ) { if( b > a ) a = b; }
template <class T>
void chk_Min( T &a, T b ) { if( b < a ) a = b; }

const int N = 1e4 + 1e3;
const int K = 1e3 + 1e2;
const double eps = 1e-8;

int k, q;
double f[N][K];

double get_p( double a, double b ) { return a / b; }

int main() {
#ifdef woshiluo
	freopen( "d.in", "r", stdin );
	freopen( "d.out", "w", stdout );
#endif
	scanf( "%d%d", &k, &q );
	int p1 = 1;
	f[0][0] = 1;
	while( 1 ) {
		for( int i = 1; i <= k; i ++ ) {
			f[p1][i] += f[ p1 - 1 ][i] * get_p( 1, k ) * (double)i;
			f[p1][i] += f[ p1 - 1 ][ i - 1 ] * get_p( 1, k ) * (double)( k - i + 1 );
		}
		if( f[p1][k] + eps >= 0.5 ) {
			break;
		}
//		printf( "%d %lf\n", p1, f[p1][k] );
		p1 ++;
	}
	while( q -- ) {
		int a;
		scanf( "%d", &a );
		double gol = get_p( (double)a - eps, 2000 );
		int res = 1;
		for( res = 1; res <= p1; res ++ ) {
			if( f[res][k] >= gol ) {
				break;
			}
		}
		printf( "%d\n", res );
	}
}


// Woshiluo<woshiluo@woshiluo.site>
// 2020/09/23 22:35:38
// Blog: https://blog.woshiluo.com

#include <cstdio>
#include <cstdlib>
#include <cstring>

#include <algorithm>

template <class T>
T Max( T a, T b ) { return a > b? a: b; }
template <class T>
T Min( T a, T b ) { return a < b? a: b; }
template <class T>
void chk_Max( T &a, T b ) { if( b > a ) a = b; }
template <class T>
void chk_Min( T &a, T b ) { if( b < a ) a = b; }

const int N = 1e4 + 1e3;
const int K = 1e3 + 1e2;
const double eps = 1e-7;

int k, q;
double f[N][K];

double get_p( double a, double b ) { return a / b; }

int main() {
#ifdef woshiluo
	freopen( "d.in", "r", stdin );
	freopen( "d.out", "w", stdout );
#endif
	scanf( "%d%d", &k, &q );
	int p1 = 1;
	f[0][0] = 1;
	while( 1 ) {
		for( int i = 1; i <= k; i ++ ) {
			f[p1][i] += f[ p1 - 1 ][i] * get_p( 1, k ) * i;
			f[p1][i] += f[ p1 - 1 ][ i - 1 ] * get_p( 1, k ) * ( k - i + 1 );
		}
		if( f[p1][k] + eps >= 0.5 ) {
			break;
		}
//		printf( "%d %lf\n", p1, f[p1][k] );
		p1 ++;
	}
	while( q -- ) {
		int a;
		scanf( "%d", &a );
		double gol = get_p( a, 2000 );
		int res = 1;
		for( res = 1; res <= p1; res ++ ) {
			if( f[res][k] + eps >= gol ) {
				break;
			}
		}
		printf( "%d\n", res );
	}
}


// Woshiluo<woshiluo@woshiluo.site>
// 2020/09/23 22:35:38
// Blog: https://blog.woshiluo.com

#include <cstdio>
#include <cstdlib>
#include <cstring>

#include <algorithm>

template <class T>
T Max( T a, T b ) { return a > b? a: b; }
template <class T>
T Min( T a, T b ) { return a < b? a: b; }
template <class T>
void chk_Max( T &a, T b ) { if( b > a ) a = b; }
template <class T>
void chk_Min( T &a, T b ) { if( b < a ) a = b; }

const int N = 1e4 + 1e3;
const int K = 1e3 + 1e2;
const double eps = 1e-7;

int k, q;
double f[N][K];

double get_p( double a, double b ) { return a / b; }

int main() {
#ifdef woshiluo
	freopen( "d.in", "r", stdin );
	freopen( "d.out", "w", stdout );
#endif
	scanf( "%d%d", &k, &q );
	int p1 = 1;
	f[0][0] = 1;
	while( 1 ) {
		for( int i = 1; i <= k; i ++ ) {
			f[p1][i] += f[ p1 - 1 ][i] * get_p( 1, k ) * (double)i;
			f[p1][i] += f[ p1 - 1 ][ i - 1 ] * get_p( 1, k ) * (double)( k - i + 1 );
		}
		if( f[p1][k] + eps >= 0.5 ) {
			break;
		}
//		printf( "%d %lf\n", p1, f[p1][k] );
		p1 ++;
	}
	while( q -- ) {
		int a;
		scanf( "%d", &a );
		double gol = get_p( a, 2000 );
		int res = 1;
		for( res = 1; res <= p1; res ++ ) {
			if( f[res][k] - eps >= gol ) {
				break;
			}
		}
		printf( "%d\n", res );
	}
}


#include <bits/stdc++.h>

#define int long long

using namespace std;

signed main() {
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    int k, q;
    cin >> k >> q;
    const int maxN = 50005;
    const int maxK = 1005;
    double dp[maxN][maxK]; // dp[days][balls] = probability.
    for (int i = 0; i < maxN; i++) for (int j = 0; j < maxK; j++) dp[i][j] = 0;
    dp[0][0] = 1;
    for (int i = 0; i < maxN-5; i++) {
        for (int j = 0; j < maxK-5; j++) {
            dp[i+1][j] += dp[i][j]*((double)j/(double)k);
            dp[i+1][j+1] += dp[i][j]*((double)(k-j)/(double)k);
        }
    }
    double eps = 1e-7;
    for (int i = 0; i < q; i++) {
        double p;
        cin >> p;
        for (int j = 0; j < maxN; j++) {
            if (dp[j][k] > (p-eps)/2000) {
                cout << j << '\n';
                break;
            }
        }
    }
}
/*

 */


#include <bits/stdc++.h>

#define int long long

using namespace std;

signed main() {
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    int k, q;
    cin >> k >> q;
    const int maxN = 10005;
    const int maxK = 1005;
    double dp[maxN][maxK]; // dp[days][balls] = probability.
    for (int i = 0; i < maxN; i++) for (int j = 0; j < maxK; j++) dp[i][j] = 0;
    dp[0][0] = 1;
    for (int i = 0; i < maxN-5; i++) {
        for (int j = 0; j < maxK-5; j++) {
            dp[i+1][j] += dp[i][j]*((double)j/(double)k);
            dp[i+1][j+1] += dp[i][j]*((double)(k-j)/(double)k);
        }
    }
    double eps = 1e-7;
    for (int i = 0; i < q; i++) {
        double p;
        cin >> p;
        for (int j = 0; j < maxN; j++) {
            if (dp[j][k] > (p-eps)/2000) {
                cout << j << '\n';
                break;
            }
        }
    }
}
/*

 */


#include <bits/stdc++.h>

#define int long long

using namespace std;

signed main() {
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    int k, q;
    cin >> k >> q;
    const int maxn = 105;
    double dp[maxn][maxn]; // dp[days][balls] = probability.
    for (int i = 0; i < maxn; i++) for (int j = 0; j < maxn; j++) dp[i][j] = 0;
    dp[0][0] = 1;
    for (int i = 0; i < maxn-5; i++) {
        for (int j = 0; j < maxn-5; j++) {
            dp[i+1][j] += dp[i][j]*((double)j/(double)k);
            dp[i+1][j+1] += dp[i][j]*((double)(k-j)/(double)k);
        }
    }
    double eps = 1e-7;
    for (int i = 0; i < q; i++) {
        double p;
        cin >> p;
        for (int j = 0; j < maxn; j++) {
            if (dp[j][k] > (p-eps)/2000) {
                cout << j << '\n';
                break;
            }
        }
    }
}
/*

 */