#include<bits/stdc++.h> using namespace std; int main(){ int a; while(1){ cin >> a; if (a == 42) break; cout << a << endl; } return 0; }