Under construction

Still being built. Things may change

Missing Vowels

Interview

Time limit2sMemory limit1024 MB

Summary
Check whether the short name s can be formed from the full name f by deleting only vowels (a, e, i, o, u, y), ignoring letter case.
Level

Easy3 of 10

Topics
String, Two pointers
Solved
No attempts yet

Input and Output

There are many ways to write a word on paper. For example, some writing systems, like Arabic and Hebrew, omit most vowels, although they write some of them.

In this problem, we will only consider strings consisting of English letters and hyphens. The letters a, e, i, o, u, and y are vowels, while hyphens and all other letters are consonants. All comparisons are case-insensitive: uppercase and lowercase versions of the same letter are equal.

You are given two strings ss and ff, called the short name and the full name. Check whether the short name ss can be obtained from the full name ff by omitting some vowels (possibly none).

Input

The first line contains a single string ss, the short name.

The second line contains a single string ff, the full name.

Each string is non-empty and consists of at most 10001000 English letters and hyphens.

Output

Print "Same" if the short name ss can be obtained from the full name ff by omitting some vowels, and "Different" otherwise.

Examples5

  1. Example 1

    Input
    Shrm-el-Shikh
    Sharm-el-Sheikh
    
    Expected output
    Same
    
  2. Example 2

    Input
    Eilot
    Eilat
    
    Expected output
    Different
    
  3. Example 3

    Input
    Saint-Petersburg
    Saint-Petersburg
    
    Expected output
    Same
    
  4. Example 4

    Input
    Bcdfghjklmnpqrstvwxz
    Abcdefghijklmnopqrstuvwxzyy
    
    Expected output
    Same
    
  5. Example 5

    Input
    Aa
    aaaA
    
    Expected output
    Same