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