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