#include #include #include #include #include #include #include #include #include using namespace std; using int64 = long long; int main() { int64 n,d; cin >> n >> d; vector a(n,0LL); for (int i=1; i> a[i]; vector b(n,0LL); for (int i=1; i= d) x = b[i]; else x = (max(x,b[i])/d+1)*d; cout << x << (i!=n-1? " " : "\n"); } }