include<bits/stdc++.h> using namespace std; int main() { char s[200], g[200]; cin>>g>>s; if(strstr(s,g)) cout<<g<<" is substring of "<<s<<endl; else if(strstr(g,s)) cout<<s<<" is substring of "<<g<<endl; else cout<<"No substring"; return 0; }