#K1351. Taco String Transformation

    ID: 23928 Type: Default 1000ms 256MiB

Taco String Transformation

Taco String Transformation

Given two strings s1 and s2, determine whether s1 can be transformed into s2 by deleting exactly one character. Formally, the transformation is valid if and only if

$$|s1| = |s2| + 1$$

and by removing one character from s1 (without reordering the remaining characters), the resulting string equals s2.

For example, transforming "abc" into "ac" by deleting the character 'b' is a valid transformation.

inputFormat

The input is read from standard input (stdin) and consists of two lines:

  • The first line contains the original string s1.
  • The second line contains the target string s2.

outputFormat

Output a single line to standard output (stdout): either True if s1 can be transformed into s2 by deleting exactly one character, or False otherwise.

## sample
abc
ab
True