#include <bits/stdc++.h>
using namespace std;
bool fun(const string &s) {
if (s.empty())
return false;
size_t i=0;
if (s[0] == '-') {
if (s.length()==1)
return false;
i=1;
}
for (;i<s.size();i++)
{
if (!isdigit(s[i]))
{
return false;
}
}
return true;
}
int main() {
string y;
while (getline(cin, y))
{
if (!fun(y))
{
break;
}
cout<<y<<endl;
}
return 0;
}