
#include <iostream>
#include <list>
#include <iterator>
using namespace std;

int main() {
   int a;
   list<int> L;
   while (cin >> a) L.push_back(a);
   erase_negative(L);
   cout << "{";
   list<int>::iterator it = L.begin();
   if (it != L.end()) {
      cout << *it++;
      while (it != L.end()) {
         cout << ' ' << *it++;
      }
   }
   cout << "}" << endl;
}
