#include <iostream>
using namespace std;
union point {
int decimal;
double _float;
void init() {
cin >> _float;
if ((int) _float == _float) {
decimal = (int) _float;
}
}
double get() {
if (_float != NULL) return _float;
return decimal;
}
};
struct points {
point x;
point y;
point z;
};
int main() {
struct points point;
cout << "Enter value of x: ";
point.x.init();
cout << "Enter value of y: ";
point.y.init();
cout << "Enter value of z: ";
point.z.init();
cout << "x = " << point.x.get() << endl;
cout << "y = " << point.y.get() << endl;
cout << "z = " << point.z.get() << endl;
}