#include<bits/stdc++.h> using namespace std; int main(){ cout<<"153"<<endl; cout<<"370"<<endl; cout<<"371"<<endl; cout<<"407"<<endl; return 0; }