First Occurance of Substring

Time limit: 5000ms
Memory limit: 256mb

Description:
Return the index of the first occurrence of str 2 in str1, or -1 if str2 is not part of str1.

Input:
A line characters of str1
A line characters of str2

Output:
You should output only one line which contains an integer of the first occurence index (or -1).

Sample1
input:
hello
ll

output:
2

Sample2
input:
aaaaaaaa
bba

output:
-1
Submit