#K73102. Alternating Underline and Overline Pattern

    ID: 33901 Type: Default 1000ms 256MiB

Alternating Underline and Overline Pattern

Alternating Underline and Overline Pattern

You are given a string S consisting of uppercase English letters. Your task is to generate two lines based on S. In the first line, print each character of S at the even indices (starting with index 0), and replace the characters at odd indices with a dash ('-'). In the second line, for the positions where the first line printed a dash, output the corresponding character from S; otherwise, print a dash.

For example, if S = CAT, then the output should be:

C-T
-A-

This corresponds to the pattern rules below:

Let \( n \) be the length of S. For every index \( i \) (0-based):

  • If \( i \) is even, then the first line prints \( S[i] \) and the second line prints \( - \).
  • If \( i \) is odd, then the first line prints \( - \) and the second line prints \( S[i] \).

inputFormat

The input consists of a single line containing a non-empty string S made up of uppercase English letters.

outputFormat

Output two lines. The first line corresponds to the following pattern: for every even index \( i \) (where \( i \) starts from 0) the character \( S[i] \) is printed, while a dash '-' is printed for every odd index. The second line prints a dash for every even index and the actual character \( S[i] \) for every odd index.

## sample
X
X

</p>