P27788 [洛谷] Validate Substring
普及-
题目描述

Problem Description

Input two strings and verify if one string is a substring of the other.

Input Format

Two lines, each containing one string.

Output Format

If the first string $s_1$ is a substring of the second string $s_2$, output (s1) is substring of (s2);

Otherwise, if the second string $s_2$ is a substring of the first string $s_1$, output (s2) is substring of (s1);

Otherwise, output No substring.

Sample Input and Output

Input Sample #1

abc
dddncabca

Output Sample #1

abc is substring of dddncabca

Input Sample #2

aaa
bbb

Output Sample #2

No substring

Notes

For $100\%$ of the data, the length of the strings is within 20 characters.

输入格式

见题面 Input 部分

输出格式

见题面 Output 部分

样例输入
abc dddncabca
样例输出
abc is substring of dddncabca