#include <iostream>
using namespace std;
int main()
{
int n;
cin >> n;
for (int i = 1; i * i <= n; i++)
cout << i * i << " ";
return 0;
}
int ans1()
{
bool m[1050] = {}; // 全设为false ,代表关门状态
int n;
cin >> n;
for (int i = 1; i <= n; i++)
for (int j = 1; j <= n; j++)
if (j % i == 0)
m[j] = !m[j];
for (int i = 1; i <= n; i++)
if (m[i])
cout << i << " ";
return 0;
}