#include <bits/stdc++.h> using namespace std; int main() { ios::sync_with_stdio(false),cin.tie(0),cout.tie(0); int n; while(cin>>n) { if(n!=42) { cout<<n<<endl; } else { break; } } return 0; }