#include <iostream> using namespace std; int main() { while(true) { int a; cin>>a; if(a != 42) cout<<a<<endl; else break; } return 0;}