628. Is Subsequence

0

Easy

Determine whether a given string s is a subsequence of another string t. A subsequence of a string is a new string that can be formed by deleting zero or more characters from the original string without changing the relative order of the remaining characters. For example, if we have the string "abcde" and we delete the characters "b" and "d", we can form the subsequence "ace". However, if we delete the characters "a", "e", and "c", the resulting string "aec" is not a subsequence of "abcde".

Input Format

Two input strings s and t.

Output Format

Return true if s is a subsequence of t, otherwise return false.

Example

Input

abc ahbgdc

Output

true

Constraints

0 <= s.length <= 100
0 <= t.length <= 10^4
s and t consist only of lowercase English letters.
Loading...

View Submissions

Console