Scientists are constantly listening for aliens. Because of the great distances, some things may come more delayed than others. Thus they need an algorithm that when given two strings,
Input Specification
The input will consist of two newline separated strings,
Output Specification
Output aliens
if it is possible, else no aliens
.
Sample Input 1
Copy
abcdef
abcfde
Sample Output 1
Copy
aliens
Explanation for Sample 1
The substring f
was moved to after index
Sample Input 2
Copy
abcdef
acbdfe
Sample Output 2
Copy
no aliens
Explanation for Sample 2
There is no single substring that can be moved to create the new string.
Comments