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