#include <iostream>
#include <vector>
#include <cmath>
using namespace std;
bool positive(double n){
return n == abs(n);
}
signed main() {
int n;
cin >> n;
vector<double> a(n);
for(auto &i: a){
cin >> i;
if(positive(i))
i = sqrt(i);
else
i *= i;
for(auto &i:a)
cout << i << " ";
#include <iostream>
#include <vector>
#include <cmath>
using namespace std;
bool positive(double n){
return n == abs(n);
}
signed main() {
int n;
cin >> n;
vector<double> a(n);
for(auto &i: a){
cin >> i;
if(positive(i))
i = sqrt(i);
else
i *= i;
}
for(auto &i:a)
cout << i << " ";
}