#include <bits/stdc++.h>
using namespace std;
bool isqrt(int tmp)
{
double temp = sqrt(tmp);
if (temp * temp == tmp) return true;
return false;
}
int main()
{
int s, t;
cin >> s >> t;
while (t--)
{
int x;
cin >> x;
if (x >= s && isqrt(x)) cout << "lucky" << endl;
else if (x < s) cout << s << endl;
else
{
while (x % s != 0) x++;
cout << x << endl;
}
}
return 0;
}
两个WA两个黑