#include <iostream>
int main()
{
int x;
while((std::cin >> x) && x > 0)
{
std::cout << x << " ";
}
std::cout << "end" << std::endl;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgoKaW50IG1haW4oKQp7CglpbnQgeDsKCXdoaWxlKChzdGQ6OmNpbiA+PiB4KSAmJiB4ID4gMCkKCXsKCQlzdGQ6OmNvdXQgPDwgeCA8PCAiICI7Cgl9CglzdGQ6OmNvdXQgPDwgImVuZCIgPDwgc3RkOjplbmRsOwp9Cg==